GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning
GEPA (Genetic-Pareto) is a sample-efficient alternative to RL post-training for adapting LLMs to downstream tasks: instead of running thousands of GRPO/RLVR rollouts and propagating sparse scalar rewards through policy gradients, it samples a few trajectories, has an LLM read them in natural language to diagnose what went wrong, and proposes targeted prompt edits — kept and combined under a Pareto-front genetic algorithm. The argument is that natural-language reflection on full execution traces (reasoning, tool calls, evaluation feedback) is a richer learning signal than a scalar reward. GEPA is published as part of the DSPy ecosystem and accepted as an ICLR 2026 Oral.
Key claims
Section titled “Key claims”- Reflective prompt mutation is the core primitive: an LLM is given a trajectory (reasoning chain, tool calls, tool outputs, evaluator feedback) and asked to diagnose problems and propose an updated instruction prompt [§Abstract, Fig. 1].
- Pareto-based candidate selection over the population of prompts maintains diversity along multiple performance dimensions, preventing collapse onto a single brittle high-scoring prompt [§Method, Fig. 3].
- GEPA outperforms GRPO and the prior DSPy optimizer MIPROv2 in final test-set score on the reported benchmarks, while using substantially fewer rollouts [§Results, Fig. 1].
- The optimizer operates on any AI system containing one or more LLM prompts — including multi-module pipelines with reasoning, tool calls, and retrieval — i.e. it’s a system-level prompt optimizer, not a single-instruction optimizer [§Abstract].
- The argument that language is a richer learning medium than scalar rewards is explicit: full textual traces carry diagnostic information (what step failed, why) that policy gradients destroy when collapsing trajectories to a number [§Introduction].
Method
Section titled “Method”GEPA wraps three components into a loop. (1) Genetic prompt evolution: maintain a population of candidate prompts; each generation samples parents and produces offspring via mutation. (2) Reflective mutation: instead of random or template-based edits, a reflector LLM is shown a sampled execution trajectory of a parent prompt — including the model’s reasoning, the tool calls it made, tool outputs, and the evaluator’s textual feedback — and is asked to propose an improved prompt that addresses the observed failure mode. (3) Pareto selection: candidates are not ranked by a single score but kept on a Pareto front across multiple performance axes (per-task subscores, cost, etc.), with offspring inheriting from points on the front. The loop terminates on a rollout budget. The system is implemented inside DSPy and is the algorithm behind dspy.GEPA; the paper’s code is at github.com/gepa-ai/gepa.
Results
Section titled “Results”The headline plot ([Fig. 1]) shows GEPA learning much faster than GRPO and reaching a higher final score, with the gap holding on held-out test sets. The paper benchmarks on multi-hop QA, math, and tool-use tasks via DSPy; absolute numbers are reported per task and the paper was accepted at ICLR 2026 (Oral). The qualitative claim — that the gap is largest when reward signal is sparse and traces are informative — is presented as the explanation for why language-mediated optimization beats policy gradients in this regime.
Why it’s interesting
Section titled “Why it’s interesting”The most direct connection on the wiki is Training-Free Group Relative Policy Optimization (Training-Free GRPO), which makes a very similar argument: keep the LLM frozen, do the “learning” in natural-language context space rather than parameter space, and use group-relative reflection over a small number of rollouts to extract the lesson. GEPA is the genetic / Pareto-search variant of the same idea, predating Training-Free GRPO and now central to DSPy’s optimization stack. The Reasoning RL concept page already explicitly raises this — Yuandong Tian’s RSI talk (History May Repeat Itself: RSI Seen from a Previous AI Era) lists “Is RL the best strategy?” as an open question and names AlphaEvolve and Training-Free GRPO as candidates; GEPA is the missing third point on that line and the most production-deployed of the three. Compared to Data-driven prompt optimizer (Vertex AI) (Vertex AI’s productized automatic prompt optimizer), GEPA is the open, system-level research version: same goal — better prompts via an LLM-in-the-loop optimizer — but with reflection-on-traces (not just score-on-outputs) as the mutation signal and Pareto selection instead of a single score.
See also
Section titled “See also”- Training-Free Group Relative Policy Optimization — closest cousin: keeps the model frozen and does “RL” in natural-language context space; GEPA does the analogous thing under a genetic/Pareto scaffold.
- Reasoning RL — the concept page where the “is RL the right primitive?” framing lives; GEPA is the canonical non-RL alternative.
- History May Repeat Itself: RSI Seen from a Previous AI Era — Tian’s RSI talk that explicitly raises RL-vs-evolution-vs-search as the open RSI design question.
- Data-driven prompt optimizer (Vertex AI) — productized automatic prompt optimizer; same goal, simpler (score-based) mutation signal.
- Zero-shot prompt optimizer (Vertex AI) — real-time counterpart of the Vertex batch optimizer.