arxiv-2507-19457 SRC-0080 · paperGEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning
Lakshya A Agrawal, Shangyin Tan, Dilara Soylu, Noah Ziems, Rishi Khare, Krista Opsahl-Ong, Arnav Singhvi, Herumb Shandilya
Created: 2025-07-25 · Ingested: 2026-09-14
https://arxiv.org/abs/2507.19457(opens in a new tab)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 often provides a much richer learning medium for LLMs, compared to 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 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'…
In brief
Evolving prompts by having an LLM read its own execution traces in natural language can beat weight-space RL on the same task, using orders of magnitude fewer rollouts. That cuts against the assumption that verifiable-reward RL is the default route to task adaptation.
GEPA (Genetic-Pareto) mutates module prompts in a compound AI system from reflection on rollout and evaluation traces (including compiler errors and per-hop feedback), and keeps a per-instance Pareto front of candidates rather than greedily refining the best one. It was tested on HotpotQA, IFBench, HoVer, PUPA, AIME-2025 and LiveBench-Math with Qwen3 8B and GPT-4.1 Mini against GRPO (LoRA, 24,000 rollouts), MIPROv2, TextGrad and Trace.
On Qwen3 8B, GEPA aggregates 54.85 vs GRPO's 48.91 and a 45.23 baseline, beating GRPO on 5 of 6 tasks and up to 35x fewer rollouts; on IFBench it hit 38.61 after 678 rollouts vs GRPO's 35.88. On GPT-4.1 Mini, +12.19 vs MIPROv2's +5.64. Prompts optimized on Qwen3 8B transferred to GPT-4.1 Mini for +9.00.
The Pareto selector is isolated by an ablation holding the evolution harness fixed: +12.44 vs +6.05 greedy and +5.11 beam search. GRPO used LoRA rather than full finetuning in the main table.
GEPA loses on AIME with Qwen3 8B, and the Merge variant degrades Qwen3 8B (IFBench 28.23). Code-optimization results (NPUEval 30.52% mean utilization vs 4.25% for Sequential10, KernelBench over 20% fast_1 on 35 tasks) are self-described as preliminary.
If you have a small rollout budget and cannot finetune, try reflective prompt evolution before RL.
Written from the abstract by claude-opus-5 on 2026-09-15, with every figure checked against it. Not a substitute for the paper.
Referenced by
Claims in this catalog that draw on this source, and whether as support or counterpoint.
No claims cite this yet.