컴백부터 K-뷰티까지 — K-컬쳐의 모든 것을 메일로 받아보세요메일로 받아보기

METAL MEDIA

외부 탐색 알고리즘 없이, LLM 에이전트 혼자 프롬프트·코드·ML 학습법을 최적화하게 했더니 전문 시스템을 이겼다

arXiv:2608.067142026-08-10

The Optimizer Is the Agent: Reasoning-Driven Search across Prompts, Programs, and ML Workflows

외부 탐색 알고리즘 없이, LLM 에이전트 혼자 프롬프트·코드·ML 학습법을 최적화하게 했더니 전문 시스템을 이겼다

기존 프롬프트/코드/ML 워크플로 최적화 도구들은 진화 탐색, 밴딧, 텍스트 그래디언트 같은 외부 제어 알고리즘이 '무엇을 시도할지'를 정하고 LLM은 그 안에서 수정안만 내놓는 구조였다. ReASearch는 이런 외부 제어기를 없애고, 하나의 도구 사용 에이전트가 무엇을 평가할지, 실패를 어떻게 진단할지, 언제 되돌릴지까지 스스로 판단하게 만들었다. 14개 과제에서 이 방식이 전문화된 최적화 시스템보다 2~40% 더 나은 결과를 냈고, 원 패킹(circle packing) 문제에서는 기존 인간 최고 기록을 넘어서는 해를 발견했다.

METAL MEDIA 해설 도표

외부 제어기 제거: 에이전트가 탐색 정책 전체를 내재화하는 구조

증거 상태측정 결과가 보고됨

  1. 기존 방식진화 탐색·밴딧·텍스트 그래디언트 같은 외부 제어기가 후보 선택과 예산 배분을 결정하고, LLM은 그 안에서 지역적 수정만 제안한다.
  2. ReASearch 에이전트 루프동일한 코드 에이전트가 파일 입출력, 파이썬/Bash 실행, 지속 메모리(lessons.md)를 갖추고 매 턴 다음에 어떤 도구를 쓸지 스스로 판단한다.
  3. 도메인별 도구프롬프트 최적화는 get_next_minibatch·call_student_model_batch·validate_candidate, 프로그램 진화는 edit_code·evaluate, ML 워크플로는 edit_train_file·run_experiment 도구만 다르게 제공한다.
  4. 떠오르는 탐색 행동이중 검증, 실패 재사용, 실패한 경로 되돌리기, 적응적 탐색 같은 복잡한 탐색 패턴이 하드코딩 없이 추론 과정에서 자연스럽게 나타난다.
  5. 결과 비교GEPA, AdaEvolve, Claude Code 등 전문화된 최적화 시스템과 동일 예산에서 비교해 2~40% 성능 우위를 보이고 일부 과제는 인간 최고 기록을 넘어선다.
METAL MEDIA이 원문을 바탕으로 재구성한 해설 도표이며, 논문 저자의 원문 figure가 아닙니다.

무엇을 했나

  1. 프롬프트 최적화, 프로그램(코드) 진화, ML 학습 워크플로 개선이라는 세 가지 서로 다른 문제를 동일한 에이전트 루프와 공용 도구 설계(평가, 편집, 파이썬 실행, 지속 메모리)로 처리했다.
  2. 외부 탐색 알고리즘 대신 에이전트가 직접 평가 시점, 수정 방향, 검증 여부, 실패 시 되돌리기(revert) 여부를 판단하도록 시스템 프롬프트와 도구만 제공했다.
  3. python_exec라는 파이썬 실행 도구를 통해 에이전트가 평가 로그를 통계 분석하고 실패 패턴을 스스로 찾아내도록 했으며, lessons.md라는 파일에 시행착오 교훈을 계속 누적시켜 긴 시간에 걸친 최적화를 지원했다.
  4. AIME, HotpotQA, GSM8K, Terminal-Bench 2.0(프롬프트), 원 패킹·Heilbronn 삼각형·트랜잭션 스케줄링·EPLB·ARC-AGI-2(코드), NanoGPT·IMG-100·Atari·MuJoCo·크립토 가격 예측(ML 워크플로) 등 14개 과제로 검증했다.
  5. GEPA, AdaEvolve, Claude Code(공식 AutoResearch 설정) 등 각 분야의 강력한 기존 시스템과 동일한 예산(호출 횟수, 시간) 조건에서 비교했다.
