# 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  
**arXiv:** [2507.19457](https://arxiv.org/abs/2507.19457)  
**Date:** 2025-07-25  
**Summary page:** https://www.summarizepaper.com/en/paper/2507.19457v2/

## Key points

- Large language models (LLMs) are increasingly used in artificial intelligence tasks through reinforcement learning methods like Group Relative Policy Optimization (GRPO).
- Traditional methods require many rollouts to learn new tasks effectively.
- GEPA, a novel prompt optimizer, leverages natural language reflection to extract high-level rules from trial and error experiences.
- GEPA diagnoses issues, proposes and tests prompt updates, and integrates insights from its own attempts' Pareto frontier.
- GEPA achieves substantial quality gains with fewer rollouts compared to GRPO (up to 35 times less), outperforming it by an average of 6% and up to 20%.
- GEPA surpasses MIPROv2 by over 10%, showing notable achievements such as a 12% accuracy improvement on AIME-2025.
- The research has been accepted at ICLR 2026 for an oral presentation.
- The code for GEPA is openly available on GitHub with the authors including 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,and Omar Khattab.

## Summary

In the field of artificial intelligence, large language models (LLMs) are increasingly being utilized for various tasks through reinforcement learning methods such as Group Relative Policy Optimization (GRPO). However, these methods often require a significant number of rollouts to effectively learn new tasks. Recognizing the inherent interpretability of language as a rich learning medium for LLMs compared to sparse rewards, a team of researchers introduced , a novel prompt optimizer. GEPA leverages natural language reflection to extract high-level rules from trial and error experiences. By sampling trajectories and reflecting on them in natural language, GEPA diagnoses issues, proposes and tests prompt updates, and integrates valuable insights from the Pareto frontier of its own attempts. This unique design allows GEPA to achieve substantial quality gains even with just a few rollouts. Through rigorous testing across six tasks, GEPA has demonstrated superior performance compared to GRPO, outperforming it by an average of 6% and up to 20%, while using significantly fewer rollouts (up to 35 times less). Furthermore, GEPA surpasses MIPROv2, the leading prompt optimizer, by over 10%, showcasing notable achievements such as a 12% accuracy improvement on AIME-2025. Additionally, GEPA shows promise as an inference-time search strategy for code optimization. The research conducted by this team has been recognized with acceptance at ICLR 2026 (Oral presentation). The code for GEPA is openly available on GitHub at https://github.com/gepa-ai/gepa. The authors involved in this groundbreaking work include 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,and Omar Khattab.
