gepa-ai

gepa-ai/gepa

Jupyter Notebook MIT AI & ML

Optimize prompts, code, and more with AI-powered Reflective Text Evolution

5.6k stars
458 forks
active
GitHub +96 / week

5.6k

Stars

458

Forks

105

Open issues

30

Contributors

v0.1.1 16 Mar 2026

AI Analysis

GEPA is a framework for optimizing textual parameters (prompts, code, agent architectures, configurations) using LLM-based reflection and Pareto-efficient evolutionary search. It is specialized for teams building AI systems who need to iteratively improve their prompts and agent designs without the computational overhead of traditional reinforcement learning. It is not a general-purpose tool—it targets practitioners optimizing LLM-powered systems in production, particularly at enterprises lik...

AI & ML AI Framework Discovery value: 4/10
Documentation 9/10
Activity 10/10
Community 9/10
Code quality 5/10

Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.

Overall score 8/10

AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.

prompt-optimization evolutionary-search llm-reflection agent-architecture pareto-efficiency
Actively maintained Well documented MIT licensed Niche/specialized use case Production ready
Deep Analysis · Based on README and public signals
2w ago

GEPA uses LLM-based reflection and evolutionary search to optimize prompts, code, and any textual artifact

GEPA (Genetic-Pareto) is a Python framework that treats prompt and artifact optimization as an evolutionary search problem: it feeds full execution traces back into an LLM to diagnose failures, mutate candidates, and select Pareto-efficient variants across multiple objectives. It targets ML engineers and researchers who need to optimize system prompts, agent architectures, or arbitrary text-defined configurations with far fewer evaluations than RL-based approaches. Documented production usage at Shopify, Databricks, Dropbox, and OpenAI, plus a native DSPy integration, give it credible real-world grounding for a project under a year old.

Origin

Created in August 2025, GEPA emerged as LLM-based prompt optimization gained traction. It has an accompanying arxiv paper (2507.19457) and was quickly integrated into DSPy as dspy.GEPA, suggesting early alignment with the research and engineering community around structured LLM program optimization.

Growth

The Shopify CEO public endorsement and a Databricks blog post citing a 90x cost reduction appear to have been major catalysts. Growing from zero to 5,290 stars in under 11 months, with 74 stars in the last 7 days, reflects steady but not explosive organic interest — likely driven by word-of-mouth in practitioner circles and the DSPy community, plus concrete benchmark claims.

In production

README explicitly lists 50+ production uses at named organizations including Shopify, Databricks, Dropbox, and OpenAI. A Databricks blog post is directly cited. The Shopify CEO's public endorsement is verifiable. These are stronger-than-average adoption signals for a sub-one-year project, though independent auditing of the '50+ production uses' claim is not possible from available metadata.

Code analysis
Architecture

Based on README, GEPA appears to implement a loop of: (1) candidate evaluation against a user-supplied metric, (2) LLM-based reflection over execution traces including errors and logs, (3) mutation/proposal of new candidates, and (4) Pareto-front selection to balance multiple objectives. The optimize_anything API appears to generalize beyond prompts to any string artifact. Integration with DSPy as a first-class optimizer suggests modular design compatible with existing LLM pipeline abstractions.

Tests

Not documented in README

Maintenance

Last push was 2026-06-22 — one day before the evaluation date — indicating active, ongoing development. The project has a documentation site, a blog, Discord and Slack communities, and a linked arxiv paper, all of which are positive maintenance signals for a project less than a year old.

Honest verdict

ADOPT IF: you are building LLM pipelines in Python, already use DSPy, or need to optimize prompts or agent configurations with a limited evaluation budget and want interpretable iteration steps. AVOID IF: you need a simple, low-dependency one-shot prompt rewriting tool, or if your optimization target is not expressible as a text artifact with a measurable metric. MONITOR IF: you are interested in automated agent architecture search or non-prompt optimization (code, configs) but are not yet ready to invest in setting up custom evaluators.

Independent dimensions