Figure 1: Positioning ReASearch relative to existing methods.
Figure 1: Positioning ReASearch relative to existing methods.
Table 1: Performance on test sets before and after system prompt optimization.
AIME ↑GSM8K ↑HotpotQA ↑Terminal-Bench 2.0 ↑
Baseline46.00 ± 1.3381.20 ± 0.3863.00 ± 1.5035.56 ± 1.48
GEPA50.67 ± 1.1582.11 ± 0.4565.80 ± 0.8042.22 ± 1.28
ReASearch52.00 ± 0.6783.40 ± 0.3067.60 ± 0.5053.33 ± 1.96
Figure 2: Prior methods use LLMs primarily as mutators, with candidate selection and optimization goals determined by external heuristic algorithms. In contrast, ReASearch exposes the entire optimization process through tools, giving the agent full control over the search procedure and enabling it to solve a wide range of tasks.
Figure 2: Prior methods use LLMs primarily as mutators, with candidate selection and optimization goals determined by external heuristic algorithms. In contrast, ReASearch exposes the entire optimization process through tools, giving the agent full control over the search procedure and enabling it to solve a wide range of tasks.
Table 2: Circle Packing Results
AlgorithmModeln=23 ↑n=24 ↑n=25 ↑n=26 ↑n=27 ↑n=28 ↑n=29 ↑n=30 ↑n=31 ↑n=32 ↑
Best known (human)2.4782.5302.5872.6352.6852.7372.7902.8422.8892.939
AdaEvolveGPT-52.4062.5282.5692.6102.6542.6412.6592.7502.7812.707
Sonnet 4.62.4782.4332.5872.6302.5762.6232.7862.8432.8872.810
ReASearchGPT-52.4712.5282.5722.6232.6832.6872.7792.7802.6832.938
Sonnet 4.62.4782.5302.5872.6362.6842.7352.7902.8432.8902.940
Figure 3: We visualize an example agent trajectory for prompt optimization, highlighting automatic verification and final prompt selection. None of this process is hardcoded; it emerges from the guiding instruction, with agents freely deciding each next step.
Figure 3: We visualize an example agent trajectory for prompt optimization, highlighting automatic verification and final prompt selection. None of this process is hardcoded; it emerges from the guiding instruction, with agents freely deciding each next step.
Table 3: Heilbronn Triangle Results
AlgorithmModeln=11 ↑n=12 ↑n=13 ↑n=14 ↑n=15 ↑
Best known (human)0.037040.032600.027020.024300.02111
AdaEvolveGPT-50.029230.031000.022290.016060.01770
Sonnet 4.60.026290.025520.021420.002990.00984
ReASearchGPT-50.035390.031420.024660.022600.01903
Sonnet 4.60.035520.032600.027000.024290.02034
Figure 4: Program evolution and ML workflow optimization exhibit similar patterns: the agent actively uses Python for reasoning and small-scale experiments before running expensive evaluations, while delegating targeted code edits to a separate agent to keep the main agent’s context clean.
Figure 4: Program evolution and ML workflow optimization exhibit similar patterns: the agent actively uses Python for reasoning and small-scale experiments before running expensive evaluations, while delegating targeted code edits to a separate agent to keep the main agent’s context clean.
Table 4: Systems Programming Results (TXN and EPLB)
AlgorithmModelTXN ↑EPLB ↑
GEPAGPT-539840.1445
ShinkaGPT-543290.1272
AdaEvolveGPT-536360.1976
Sonnet 4.642920.1441
ReASearchGPT-542370.2305
Sonnet 4.640320.1471
Figure 5: Tool call frequency statistics for each category.
Figure 5: Tool call frequency statistics for each category.
Table 6: Model training tasks.
MethodNanoGPT ↓IMG-100 ↑Atari (Q*bert) ↑MuJoCo ↑Crypto ↑
Baseline0.998 ± 0.00663.51 ± 0.85475 ± 901537 ± 2200.0953 ± 0.0021 (rank 36)
Claude Code0.974 ± 0.01078.59 ± 1.401250 ± 1803986 ± 4100.0999 ± 0.0028 (rank 29)
ReASearch0.976 ± 0.00883.99 ± 1.104500 ± 3205267 ± 4800.1110 ± 0.0024 (rank 6)
Figure 6: Comparison with GEPA on Terminal-Bench validation accuracy.
Figure 6: Comparison with GEPA on Terminal-Bench validation accuracy.
Table 7: Component ablation on prompt optimization.
MethodAIME ↑Terminal-Bench 2.0 ↑
Baseline46.0035.56
GEPA50.6742.22
ReASearch52.0053.33
ReASearch w/o memory49.3348.15
ReASearch w/o Python tools51.3351.11
Figure 7: Performance and token usage across experiments. For Claude Code, token usage is only available at the end of the optimization run, so we plot it as a linear trajectory.
Figure 7: Performance and token usage across experiments. For Claude Code, token usage is only available at the end of the optimization run, so we plot it as a linear trajectory.
Table 8: Component ablation on ARC-AGI-2 program evolution.
MethodTrain acc ↑Test acc ↑
AdaEvolve21.9%12.5%
ReASearch85.0%50.0%
ReASearch w/o memory60.0%39.2%
ReASearch w/o Python tools51.67%32.5%
Table 9: Open-source backbones on prompt optimization. The AIME and HotpotQA rows for the baseline and ReASearch w/ Claude Sonnet 4.6 match Table 1; the Terminal-Bench 2.0 column here uses GPT-OSS-120B as the student model (rather than GPT-5), so its values differ from Table 1 and are not directly comparable. GLM-5 and Kimi-2.5 are added.
MethodAIME ↑HotpotQA ↑Terminal-Bench 2.0 ↑
Baseline46.00 ± 1.3363.00 ± 1.503.00 ± 0.74
GEPA50.67 ± 1.1565.80 ± 0.80
ReASearch w/ Claude Sonnet 4.652.00 ± 0.6767.60 ± 0.5023.00 ± 2.27
ReASearch w/ GLM-551.33 ± 1.1567.20 ± 0.9014.81 ± 4.07
ReASearch w/ Kimi-2.550.67 ± 0.9466.80 ± 1.008.15 ± 3.39
Table 10: Open-source backbones on ML workflow optimization. The baseline and ReASearch w/ Claude rows match Table 6; GLM-5 and Kimi-2.5 are added.
MethodNanoGPT ↓IMG-100 ↑Atari (Q*bert) ↑MuJoCo ↑Crypto ↑
Baseline0.998 ± 0.00663.51 ± 0.85475 ± 901537 ± 2200.0953 ± 0.0021
ReASearch w/ Claude0.976 ± 0.00883.99 ± 1.104500 ± 3205267 ± 4800.1110 ± 0.0024
ReASearch w/ GLM-50.979 ± 0.00982.80 ± 1.254100 ± 3804920 ± 5100.1085 ± 0.0030
ReASearch w/ Kimi-2.50.981 ± 0.01082.10 ± 1.353900 ± 4204740 ± 5400.1076 ± 0.0033
Table 11: Component ablation on Heilbronn triangle program evolution. The objective is the minimum triangle area; higher is better.
Methodn=11 ↑n=12 ↑n=13 ↑n=14 ↑n=15 ↑
Best known (human)0.037040.032600.027020.024300.02111
AdaEvolve0.026290.025520.021420.002990.00984
ReASearch0.035520.032600.027000.024290.02034
ReASearch w/o memory0.032410.029380.023710.020640.01617
ReASearch w/o Python tools0.033870.028620.024970.018920.01753

