Suggested title: "GEPA: The Open-Source Framework That Makes Prompt Engineering Obsolete"

Word count: ~2,400


You know that feeling when you spend hours tweaking a prompt, swapping words around, adding instructions, praying to the LLM gods — and the model still gets it wrong? GEPA says: stop doing that. Let the machine do it.

GEPA (Genetic-Pareto) is an open-source framework that uses LLM-based reflection and evolutionary search to automatically optimize any text artifact. Prompts, code, agent architectures, scheduling heuristics — if it's text and you can evaluate it, GEPA can optimize it. And it claims to do it 90x cheaper and 35x faster than reinforcement learning.

Shopify, Databricks, and Dropbox are already using it. The paper won an oral presentation at ICLR 2026. The GitHub repo has over 5,200 stars. Let's dig into what's actually happening here.

The Problem: RL Is Expensive and Blind

Reinforcement learning methods like GRPO have become the default way to adapt large language models to new tasks. The problem? They're gluttons for compute. A typical GRPO training run needs anywhere from 100,000 to 500,000 rollouts. That's hundreds of thousands of calls through your model just to nudge a prompt in the right direction.

Worse, RL treats your system as a black box. It knows a candidate scored 0.4 out of 1.0. It doesn't know why. Was it a formatting error? A reasoning failure? A missing constraint? Without diagnostic information, RL brute-forces its way through the search space, trying random variations until something sticks.

This is fine if you have infinite compute and a research lab budget. For everyone else — teams deploying production AI systems, startups watching their API bills, enterprises trying to get small models to punch above their weight — it's a dealbreaker.

How GEPA Works: Diagnosis, Not Trial and Error

GEPA flips the optimization paradigm. Instead of collapsing execution data into a single score and blindly searching, it reads the full execution trace and reasons about what went wrong.

Here's the five-step cycle:

1. Select. Pick a candidate from the Pareto frontier — the set of solutions that each represent the best trade-off across different evaluation instances. Candidates that are the sole best on many examples get sampled more often, balancing exploitation with exploration.

2. Execute. Run the candidate on a small minibatch (default: just 2 examples). Capture everything — the prompt, the model's reasoning steps, tool calls, outputs, error messages, and evaluator feedback. GEPA calls this Actionable Side Information, or ASI.

3. Reflect. A strong LLM (the "reflection" model) reads those execution traces and diagnoses failures in natural language. Not "you scored 6 out of 10." More like "you failed on examples requiring multi-step arithmetic because the prompt doesn't establish intermediate verification."

4. Mutate. Using the reflection insights plus an accumulated log of lessons from all previous iterations, the LLM generates an improved candidate. This is targeted, informed improvement — not random mutation. GEPA also supports system-aware merge, which takes two strong candidates excelling on different problem types and intelligently combines their strengths.

5. Accept. If the new candidate improves on at least one evaluation instance without regressing on others, it joins the Pareto front. If an existing candidate is now dominated, it drops off. The frontier only grows with genuinely complementary solutions.

The key insight is that ASI — Actionable Side Information — is the text-optimization equivalent of a gradient. When your "parameters" are natural language, numerical gradients don't exist. Error messages, reasoning traces, and structured evaluator feedback fill that gap. They convert "you scored 72%" into rich, directional information that the reflecting LLM can use to make precise, informed edits.

The Results: The Numbers Are Absurd

Let's talk benchmarks.

Against GRPO: GEPA outperforms GRPO by 10% on average and up to 20% on the best task. It does this with 100-500 evaluations compared to GRPO's 24,000. That's a 35x reduction in rollouts.

Against MIPROv2: GEPA beats DSPy's previous best optimizer by over 13% aggregate across tasks, and by 12% on AIME 2025 math problems.

AIME 2025: GPT-4.1 Mini went from 46.6% to 56.6% — a 10-point jump on one of the hardest math benchmarks — through prompt optimization alone. No fine-tuning, no architecture changes, just a better prompt discovered by GEPA.

MATH benchmark: 93% accuracy with a ChainOfThought program, up from 67% baseline. A 26-point improvement from instruction refinement alone.

