GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning

handfuloflight2 pts0 comments

[2507.19457] GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning

Skip to main content

arXiv is now an independent nonprofit!<br>Learn more<br>&times;

Search arXiv

Press Enter to search &middot; Advanced search

-->

Computer Science > Computation and Language

arXiv:2507.19457 (cs)

[Submitted on 25 Jul 2025 (v1), last revised 14 Feb 2026 (this version, 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<br>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

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 this https URL .

Comments:<br>Accepted to ICLR 2026 (Oral). Code: this https URL

Subjects:

Computation and Language (cs.CL); Artificial Intelligence (cs.AI); Machine Learning (cs.LG); Software Engineering (cs.SE)

ACM classes:<br>I.2.7; I.2.6; I.2.4; I.2.8

Cite as:<br>arXiv:2507.19457 [cs.CL]

(or<br>arXiv:2507.19457v2 [cs.CL] for this version)

https://doi.org/10.48550/arXiv.2507.19457

Focus to learn more

arXiv-issued DOI via DataCite

Submission history<br>From: Lakshya A Agrawal [view email]<br>[v1]<br>Fri, 25 Jul 2025 17:42:32 UTC (1,632 KB)

[v2]<br>Sat, 14 Feb 2026 11:42:30 UTC (1,650 KB)

Full-text links:<br>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<br>View PDF<br>TeX Source

view license

Current browse context:

cs.CL

next >

new<br>recent<br>| 2025-07

Change to browse by:

cs<br>cs.AI<br>cs.LG<br>cs.SE

References & Citations

NASA ADS<br>Google Scholar

Semantic Scholar

export BibTeX citation<br>Loading...

BibTeX formatted citation

&times;

loading...

Data provided by:

Bookmark

Bibliographic Tools

Bibliographic and Citation Tools

Bibliographic Explorer Toggle

Bibliographic Explorer (What is the Explorer?)

Connected Papers Toggle

Connected Papers (What is Connected Papers?)

Litmaps Toggle

Litmaps (What is Litmaps?)

scite.ai Toggle

scite Smart Citations (What are Smart Citations?)

Code, Data, Media

Code, Data and Media Associated with this Article

alphaXiv Toggle

alphaXiv (What is alphaXiv?)

Links to Code Toggle

CatalyzeX Code Finder for Papers (What is CatalyzeX?)

DagsHub Toggle

DagsHub (What is DagsHub?)

GotitPub Toggle

Gotit.pub (What is GotitPub?)

Huggingface Toggle

Hugging Face (What is Huggingface?)

ScienceCast Toggle

ScienceCast (What is ScienceCast?)

Demos

Demos

Replicate Toggle

Replicate (What is Replicate?)

Spaces Toggle

Hugging Face Spaces (What is Spaces?)

Spaces Toggle

TXYZ.AI (What is TXYZ.AI?)

Related Papers

Recommenders and Search Tools

Link to Influence Flower

Influence Flower (What are Influence Flowers?)

Core recommender toggle

CORE Recommender (What is CORE?)

Author

Venue

Institution

Topic

About arXivLabs

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? |<br>Disable MathJax (What is...

toggle gepa arxiv prompt learning code

Related Articles