실제로 확인된 결과

  • 프롬프트 최적화 4개 과제(AIME, HotpotQA, GSM8K, Terminal-Bench 2.0)에서 동일한 학생 모델 호출 수 조건으로 GEPA보다 테스트셋 성능이 일관되게 높았다.
  • 원 패킹, Heilbronn 삼각형, 트랜잭션 스케줄링, EPLB, ARC-AGI-2의 프로그램 진화 과제에서 동일 평가 예산 하에 AdaEvolve보다 대부분 더 좋은 결과를 냈고 일부는 기존 인간 최고 기록을 넘어섰다.
  • EPLB에서 120턴 넘게 0.21에 정체됐던 점수를, 리밸런싱 제약 조건을 진단해 수정함으로써 0.23으로 끌어올렸다. 같은 조건의 AdaEvolve(Sonnet)는 272회 연속 반복 동안 61% 낮은 수준에 정체됐다.
  • Heilbronn n=12에서 8중 대칭 구조를 수학적 제약식으로 정식화해 50자리 정밀도로 풀었으며, AdaEvolve는 n=12에서 78%, n=14에서 12% 수준의 성능에 그쳤다.
  • ML 워크플로 최적화에서 NanoGPT는 Claude Code와 통계적으로 비슷했지만(0.976±0.008 대 0.974±0.010), IMG-100·Atari·MuJoCo·크립토 예측 과제에서는 더 적은 토큰으로 더 나은 성능을 냈고, 크립토 예측에서는 15회 실험 만에 캐글 리더보드 순위를 36위에서 6위로 끌어올렸다.

