RepositoryJupyter Notebook
gepa-ai

gepa-ai/gepa

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

7.6kstars
639forks
81issues
4views

Featured achievements

The project's latest awards

3
TINIX TRENDING·Jupyter Notebook

#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.GEPA for 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.

RepositoryPython
algorithmicsuperintelligence/openevolve

Open-source implementation of AlphaEvolve

7.9k
Dec 1, 2026
RepositoryPython
baidu-baige/LoongFlow

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.

486
Apr 9, 2026
RepositoryTypeScript
morluto/rea

Reverse engineer anything with agents, from app behavior down to native binaries.

487.0k
Dec 2, 2026
RepositoryJavaScript
DietrichGebert/ponytail

Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.

203.5k
Nov 22, 2026
RepositoryTypeScript
openclaw/openclaw

The AI that really does things. Any OS. Any Platform. The lobster way. 🦞

395.6k
Dec 2, 2026
RepositoryGo
alibaba/open-code-review

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.

57.9k
Dec 2, 2026
RepositoryPython
langchain-ai/deepagents

The batteries-included agent harness.

31.8k
Dec 2, 2026
RepositoryTypeScript
walkinglabs/learn-harness-engineering

Harness engineering beginner tutorial, from 0 to 1

26.7k
Nov 24, 2026
RepositoryPython
pydantic/pydantic-ai

How Python does AI. Agents, realtime voice, image generation, embeddings. Every model, every interface, typed end to end.

21.5k
Dec 1, 2026