ChatPaper.aiChatPaper

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)は、Group Relative Policy Optimization(GRPO)のような強化学習(RL)手法を介して下流タスクに適応されることが増えているが、新しいタスクを学習するためには数千回のロールアウトを必要とすることが多い。我々は、言語の解釈可能な性質が、疎なスカラー報酬から導かれるポリシー勾配と比較して、LLMsにとってより豊かな学習媒体を提供し得ると主張する。これを検証するため、我々はGEPA(Genetic-Pareto)を導入する。これは、試行錯誤から高レベルのルールを学習するために、自然言語による反省を徹底的に取り入れたプロンプト最適化ツールである。1つ以上のLLMプロンプトを含む任意のAIシステムに対して、GEPAはシステムレベルの軌跡(例:推論、ツール呼び出し、ツール出力)をサンプリングし、自然言語でそれらを反省して問題を診断し、プロンプトの更新を提案・テストし、自身の試みのパレートフロンティアから得られた補完的な教訓を組み合わせる。GEPAの設計により、わずか数回のロールアウトでも大きな品質向上をもたらすことが多い。4つのタスクにおいて、GEPAはGRPOを平均10%、最大20%上回り、最大35倍少ないロールアウトでこれを達成した。また、GEPAは主要なプロンプト最適化ツールであるMIPROv2を2つのLLMにおいて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.
PDF163July 28, 2025