ARC-AGI agent accuracy: 32% to 89%. This wasn't just prompt tuning — GEPA discovered entirely new agent architectures that nearly tripled accuracy.

Cloud scheduling: 40.2% cost savings, beating hand-crafted expert heuristics. GEPA found scheduling policies that human experts hadn't considered.

Coding agent skills: Resolve rate on Jinja tasks went from 55% to 82%. The agent literally taught itself new capabilities through GEPA-optimized prompts.

And the cost story: Databricks used GEPA to make an open-source model beat Claude Opus 4.1 at 90x lower cost. An open-source model, optimized by GEPA, matched one of the most expensive frontier models available — for pennies on the dollar.

The Production Evidence

Fifty-plus production deployments. Shopify, Databricks, Dropbox, OpenAI, Pydantic, MLflow. Shopify's CEO Tobi Lutke said on Twitter: "Both DSPy and GEPA are currently severely under hyped." Drew Houston, CEO of Dropbox, also praised it publicly.

Databricks published a detailed blog validating GEPA's findings, showing that GPT-OSS 20B optimized with GEPA can beat GPT-OSS 120B and reach Claude 4 Sonnet performance levels. A single light GEPA run takes 15-20 minutes and costs about $10.

These aren't cherry-picked academic benchmarks. These are real systems, real workloads, and real cost savings deployed in production.

Why This Matters: The Economics of AI in 2026

The AI industry is caught in a tension. Frontier models deliver incredible performance, but at eye-watering cost. Every API call to Claude Opus or GPT-4 at scale adds up fast.

GEPA shifts the value from "which model do you use" to "how well have you optimized your system." A carefully optimized small model can match or beat a carelessly used frontier model. That has massive implications:

  • Startups can build production AI without burning venture capital on API bills
  • Enterprise teams can deploy AI internally without budget battles over frontier model access
  • Open-source advocates get a concrete, measurable argument for why open models matter
  • Cost becomes a design choice, not a constraint — pick your performance target and GEPA finds the cheapest way to hit it

The 35x speedup matters too. RL-based optimization can take days or weeks. GEPA converges in hours. Faster iteration cycles, more experiments, quicker time to production.

Getting Started

GEPA is available two ways: as a standalone library (pip install gepa) and integrated directly into DSPy as dspy.GEPA.

The standalone version gives you a simple API:

import gepa

trainset, valset, _ = gepa.examples.aime.init_dataset()

result = gepa.optimize(
    seed_candidate={"system_prompt": "You are a helpful assistant..."},
    trainset=trainset,
    valset=valset,
    task_lm="openai/gpt-4.1-mini",
    max_metric_calls=150,
    reflection_lm="openai/gpt-5",
)

print(result.best_candidate['system_prompt'])

You give it a seed prompt, a training set, a validation set, and a couple of model identifiers. It handles the rest.

For DSPy users, it's a drop-in replacement for existing optimizers:

gepa = dspy.GEPA(
    metric=your_metric,
    max_metric_calls=150,
    reflection_lm="openai/gpt-5"
)
optimized = gepa.compile(student=your_program, trainset=trainset, valset=valset)

The key to getting good results is your evaluation metric. The richer the feedback you provide — error messages, constraint violations, reasoning traces — the better GEPA's reflection mechanism works. A metric that just returns a score works. A metric that returns a score plus diagnostic feedback works dramatically better.

