# GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning

- **ID:** 648
- **Kind:** paper
- **URL:** https://arxiv.org/abs/2507.19457
- **Authors:** 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
- **Venue:** arXiv / ICLR 2026
- **Published:** 2025
- **Source:** arxiv
- **Language:** en
- **Access:** free
- **License:** MIT (github.com/gepa-ai/gepa); arXiv preprint
- **License family:** Permissive (auto-classified)
- **Tags:** gepa, dspy, prompt-optimization, grpo, pareto, iclr-2026, berkeley, x
- **Topics:** prompt optimization, compound AI systems, DSPy
- **Added:** 2026-08-14
- **Verified:** 2026-08-14
- **Research status:** done
- **Needs deep evaluation:** no
- **Page:** https://papers.projxon.ai/entries/648

## Summary

GEPA (Genetic-Pareto; ICLR 2026 Oral). For a compound LLM system, sample traces, reflect with an LM on textual feedback (compiler errors, missed gold docs, constraint fails), mutate one module’s prompt, keep the candidate if the minibatch improves, and parent-sample from the instance-wise Pareto front instead of always mutating the global best. On Qwen3 8B across HotpotQA/IFBench/HoVer/PUPA/AIME-2025/LiveBench-Math: +9.62 pp vs baseline vs GRPO +3.68 pp at 24k rollouts, using ~4–35× fewer rollouts (aggregate ~3936). Also beats MIPROv2; GPT-4.1 Mini aggregate +12.19 pp. Code MIT gepa-ai/gepa; first-class dspy.GEPA. Discord post is Akshay Pachaar’s April 2026 X article “How to Beat GRPO Without Touching Model Weights” (DSPy cookbook; claims Berkeley beat GRPO by 10 points with 35× fewer rollouts).

## Attributes

- **Purpose:** Evolve module prompts with natural-language reflection and Pareto selection so compound systems improve with far fewer rollouts than GRPO
- **Scale:** Six tasks. GEPA rollout budgets ~1.8k–7.1k vs GRPO 24k. GitHub 6,117 stars / 508 forks at check. Article tweet ~356 likes / 40 retweets / ~169k views at fetch.
- **Time period:** arXiv 2507.19457 2025-07-25; v2 2026-02-14; ICLR 2026 Oral. X article 2026-04-30. Discord posted 2026-07-25. Repo created 2025-08-05.
- **Author type:** human

## From the source (fetched 2026-10-03)

- **Published:** Jul 25, 2025 (arXiv)
- **Last revised:** Feb 14, 2026 (arXiv)
- **arXiv categories:** cs.CL, cs.AI, cs.LG, cs.SE (arXiv)
- **Author comment:** Accepted to ICLR 2026 (Oral). Code: https://github.com/gepa-ai/gepa (arXiv)
- **Citations:** 466 (81 influential) (Semantic Scholar)
- **References:** 0 (Semantic Scholar)

## Abstract

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's design, it can often turn even just a few rollouts into a large quality gain. Across six tasks, GEPA outperforms GRPO by 6% 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% (e.g., +12% accuracy on AIME-2025), and demonstrates promising results as an inference-time search strategy for code optimization. We release our code at https://github.com/gepa-ai/gepa .

## Research notes

- Primary: arxiv abs 2507.19457. Discord/X article https://x.com/akshay_pachaar/status/2049916107923034300 via fxtwitter (empty tweet body; article id 2049896113206149120). Code https://github.com/gepa-ai/gepa (MIT). Docs https://dspy.ai/api/optimizers/GEPA/overview/. Artifact https://github.com/gepa-ai/gepa-artifact. Optimizer/code, not a hosted corpus, so no datasets_local row.

## Cited by, within this collection

- [Decentralized Multi-Agent Systems with Shared Context](https://papers.projxon.ai/entries/493) (paper 2026, #493)
- [NVIDIA-labs OO Agents: Native Python Object-Oriented Agents](https://papers.projxon.ai/entries/666) (paper 2026, #666)
- [Context Language Models](https://papers.projxon.ai/entries/793) (paper 2026, #793)
- [Reinforcement Learning Improves Traversal of Parametric Knowledge in LLMs](https://papers.projxon.ai/entries/808) (paper 2025, #808)
- [Physis-Lang: Self-Evolving Language as a Physical Representation for Video World Model](https://papers.projxon.ai/entries/810) (paper 2026, #810)
- [Agentic Context Engineering: Evolving Contexts for Self-Improving Language Models](https://papers.projxon.ai/entries/947) (paper 2025, #947)
- [Harness as a Language: A Minimalist Agent Framework With Maximal Expressivity](https://papers.projxon.ai/entries/1072) (paper 2026, #1072)
- [Mixture of Self-Improving Branches For Agent Harness Optimization](https://papers.projxon.ai/entries/1193) (paper 2026, #1193)

## Related entries

- Discussed in: [RL for language models after GRPO: fixes, costs, rewards, agents (overview)](https://papers.projxon.ai/entries/1207) (note, #1207)

## Similar entries

- [Reinforcement Learning for Code Optimization](https://papers.projxon.ai/entries/779) (paper, #779)
- [Atria Dawn: The Dawn of Agentic Superintelligence — On the Evolving Roles of Human–AI Collaboration](https://papers.projxon.ai/entries/1045) (paper, #1045)
- [Learning Adaptive Parallel Reasoning with Language Models](https://papers.projxon.ai/entries/552) (paper, #552)
- [ScientistTwo: Pioneering the Human Knowledge Frontier with Autonomous AI](https://papers.projxon.ai/entries/1046) (paper, #1046)
- [π-shaped Continual Learning on Qwen3.5-397B (SovereignAI claim)](https://papers.projxon.ai/entries/650) (thread, #650)
- [EasyPPO: Stabilizing the Critic Is Key](https://papers.projxon.ai/entries/792) (paper, #792)
