GO TO A SECTION

↑ ↓ to navigate · Enter to openExplore all sections →
FDEInterviews logo
ICLR 2026 (Oral)

GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning

A prompt optimizer that reads its failures in plain language, rewrites one module's prompt at a time, and keeps every prompt that wins somewhere. It beat GRPO on five of six tasks with fewer rollouts.

Breakdown by FDE Interviews · 15 min read · Updated

About the original · 2025
AUTHORS
Agrawal, Tan, Soylu, Ziems, et al.
FROM
UC Berkeley, Stanford, BespokeLabs.ai, Notre Dame, Databricks, MIT
PUBLISHED
Jul 2025 · ICLR 2026 (Oral)
CITED BY
572Semantic Scholar · Oct 2026
IN THIS BREAKDOWN · 10 SECTIONS

You can read 19% of this breakdown.

01

The paper in one minute

When a team wants an LLM system to get better at a task, one option is reinforcement learning on the weights, for example GRPO, which turns each attempt into a single number and needs many thousands of attempts. Lakshya Agrawal, Omar Khattab, Matei Zaharia and colleagues at UC Berkeley, Stanford, Databricks, MIT and elsewhere argue that this throws information away. An attempt by an LLM system is a readable transcript: the instructions, the reasoning, the tool calls, and often the evaluator's own explanation, like a compiler error or a list of missing documents. A model can read that and work out what to change.

GEPA (Genetic-Pareto) is a prompt optimizer built on that idea. It works on compound systems with several LLM modules, such as a multi-hop retriever with a query writer and a summarizer. Each iteration it picks a candidate set of prompts, runs it on a minibatch of three training examples while recording traces, and calls a feedback function that returns a score plus text. A reflection model reads the current prompt, the traces and the feedback for one module, chosen in turn, and writes an improved prompt. If the new version scores better on the same three examples, it is evaluated on a validation set and added to the pool.

The second idea is how it picks what to improve next. Always mutating the best candidate tends to get stuck on one strategy. GEPA keeps every candidate that is best on at least one validation task, drops those that are dominated, and samples in proportion to how many tasks each one leads. An optional merge step combines modules from lineages that improved different parts of the system.

The prompts it finds are detailed task instructions. On six benchmarks with Qwen3 8B it beat GRPO, trained with 24,000 rollouts, on five, while using 1,839 to 7,051. With GPT-4.1 Mini it beat the prompt optimizers MIPROv2, TextGrad and Trace on every benchmark, and its prompts were up to 9.2 times shorter than MIPROv2's. The paper was accepted as an oral at ICLR 2026.

THE IDEA, VISUALLY
ONE GEPA ITERATION 1 Select from the Pareto front any candidate that is best on at least one validation task 2 Run on a minibatch of 3, keep the traces reasoning, tool calls, tool outputs for each module 3 Feedback function µf: score + text compiler errors · documents still missing · PII leaked · which constraints failed 4 Reflection LM rewrites one module's prompt modules taken in turn; lessons accumulate down the lineage 5 Better on the minibatch? Score on validation, add to pool most of the rollout budget is spent here Greedy selection (always the current best) stalled after one improvement in the authors' example. Keeping per-task winners kept other lineages alive: +12.44 aggregate against +6.05 greedy and +5.11 beam search on four tasks (Table 3). QWEN3 8B TEST SCORES (TABLE 1) HotpotQA GEPA 6,871 rollouts 43.33 55.33 62.33 baseline 42.33 IFBench GEPA 3,593 rollouts 35.88 36.22 38.61 baseline 36.90 HoVer GEPA 7,051 rollouts 38.67 47.33 52.33 baseline 35.33 PUPA GEPA 2,426 rollouts 86.66 81.55 91.85 baseline 80.82 AIME-2025 GEPA 1,839 rollouts 38.00 20.00 32.00 baseline 27.33 LiveBench-Math GEPA 1,839 rollouts 51.26 46.60 51.95 baseline 48.70 GRPO, 24,000 rollouts MIPROv2 GEPA GRPO won AIME (30 problems, each run 5 times). Merge, not shown, fell to 28.23 on IFBench, below the baseline.
GEPA turns each rollout into text a model can reason about, including why the evaluator said no, and keeps a pool of prompts that each win on some task. With Qwen3 8B it beat GRPO's 24,000-rollout training on five of six benchmarks using 1,839 to 7,051 rollouts.
Research notes: the problem, approach and results
+9.62

