IN THIS BREAKDOWN · 10 SECTIONS
You can read 19% of this breakdown.
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.
Research notes: the problem, approach and results
aggregate points over the unoptimized Qwen3 8B system, against +3.68 for GRPO with 24,000 rollouts
aggregate points over baseline with GPT-4.1 Mini, against +5.64 for MIPROv2
calls to the reflection model per optimization run, across the six benchmarks and two models
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.
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.
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.
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.
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
- ◇1 architecture diagram
- </>1 runnable code experiment
- ▦2 results tables
- ?5 interview questions with answers
- 03Key takeaways
The loop, the feedback function, Pareto selection, results, and misreadings to avoid
Free account - 04How it works
The algorithm step by step, the feedback function, Pareto sampling, merge, and the setup
Premium - 05The numbers that matter
Where the gains are large, where they are noise, and what the rollouts and dollars were
Premium - 06Try it yourself
A miniature optimizer with a trap: scalar vs reflective proposals, greedy vs Pareto selection
Premium - 07Where it breaks
The limits of reflective prompt optimization and of the comparison with GRPO
Premium - 08Using it on a deployment
Running a GEPA-style optimization on a customer system, from evaluator to rollout
Premium - 09Interview angles
Five questions this paper prepares you for, with answer hints
Premium - 10Read next
Where to go from here on this site
Premium
