πŸ“ˆ GH Trending Explorer 🎲 Surprise me

← all repos

gepa-ai / gepa

git clone https://github.com/gepa-ai/gepa.git v0.1.4 Β· 3mo ago πŸ”₯ on GitHub Trending today

Optimize prompts, code, and more with AI-powered Reflective Optimization

+24
stars, 24h Β· #300
β€”
stars, 7 days
β€”
stars, 30 days
7.1k
β˜… total
589
forks Β· 131 open issues

Star history starts 2026-10-20; the chart appears after the second daily snapshot.

LanguageJupyter Notebook
LicenseMIT
Created2025-08-05 (1y ago)
Last pushtoday
Watchers28
OwnerOrganization

Seen on GitHub Trending

  • 2026-10-20 β€” #6 daily in jupyter-notebook Β· +24 β˜…

Links

README excerpt
Optimize any text parameter β€” prompts, code, agent architectures, configurations β€” using LLM-based reflection and Pareto-efficient evolutionary search. 
 Website  | 
 Quick Start  | 
 Paper  | 
 Blog  | 
 Discord 
---
## What is GEPA?
**GEPA** (Genetic-Pareto) is a framework for optimizing any system with textual parameters against any evaluation metric. Unlike RL or gradient-based methods that collapse execution traces into a single scalar reward, GEPA uses LLMs to *read* full execution traces β€” error messages, profiling data, reasoning logs β€” to diagnose *why* a candidate failed and propose targeted fixes. Through iterative reflection, mutation, and Pareto-aware selection, GEPA evolves high-performing variants with minimal evaluations.
**If you can measure it, you can optimize it**: prompts, code, agent architectures, scheduling policies, vector graphics, and more.
### Key Results
| | |
|---|---|
| **90x cheaper** | Open-source models + GEPA beat Claude Opus 4.1 at Databricks |
| **35x faster than RL** | 100–500 evaluations vs. 5,000–25,000+ for GRPO (paper) |
| **32% β†’ 89%** | ARC-AGI agent accuracy via architecture discovery |
| **40.2% cost savings** | Cloud scheduling policy discovered by GEPA, beating expert heuristics |
| **55% β†’ 82%** | Coding agent resolve rate on Jinja via auto-learned skills |
| **50+ production uses** | Across Shopify, Databricks, Dropbox, OpenAI, Pydantic, MLflow, Comet ML, and more |
> *"Both DSPy and (especially) **GEPA are currently severely under hyped** in the AI context engineering world"* β€” **Tobi Lutke**, CEO, Shopify
---
## Installation
 [code] 
To install the latest from `main`:
 [code] 
---
## Quick Start
### Simple Prompt Optimization
Optimize a system prompt for math problems from the AIME benchmark in a few lines of code (full tutorial):
 [code] 
**Result:** GPT-4.1 Mini goes from 46.6% β†’ 56.6% on AIME 2025 (+10 percentage points).
### With DSPy (Recommended for AI Pipelines)
The most powerful way to use GEPA for prompt optimization is within DSPy, where it's available as `dspy.GEPA`. See dspy.GEPA tutorials for executable notebooks.
 [code] 
### optimize_anything: Beyond Prompts
The `optimize_anything` API optimizes *any* text artifact β€” code, agent architectures, configurations, SVGs β€” not just prompts. You provide an evaluator; the system handles the search.
 [code] 
### Use GEPA as an Agent Skill
GEPA also ships as an **Agent Skill** so coding agents can drive `optimize_anything` for you. In a clone of this repo, Claude Code β€” and other agents that read `.claude/skills/` (Cursor, VS Code/Copilot, Codex, Gemini CLI) β€” auto-discover it at `.claude/skills/gepa-optimize-anything/`. To use it in any other project, install the plugin from this repo's marketplace:
 [code] 
See the Agent Skill guide for details.
---
## How It Works
Traditional optimizers know *that* a candidate failed but not *why*. GEPA takes a different approach:
1. **Select** a candidate from the Pareto frontier (candidates excelling on