gepa-ai/gepa
Optimize prompts, code, and more with AI-powered Reflective Optimization
Featured achievements
The project's latest awards
#3 Repository of the week
🥚 Optimize Anything, Cheaply and Fast
GEPA uses LLM-based reflection and Pareto-efficient evolutionary search to optimize prompts, code, agent architectures, and more — without expensive RL or gradient-based training.
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.
Built by the team at gepa-ai, GEPA supports optimizing prompts, code, agent architectures, scheduling policies, vector graphics, and more. If you can measure it, you can optimize it.
✨ Highlights
- Prompt Optimization: Optimize system prompts or agent instructions against custom metrics, e.g., AIME math accuracy.
- DSPy Integration: Use
dspy.GEPAfor powerful prompt optimization within AI pipelines. - optimize_anything API: Optimize any text artifact — code, configs, SVGs — by providing a custom evaluator.
- LLM-Based Reflection: LLMs read full execution traces to understand failure modes and suggest fixes.
- Pareto-Efficient Search: Evolves candidates using multi-objective selection without collapsing to scalar rewards.
- Minimal Evaluations: Achieves strong results in 100–500 evaluations, 35x faster than RL approaches.
- Production-Ready: Used across Shopify, Databricks, OpenAI, and more, with 50+ production use cases.
- Open Source: MIT-licensed, installable via
pip install gepa, with optional install from GitHub main.
💡 Why it matters
GEPA sidesteps the costly and slow RL or gradient-based optimization loops that dominate AI tuning. Instead of relying on scalar rewards, it uses LLMs to introspect full execution traces, enabling targeted, efficient improvements. This makes optimization accessible, fast, and practical for developers iterating on prompts, agents, or code.
It excels in scenarios where evaluation is expensive or where rich feedback — like logs or errors — is available. From boosting coding agent resolve rates to discovering cloud scheduling policies, GEPA turns real-world signals into optimized systems with minimal compute.
#AI #PromptOptimization #OpenSource #TiniX
Similar Projects
Discover other similar projects and AI models.
LoongFlow is an expert-grade Agent framework for Loop Engineering. Through a Plan-Execute-Summary loop and structured experiential memory, it enables AI to continuously think, execute, reflect, and evolve across complex software engineering, mathematical, and machine learning tasks.
Reverse engineer anything with agents, from app behavior down to native binaries.
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
Secure, fast, efficient, battle-tested at Alibaba's scale. Hybrid architecture code review tool: deterministic pipelines + LLM Agent, precise line-level comments, built-in multi-language ruleset (NPE, thread-safety, XSS, SQL injection), OpenAI & Anthropic compatible.
Harness engineering beginner tutorial, from 0 to 1
How Python does AI. Agents, realtime voice, image generation, embeddings. Every model, every interface, typed end to end.