Skip to main content
arXiv is now an independent nonprofit! Learn more
archive
Search Submit Donate Log in
Press Enter to search · Advanced search

Computer Science > Computation and Language

arXiv:2507.19457v1 (cs)
[Submitted on 25 Jul 2025 (this version), latest version 14 Feb 2026 (v2)]

Title:GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning

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
View a PDF of the paper titled GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning, by Lakshya A Agrawal and 16 other authors
View PDF HTML (experimental)
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 can often provide a much richer learning medium for LLMs, compared with 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 system-level 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 four tasks, GEPA outperforms GRPO by 10% 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% across two LLMs, and demonstrates promising results as an inference-time search strategy for code optimization.
Subjects: Computation and Language (cs.CL); Artificial Intelligence (cs.AI); Machine Learning (cs.LG); Software Engineering (cs.SE)
ACM classes: I.2.7; I.2.6; I.2.4; I.2.8
Cite as: arXiv:2507.19457 [cs.CL]
  (or arXiv:2507.19457v1 [cs.CL] for this version)
  https://doi.org/10.48550/arXiv.2507.19457
arXiv-issued DOI via DataCite

Submission history

From: Lakshya A Agrawal [view email]
[v1] Fri, 25 Jul 2025 17:42:32 UTC (1,632 KB)
[v2] Sat, 14 Feb 2026 11:42:30 UTC (1,650 KB)
Full-text links:

Access Paper:

    View a PDF of the paper titled GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning, by Lakshya A Agrawal and 16 other authors
  • View PDF
  • HTML (experimental)
  • TeX Source
view license

Current browse context:

cs.CL
< prev   |   next >
new | recent | 2025-07
Change to browse by:
cs
cs.AI
cs.LG
cs.SE

References & Citations

  • NASA ADS
  • Google Scholar
  • Semantic Scholar
Loading...

BibTeX formatted citation

Data provided by:

Bookmark

BibSonomy Reddit

Bibliographic and Citation Tools

Bibliographic Explorer (What is the Explorer?)
Connected Papers (What is Connected Papers?)
Litmaps (What is Litmaps?)
scite Smart Citations (What are Smart Citations?)

Code, Data and Media Associated with this Article

alphaXiv (What is alphaXiv?)
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub (What is DagsHub?)
Gotit.pub (What is GotitPub?)
Hugging Face (What is Huggingface?)
ScienceCast (What is ScienceCast?)

Demos

Replicate (What is Replicate?)
Hugging Face Spaces (What is Spaces?)
TXYZ.AI (What is TXYZ.AI?)

Recommenders and Search Tools

Influence Flower (What are Influence Flowers?)
CORE Recommender (What is CORE?)
  • Author
  • Venue
  • Institution
  • Topic

arXivLabs: experimental projects with community collaborators

arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.

Which authors of this paper are endorsers? | Disable MathJax (What is MathJax?)
We gratefully acknowledge support from our major funders, member institutions, , and all contributors.
About · Help · Contact · Subscribe · Copyright · Privacy · Accessibility · Operational Status (opens in new tab)
Major funding support from
Simons Foundation Simons Foundation International Schmidt Sciences