GEPA: 반영적 프롬프트 진화가 강화 학습을 능가할 수 있다
GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning
July 25, 2025
저자: Lakshya A Agrawal, Shangyin Tan, Dilara Soylu, Noah Ziems, Rishi Khare, Krista Opsahl-Ong, Arnav Singhvi, Herumb Shandilya, Michael J Ryan, Meng Jiang, Christopher Potts, Koushik Sen, Alexandros G. Dimakis, Ion Stoica, Dan Klein, Matei Zaharia, Omar Khattab
cs.AI
초록
대규모 언어 모델(LLMs)은 그룹 상대 정책 최적화(GRPO)와 같은 강화 학습(RL) 방법을 통해 다운스트림 작업에 점점 더 적응되고 있으며, 이는 새로운 작업을 학습하기 위해 수천 번의 롤아웃을 요구하는 경우가 많다. 우리는 언어의 해석 가능한 특성이 희소하고 스칼라 형태의 보상에서 도출된 정책 그래디언트에 비해 LLMs에게 훨씬 풍부한 학습 매체를 제공할 수 있다고 주장한다. 이를 검증하기 위해, 우리는 자연어 반영을 철저히 통합하여 시행착오를 통해 고수준 규칙을 학습하는 프롬프트 최적화 도구인 GEPA(Genetic-Pareto)를 소개한다. 하나 이상의 LLM 프롬프트를 포함하는 모든 AI 시스템에 대해, GEPA는 시스템 수준의 궤적(예: 추론, 도구 호출, 도구 출력)을 샘플링하고 이를 자연어로 반영하여 문제를 진단하고, 프롬프트 업데이트를 제안 및 테스트하며, 자체 시도의 파레토 프론티어에서 상호 보완적인 교훈을 결합한다. GEPA의 설계 덕분에, 단 몇 번의 롤아웃만으로도 큰 품질 향상을 이끌어낼 수 있다. 네 가지 작업에서 GEPA는 GRPO보다 평균 10%, 최대 20% 더 나은 성능을 보였으며, 최대 35배 적은 롤아웃을 사용했다. 또한 GEPA는 두 가지 LLM에서 선도적인 프롬프트 최적화 도구인 MIPROv2를 10% 이상 앞섰으며, 코드 최적화를 위한 추론 시간 검색 전략으로서도 유망한 결과를 보여주었다.
English
Large language models (LLMs) are increasingly adapted to downstream tasks via
reinforcement learning (RL) methods like Group Relative Policy Optimization
(GRPO), which often require thousands of rollouts to learn new tasks. We argue
that the interpretable nature of language can often provide a much richer
learning medium for LLMs, compared with policy gradients derived from sparse,
scalar rewards. To test this, we introduce GEPA (Genetic-Pareto), a prompt
optimizer that thoroughly incorporates natural language reflection to learn
high-level rules from trial and error. Given any AI system containing one or
more LLM prompts, GEPA samples system-level trajectories (e.g., reasoning, tool
calls, and tool outputs) and reflects on them in natural language to diagnose
problems, propose and test prompt updates, and combine complementary lessons
from the Pareto frontier of its own attempts. As a result of GEPA's design, it
can often turn even just a few rollouts into a large quality gain. Across four
tasks, GEPA outperforms GRPO by 10% on average and by up to 20%, while using up
to 35x fewer rollouts. GEPA also outperforms the leading prompt optimizer,
MIPROv2, by over 10% across two LLMs, and demonstrates promising results as an
inference-time search strategy for code optimization.