Mainstream potential

6/10

Technical importance

8/10

Adoption evidence

6/10

Risks
  • Reflection quality and mutation usefulness are heavily dependent on the capability of the chosen reflection_lm — using weaker models may produce low-quality proposals and waste evaluation budget.
  • The framework requires users to define a reliable evaluation metric; poorly designed metrics will cause optimization to find unintended solutions, with no built-in safeguards visible in the README.
  • At under one year old, the API surface may shift substantially; early adopters could face breaking changes as the project matures.
  • The claimed benchmark results (90x cost reduction, 35x fewer evaluations) are compelling but originate from the project's own blog and paper — independent third-party reproduction has not been documented in available metadata.
  • Community support infrastructure (Discord, Slack) is present but community size is unverified; if growth stalls, support responsiveness may decline.
Prediction

Likely to establish itself as a go-to optimizer within the DSPy ecosystem and among ML practitioners running automated evaluation loops. Mainstream breakout beyond that community will depend on whether the optimize_anything abstraction lowers the barrier enough for non-research teams.

0 found this helpful

Newsletter

Get analyses like this every Monday

Free weekly digest of the most interesting open-source discoveries.

Languages

Jupyter Notebook
70.3%
Python
29.6%
HTML
0.1%

Information

Language
Jupyter Notebook
License
MIT
Last updated
3d ago
Created
11mo ago
Analyzed with
anthropic/claude-haiku-4-5

Stars over time

Loading…

Contributors over time

Top 100 contributors only — repos with more will plateau at 100.

Loading…

Similar repos

EvoMap

EvoMap/evolver

Evolver is a self-evolving AI agent engine that uses Gene Expression...

8.9k JavaScript AI & ML
Wirasm

Wirasm/PRPs-agentic-eng

PRP (Product Requirement Prompts) is a specialized framework and collection of...

2.2k Python AI & ML
mshumer

mshumer/gpt-prompt-engineer

gpt-prompt-engineer is a Jupyter Notebook tool that automates prompt...

9.7k Jupyter Notebook AI & ML
dair-ai

dair-ai/Prompt-Engineering-Guide

A comprehensive, community-maintained reference guide covering prompt...

76.3k MDX AI & ML
NousResearch

NousResearch/hermes-agent-self-evolution

Hermes Agent Self-Evolution automates optimization of AI agent skills, prompts,...

4.6k Python AI & ML
vs. alternatives
DSPy (native optimizers like MIPROv2)

DSPy's built-in optimizers also automate prompt optimization within structured pipelines, but GEPA is now integrated into DSPy as dspy.GEPA, positioning it as complementary rather than competing. GEPA's claimed advantage is richer trace feedback and fewer required evaluations compared to DSPy's Bayesian and bootstrap approaches.

mshumer/gpt-prompt-engineer

Older and more popular by stars (9,661), gpt-prompt-engineer focuses on generating and ranking prompt candidates using tournament-style evaluation. It lacks GEPA's reflective trace analysis and Pareto-multi-objective framing, and appears less actively maintained.

linshenkx/prompt-optimizer

A TypeScript/web-focused prompt optimizer (31,271 stars) aimed at interactive UI-driven prompt rewriting rather than programmatic, metric-driven evolutionary optimization. Targets a different user profile — non-developers or those wanting quick manual iteration rather than automated optimization loops.

TextGrad

TextGrad treats LLM pipelines as differentiable computation graphs and backpropagates text gradients. Conceptually similar in using LLMs to explain failures, but GEPA's evolutionary/Pareto framing differs from TextGrad's gradient metaphor. GEPA explicitly claims fewer evaluations than RL methods; comparison with TextGrad specifically is not documented in the README.

OPRO (Google DeepMind)

OPRO (Optimization by PROmpting) is a research method using LLMs to propose better prompts based on past results. GEPA extends this direction with Pareto selection, full trace reflection, and a production-ready Python package, whereas OPRO remains primarily a research artifact without a maintained open-source library.