Beating RL With Reflection: GEPA and Optimize Anything — Lakshya A. Agrawal, GEPA
AI Engineer World's Fair 2026 · 21:27
Organization in the AI Engineer archive
Conference talks featuring speakers affiliated with GEPA when their sessions were recorded.
GEPA’s official project site documents an open-source system for reflective optimization: improving prompts and other text artifacts using evaluation scores together with execution feedback. It provides examples, adapters, tutorials and an API for integrating that search into AI systems. This recording by Lakshya A. Agrawal is worth reading for its explanation of how diagnostic traces become concrete edits, why candidate diversity matters, and how the editable object can expand from a prompt to an entire agent program. The project documentation establishes GEPA’s scope; the recording supplies speaker-reported demonstrations, not independently verified performance guarantees.
Agrawal starts with scarce domain data and expensive agent rollouts. In the reinforcement-learning setup he describes, a reward compresses an attempt into a scalar, leaving tool responses, intermediate outputs and error messages outside that learning signal. GEPA instead asks a model to inspect those traces and propose a prompt change. In his presented comparison, one reflection round on three examples delivered twice the performance gains of GRPO after 25,000 rollouts, without an external expert teacher. This is a particular reported comparison: the supplied recording does not establish complete evaluation protocols or dataset splits. The official site explicitly positions GEPA as complementary to RL and fine-tuning, and says gradient-based methods remain effective when data and cheap rollouts are abundant.
The learned prompt can describe how to interpret inputs and what a pipeline stage should accomplish. A multihop question-answering example teaches second-hop retrieval to find information related to the entity or aspect covered by first-hop documents. In an AMD NPU coding example, Agrawal reports roughly 4% to 30% performance after changing only the prompt. One discovered restriction was to avoid a library header unsuitable for the hardware generation being tested. That instruction illustrates actionable domain knowledge; the demonstration does not isolate its contribution to the overall gain. The rounded percentages avoid an ambiguous duplicated baseline in the unreviewed captions.
GEPA runs candidates on examples, collects feedback and proposes revisions, while retaining candidates with strengths on individual examples rather than only the highest aggregate scorer. Agrawal contrasts this with a simple improvement loop that repeatedly revisits one incumbent until its search budget is exhausted. Across four benchmarks, he attributes more than half of GEPA’s gains to candidate selection and reports almost twice the gains of the simple loop. The official documentation also describes merging complementary Pareto-optimal candidates. The useful distinction is between feedback that guides an edit and example-level results that preserve alternative search paths.
Optimize Anything extends reflection to text-representable candidates such as code, numeric parameters, agent harnesses and scheduling policies. Its evaluator returns a score plus actionable side information: compiler errors, profiling results, tool failures, documentation or expert feedback. Agrawal distinguishes solving one instance, searching across related tasks and learning an artifact intended to generalize to new problems. The 3D unicorn example illustrates optimization of an image-producing Python program, but the recording does not explain its visual fitness function. These examples make the integration requirement concrete: define the objective and expose diagnostics that can explain how a candidate should change.
In the ARC-AGI demonstration, Agrawal reports evolving a four-line program into a six-step agent over 16 reflection rounds, raising Gemini Flash accuracy from 32.5% to 89.5%. The resulting agent induces rule hypotheses, synthesizes code, executes and traces it, debugs and revises it, then returns results on test inputs. A separate Go repository example reports learned skills raising a GPT-5 mini coding agent from 24% to 93%. Those skills capture repository structure, test commands and build knowledge. Agrawal reports transfer to Claude Sonnet, with 100% resolution on the tested issues and almost half the resolution time. These are bounded demonstrations; neither the percentages nor the transfer result establish general performance across repositories.
For subjective tasks, Agrawal proposes detailed human annotations on about 50 production trajectories to optimize an LLM judge prompt, then using that judge to guide agent improvement. This makes the human quality standard part of the optimization process without establishing that the learned judge is universally reliable. He also reports almost 35% lower OCR error rates and a Databricks example with an open model outperforming Claude Opus at 90 times lower cost. The official page separately lists 38% OCR error reduction; the supplied sources do not establish that these figures describe the same evaluation. The ending briefly introduces co-optimization of weights and prompt harnesses through “Learning, Fast and Slow,” without explaining the update procedure. Agrawal closes by urging practitioners to surface actionable domain information; his framework and model integration claims should be read alongside that requirement.
AI Engineer World's Fair 2026 · 21:27
Affiliations reflect their AIE appearances, not necessarily current employment.