When GEPA Shines (And When It Doesn't)

GEPA works best when:

  • Rollouts are expensive. Scientific simulations, complex agents with tool calls, slow compilation. GEPA needs 100-500 evaluations. RL needs 10,000+.
  • Data is scarce. GEPA can work with as few as 3 examples. Try that with RL.
  • You're using API-only models. No weight access needed. Optimize GPT-5, Claude, Gemini directly. No custom infrastructure or fine-tuning pipeline required.
  • You need interpretability. Every optimization step is human-readable. You can see exactly why each prompt changed.

The authors are explicit about what GEPA isn't best at: scenarios with abundant data and 100,000+ cheap rollouts, where gradient-based methods still hold their own. GEPA and RL are complementary, not competitive. Use GEPA for rapid initial optimization, then apply RL or fine-tuning for additional gains.

The Bigger Picture

GEPA represents a shift in how we think about AI optimization. The industry has been obsessed with making models bigger and more capable. But there's an equally important frontier: making our use of those models smarter and more efficient.

The idea that you can read execution traces, reason about failures in natural language, and propose targeted fixes — that's how human engineers debug systems. GEPA automates this process. It's prompt engineering, but automated, principled, and compounding.

With an ICLR 2026 oral presentation, 5,200+ GitHub stars, and production deployments at major companies, GEPA is graduating from research curiosity to industry standard. If you're building AI systems and still writing prompts by hand, it might be time to let the machine take over.


Citations

  1. Agrawal, L.A., Tan, S., Soylu, D., Ziems, N., Khare, R., Opsahl-Ong, K., Singhvi, A., Shandilya, H., Ryan, M.J., Jiang, M., Potts, C., Sen, K., Dimakis, A.G., Stoica, I., Klein, D., Zaharia, M., & Khattab, O. (2025). "GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning." ICLR 2026 (Oral). arXiv:2507.19457. https://arxiv.org/abs/2507.19457
  1. GEPA GitHub Repository. https://github.com/gepa-ai/gepa (5,200+ stars, MIT License)
  1. GEPA Documentation. https://gepa-ai.github.io/gepa/
  1. Databricks Mosaic AI Research. "Building State-of-the-Art Enterprise Agents 90x Cheaper with Automated Prompt Optimization." https://www.databricks.com/blog/building-state-art-enterprise-agents-90x-cheaper-automated-prompt-optimization
  1. Choi, A. "Prompt Optimizing with GEPA and Databricks for 90x cheaper inference." AI on Databricks, Medium. https://medium.com/@AI-on-Databricks/prompt-optimizing-with-gepa-and-databricks-for-90x-cheaper-inference-0068a2909d86
  1. GEPA on PyPI. https://pypi.org/project/gepa/ (v0.1.1)
  1. Lutke, T. (Shopify CEO). Twitter/X post: "Both DSPy and (especially) GEPA are currently severely under hyped." https://x.com/tobi/status/1963434604741701909
  1. Houston, D. (Dropbox CEO). Twitter/X post on GEPA and DSPy. https://x.com/drewhouston/status/1974750621690728623

Fact-Check Notes

  • 5,230 stars claim: Verified at time of research. GitHub showed 5,230 on initial search, 5,273 on a later check. The number is approximately correct and growing.
  • ICLR 2026 Oral: Confirmed via OpenReview and ICLR program page. Oral presentations represent top ~1-2% of submissions.
  • 90x cheaper / 35x faster claims: These come from the GEPA project website and Databricks blog. The 90x figure refers specifically to the Databricks comparison of an open-source model + GEPA optimization vs. Claude Opus 4.1. The 35x figure refers to the number of rollouts (100-500 vs. 24,000+ for GRPO), as documented in the paper.
  • Shopify, Databricks, Dropbox usage: Confirmed via the GEPA landing page testimonials and Databricks' published blog post. Shopify CEO and Dropbox CEO both tweeted publicly about it.
  • Benchmark numbers: All benchmark figures (AIME 2025, MATH, ARC-AGI, etc.) come from the paper and the Morph/GEPAlanding page documentation. The MATH 67%→93% and ARC-AGI 32%→89% figures are from the Flowtivity analysis citing the paper.
  • $10 per run / 15-20 minutes: From the Databricks Medium article, referring to a "light workload" GEPA run. Actual cost and time will vary by task complexity and models used.
  • arXiv ID: 2507.19457. Note: despite the 2507 prefix (July 2025), the paper was accepted and presented at ICLR 2026.
  • "Used by OpenAI" claim: The Flowtivity article lists OpenAI among production deployments. This should be interpreted cautiously — it may refer to internal experimentation rather than a public production commitment. The GEPA landing page itself lists Shopify, Databricks, and Dropbox as its "trusted by" companies.