Lakshya says many teams lack the data, compute, or affordable rollouts needed for conventional training. Reinforcement learning often reduces a detailed rollout to a single reward, leaving useful information in tool calls, intermediate outputs, and error messages unused. GEPA uses an LLM to reflect on those traces and propose prompt changes.
Beating RL With Reflection: GEPA and Optimize Anything
Speaker
Lakshya A. Agrawal of GEPA presents at AI Engineer on using reflective optimization to improve prompts, agents, and other text-defined systems from rollout feedback.
GEPA combines reflection with evolutionary search and keeps candidates that perform well on any training example. Agrawal says that in one comparison, three data points and one reflection round produced twice the gains GRPO achieved after 25,000 rollouts. He also reports that Pareto-based selection contributed more than half of GEPA's gains across four benchmarks.
GEPA produces detailed instructions about a task, including lessons from examples and the role of each pipeline step. For an AMD NPU programming task, it raised an existing agent's score from 4.25% to 30.52% and identified that ADF.h should be avoided for that hardware generation. Agrawal also reports prompt gains of around 10% across question answering, instruction following, claim verification, and math.
Optimize Anything applies reflective search to anything that can be represented as text and scored, such as code, agent harnesses, numeric parameters, or scheduling policies. In an ARC-AGI example, 16 reflection rounds turned a four-line program into a six-step agent and raised Gemini Flash accuracy from 32.5% to 89.5%. On MATH-500, Agrawal says an automatically discovered two-step agent improved GPT-4.1 nano accuracy by 20%.
Agrawal describes using GEPA to create repository-specific coding skills from trajectories. On Go issue resolution, skills raised a GPT-5 Mini agent's performance from 24% to 93%; applying the skills to Claude Sonnet 4.5 reached 100% accuracy and cut resolution time nearly in half. For subjective tasks, he proposes annotating about 50 production traces, optimizing an LLM judge, then using that judge to improve the agent.
Takeaways
- Capture intermediate outputs, tool calls, and errors so optimizers can learn from more than final scores.
- Keep diverse strong candidates during search; retaining solutions that excel on different examples can avoid local optima.
- Treat prompts and agent harnesses as editable artifacts that can encode task-specific knowledge.
- Start with a small task set and an evaluator that returns both a score and useful diagnostic feedback.
- Turn production traces and human annotations into reusable evaluations and skills for continual improvement.
Mentioned in this talk
Search inside this talk
What was claimed 9
- featureGEPA: Uses an evolutionary loop and Pareto-based candidate selection.
“It uses an evolutionary loop along with a novel Pareto-based candidate selection”
YouTube Unverified1 source· Talk
- featureGEPA: Reflects on detailed textual rollout feedback to optimize prompts.
“a reflective prompt optimization technique for agents”
YouTube Unverified1 source· Talk
- metricGEPA: With three data points and one round of reflection, achieved twice the performance gains GRPO achieved after 25,000 rollouts.
“twice the performance gains that GPO got after 25,000 rollouts”
YouTube Unverified1 source· Talk
- metricGEPA: Improved an AMD NPU XDNA 2 task from 4.25% to 30.52%.
“pushed performance up 7x, to 30.52%”
YouTube Unverified1 source· Talk
- feature
Optimize Anything: Optimizes any text-based parameter when given problems, an evaluator, and available domain-specific side information.“a universal API for optimizing any text parameter in any domain”
YouTube Unverified1 source· Talk
- metric
Optimize Anything: Improved Gemini Flash ARC-AGI accuracy from 32.5% to 89.5% in 16 rounds of reflection.“took Gemini Flash's ARC-AGI accuracy from 32.5% to 89.5%”
YouTube Unverified1 source· Talk
- usesGEPA uses
Claude Sonnet
“we applied them to the latest Claude Sonnet”
YouTube Unverified1 source· Talk
- metricGEPA: Improved GPT-5 Mini repository issue resolution from 24% to 93%.
“take its performance from 24% to 93%”
YouTube Unverified1 source· Talk