어디에 쓸 수 있나

  • 시스템 프롬프트를 반복적으로 손보는 프롬프트 엔지니어링 업무에 외부 탐색 알고리즘 없이 에이전트를 붙여 자동화하는 데 참고할 수 있다.
  • 어려운 단일 문제(조합 최적화, 스케줄링, 퍼즐 규칙 추론)에 대해 반복 시행착오와 교훈 누적이 필요한 코드 진화 작업에 적용해볼 수 있다.
  • 제한된 실험 예산 안에서 하이퍼파라미터·아키텍처·손실 설계를 함께 탐색해야 하는 ML 학습 파이프라인 튜닝에 활용할 수 있다.

한계와 남은 검증

  • 평가된 14개 과제는 특정 도메인(수학 추론, QA, 터미널 작업, 기하 최적화, 시스템 프로그래밍, 퍼즐, 몇 종의 ML 학습)에 한정되어 있어 다른 유형의 작업에서의 일반화는 확인되지 않았다.
  • 각 도메인마다 별도의 도구 세트(예: get_next_minibatch, edit_code, run_experiment)를 설계해야 하므로 완전히 도메인에 무관한 하나의 시스템은 아니다.
  • 비교 대상 시스템(GEPA, AdaEvolve, Claude Code)과의 예산을 맞추려는 노력은 있었지만 API 비용, 백본 모델 차이 등 완벽히 통제되지 않은 변수가 남아 있다.
  • 일부 결과는 각 실험당 3회 반복 평균이며, 통계적 유의성 검정 없이 평균값만 보고된 경우가 있다.

왜 중요한가

지금까지 프롬프트·코드·학습 파이프라인을 자동으로 개선하는 도구들은 사람이 짜 넣은 탐색 규칙에 의존해 왔는데, 이 연구는 그 규칙 자체를 LLM의 추론으로 대체할 수 있음을 보여준다. 이는 앞으로 최적화 도구를 만들 때 복잡한 제어 로직을 설계하는 대신, 잘 설계된 도구 세트와 지시문만으로도 에이전트가 스스로 탐색 전략을 만들어낼 수 있다는 뜻이다.

이 논문의 용어

  • 외부 제어기(outer-loop controller) · 진화 알고리즘, 밴딧, 텍스트 그래디언트처럼 무엇을 시도하고 언제 멈출지를 LLM 바깥에서 정하는 탐색 규칙
  • python_exec · 에이전트가 파이썬 코드를 직접 실행해 평가 결과를 분석하거나 통계를 계산하게 해주는 도구
  • lessons.md · 에이전트가 실행 중 얻은 성공·실패 교훈을 스스로 기록해 두는 지속 메모리 파일
  • AdaEvolve · 전략을 이산적인 후보로 나눠 코드를 생성하고 최고를 고르는 방식의 기존 프로그램 진화 시스템, 비교 대상 베이스라인

저자 · Junbo Li, Boyi Liu, Canwen Xu, Yite Wang, Yuxiong He, Zhangyang Wang, Qiang Liu, Zhewei Yao

arXiv에서 원문 보기

최신 논문

논문 전체 보기 →

METAL MEDIA 최신 기사

그림 출처: Junbo Li et al., arXiv:2608.06714, CC BY 4.0