aggregate points over the unoptimized Qwen3 8B system, against +3.68 for GRPO with 24,000 rollouts

+12.19

aggregate points over baseline with GPT-4.1 Mini, against +5.64 for MIPROv2

17–92

calls to the reflection model per optimization run, across the six benchmarks and two models

THE PROBLEM

Adapting an LLM system to a task with reinforcement learning such as GRPO takes tens of thousands of rollouts and access to the weights. Many deployments have neither: tool calls are expensive and the best models are closed.

THE IDEA

Optimize the prompts instead. Run the system on a few examples, collect the traces and the evaluator's explanation, let a model reflect and rewrite one module's prompt, and keep a Pareto pool of candidates that are best on at least one task, so the search does not collapse onto one idea.

THE RESULT

With Qwen3 8B, GEPA beat GRPO on five of six tasks by 0.7 to 19 points, losing on AIME, with 3.4 to 13 times fewer rollouts. With GPT-4.1 Mini it beat MIPROv2, TextGrad and Trace on every benchmark, with shorter prompts.

02

Why it matters to an FDE

Most customer deployments use a model you cannot fine-tune, on tasks where every attempt costs a tool call or an API bill. GEPA is designed for exactly that: a few hundred to a few thousand attempts, no weight updates, and an output you can read and review before shipping, because it is a prompt.

Your evaluator is the lever. GEPA learns from the explanation, not just the score. A feedback function that says "the answer cited a document not in the retrieved set" or "the response leaked the customer's account number" gives the reflection model something to fix. If your evaluator returns only pass or fail, you have thrown away most of what makes this method work.

The optimized prompt is an artifact to review. It is a page of instructions. Read it, check it against policy and the customer's terms, and version it like code. Tuning a prompt changes the system's behavior just as a code change does.

Prompt changes transfer. Prompts optimized with Qwen3 8B improved GPT-4.1 Mini by 9 aggregate points without changes, more than the other optimizers achieved working on GPT-4.1 Mini directly. That makes a cheap model a reasonable place to start an optimization.

Keep a held-out test set. GEPA selects on a validation set it scores repeatedly. The paper's numbers are on separate test sets, and yours should be too.

THE FULL BREAKDOWN

Understand the mechanism. Try it on a real problem.

Unlock this breakdown and 99 more papers.

Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.

6 months · One payment · No auto-renewal

Get Premium · ₹2,000 / $25
  • ◇1 architecture diagram
  • </>1 runnable code experiment
  • ▦2 results tables
  • ?5 interview questions with answers
  1. 03Key takeaways

    The loop, the feedback function, Pareto selection, results, and misreadings to avoid

    Free account
  2. 04How it works

    The algorithm step by step, the feedback function, Pareto sampling, merge, and the setup

    Premium
  3. 05The numbers that matter

    Where the gains are large, where they are noise, and what the rollouts and dollars were

    Premium
  4. 06Try it yourself

    A miniature optimizer with a trap: scalar vs reflective proposals, greedy vs Pareto selection

    Premium
  5. 07Where it breaks

    The limits of reflective prompt optimization and of the comparison with GRPO

    Premium
  6. 08Using it on a deployment

    Running a GEPA-style optimization on a customer system, from evaluator to rollout

    Premium
  7. 09Interview angles

    Five questions this paper prepares you for, with answer hints

    Premium
Back to the paper library →