- 离线批量优化提示词:你有一批带标注的评测样本,想从手写 prompt 迭代到更优版本,它把 rollout、反思、变异、Pareto 筛选串成闭环,比人工改 prompt 省去反复试错
- 多目标权衡场景:不同任务子集上表现各有优劣的候选需要同时保留,Pareto 前沿比单一标量分数更贴近真实取舍,避免优化出一个平均分高但某类任务崩掉的 prompt
- 优化非 prompt 文本产物:配置、代码片段、SVG 等任意文本参数走 optimize_anything,比专门写一套搜索脚本省事
- 已有 DSPy/LangChain/RAG 管线想加一层自动调优:通过 GEPAAdapter 接入,不用重写现有调用链
gepa
gepa-aiMIT活跃维护 有专家点评用遗传算法和进化式迭代自动优化提示词、代码与 Agent 配置,让 LLM 反复自我反思改进,省去手工调参。
Optimize prompts, code, and more with AI-powered Reflective Optimization
专家点评
上手难度:进阶更新于 2026-11-11用 LLM 反思加 Pareto 进化搜索,把提示词和 Agent 架构当可优化参数来迭代
适用场景
踩坑
- 成本不可控:每次迭代都要跑完整 rollout 加反思调用,任务与反思都走外部 LLM API,样本集大或迭代轮数多时 token 消耗会快速累积;issue 里有 token budget awareness 的诉求,说明当前对 prompt 体积和预算的约束并不内建
- 长跑中断恢复:issue 里 Restart from log_dir not working 和避免重复 rollout 的诉求同时出现,说明断点续跑和缓存复用这块还不稳,长时间优化任务要做好重跑的心理准备
- 适配器依赖分散:ConfidenceAdapter、LangChain 等要装 gepa[confidence]、gepa[langchain] 可选依赖,Agent Skill 方式还要求在克隆目录或 plugin marketplace 安装后才能被编码 Agent 发现,装完 pip install gepa 不等于能用全部功能
同类对比
DSPy 的 optimizer 系列(BootstrapFewShot、MIPROv2)在纯 prompt 优化上更成熟、生态更完整;如果只需要单轮 few-shot 自动构造而不需要进化搜索和 Pareto 多目标,选 DSPy 更轻。
pip install gepaREADME 未说明;任务与反思均调用外部 LLM API(如 openai/gpt-4.1-mini、openai/gpt-5),本地无需 GPU 显存
项目说明
由 README 自动翻译提炼用 LLM 反思加 Pareto 进化搜索,自动优化提示词、代码和 Agent 架构等文本参数
用遗传算法和进化式迭代自动优化提示词、代码与 Agent 配置,让 LLM 反复自我反思改进,省去手工调参。
核心能力
- 让 LLM 读取完整执行轨迹诊断失败原因并定向变异
- 用 Pareto 前沿保留在不同任务子集上各有所长的候选
- 支持系统感知合并,融合两个 Pareto 最优候选的优势
- 通过 GEPAAdapter 接口接入任意系统,内置 DSPy、RAG、LangChain 等适配器
- optimize_anything API 可优化代码、配置、SVG 等任意文本产物
容易踩的坑
需要自备 LLM API 与密钥,示例默认使用 openai/ 前缀模型;ConfidenceAdapter、LangChain 等适配器需额外安装可选依赖(如 gepa[confidence]、gepa[langchain]);Agent Skill 方式需在仓库克隆目录或通过 /plugin marketplace 安装后才能被编码 Agent 发现
- v0.1.4最新正式版2026-07-15 · 2026-07-15 14:50 UTC
This release ships the reflection-LM protocol and batch-based parallel proposals ([RFC #329](https://github.com/gepa-ai/gepa/issues/329), Phases 1 & 4) — the largest change to GEPA's proposal machinery since the project started, contributed by @Benzhang2004 in #369 and hardened through five review rounds. One breaking change is called out under Breaking & upgrade notes.
pip install -U gepaHighlights
- Multi-proposal iterations via composable strategies (#369): each iteration can now sample and evaluate many candidate proposals instead of one.
sampling_strategy=chooses the (parent, minibatch) tasks —SingleMutationSampling(default, classic GEPA),SameParentSampling(n),IndependentSampling(n),PxNSampling(p, n)— andselection_strategy=decides which improvements enter the pool:AllImprovements(default),BestImprovement,TopKImprovements(k). Defaults reproduce previous behavior exactly (pinned by replay tests against a recorded pre-change run). Full guide: [Parallel Proposals](https://gepa-ai.github.io/gepa/guides/parallel-proposals/). - The
ReflectionLMprotocol +reflection_strategy=(#369, RFC #329 Phase 1): the reflection step is now a seam. Pass a customReflectionLMimplementation togepa.optimize(reflection_strategy=...)orReflectionConfig(reflection_strategy=...)to own how reflective mutation calls the reflection model — the entry point for session-based, aggregating (ComBEE-style, #307), and coding-agent reflectors. Stateful implementations return a successor fromreflect(); chaining semantics are documented in [RFC #329](https://github.com/gepa-ai/gepa/issues/329#issuecomment-4981863763). Multi-call reflectors get aReflectionProposal.metadatadiagnostics channel that flows through to callbacks, trackers, and proposal metadata. batch_evaluator=— one external call for all pending evaluations (optimize_anything): hand GEPA a function that receives every pending(candidate, example)pair in a single call (provider batch APIs, Slurm/Ray, your own cluster) and return one result per pair. Parity with the standard evaluator path: shared evaluation caching (only misses reach your function, still as one call), per-pairopt_stateswarm-start injection,raise_on_exceptionpolicy with a documented_gepa_transient_failurecontract (failures are never cached), str-candidate unwrapping, and identical output packaging.evaluator=is now optional whenbatch_evaluator=is provided — everything routes through your batch function, including refiner steps as singleton batches.- Adapters can batch: the optional
GEPAAdapter.batch_evaluateseam lets adapters parallelize multi-proposal evaluations however they like; adapters that only implementevaluate()keep working unchanged (sequential fallback). - Selection is the authority, and rejection reasons are truthful: selection strategies receive all evaluated proposals plus the acceptance criterion (built-ins filter; custom strategies may deliberately surface criterion-rejected proposals). Everything unselected fires
on_candidate_rejectedwith an accurate reason — acceptance failure, dropped-by-selection, or duplicate — and acceptance criteria may provide areject_reason(proposal, state)hook for custom messages. Criteria are judged exactly once per proposal (memoized), so stateful or stochastic criteria behave correctly. Identical child candidates within an iteration are deduplicated before valset evaluation. - Per-task run traces:
full_program_traceentries now record every task in multi-task iterations (n_tasks,taskswith per-task ids and before/after scores) and every accepted program index (new_program_indices); each proposal carries a stablemetadata["proposal_id"]. Legacy
- Multi-proposal iterations via composable strategies (#369): each iteration can now sample and evaluate many candidate proposals instead of one.
- v0.1.32026-07-14 · 2026-07-14 13:10 UTC
查看更新说明
This release ships everything merged to
mainsince v0.1.1 (March 2026): two new adapters, parallel proposal generation, reflection-cost controls, a unified LM layer, dependency security bumps, and a large expansion of the docs and showcase.pip install -U gepaHighlights
- LangChain adapter — optimize LangChain/LangGraph applications directly with
gepa.optimize(#361, @bryonkucharski). Install withpip install 'gepa[langchain]'. - ConfidenceAdapter — logprob-aware scoring and reflection for classification tasks (#258, @rodolfo-nobrega). Install with
pip install 'gepa[confidence]'. - Reflection-cost controls — new
max_reflection_costbudget knob, with cost/token tracking moved into a unified LM layer (#327, #325); pass provider-specific parameters to the reflection model viareflection_lm_kwargs(#336). - Unified LM layer with reasoning-model support — first-class handling of reasoning models as reflection LMs (#253).
- Callbacks in
optimize_anything— theGEPACallbackprotocol now works inoptimize_anythingruns, not justgepa.optimize(#290). - Embed GEPA in your own training loop —
wandb_attach_existing/mlflow_attach_existinglog into an already-active run without GEPA managing its lifecycle (#280), and reflection prompts/outputs are logged to a proposals table for run archaeology (#276, #254). - Pluggable acceptance criterion — choose
"strict_improvement"or"improvement_or_equal", or pass your ownAcceptanceCriterion(#304). - Adapter-specific persistence — adapters can now store state in
GEPAState.adapter_stateso custom adapters survive checkpoint/resume (#230, @lukedhlee). - Dynamic datasets —
trainset_loaderexposed inIterationStartEventfor datasets that change during optimization (#247).
Fixes
- Corrected broken code snippets in the quickstart and FAQ (#347).
DspyAdapter: fixed a crash onoutputs=Noneand areflection_lmtype mismatch (#320, @Archelunch).- Refiner evaluator calls are now correctly counted toward the metric-call budget (#315, @Shangyint).
- Security: bumped
litellm,mlflow, andrequestsfloors to address Dependabot alerts (#322). If you installgepa[full], this raises the litellm floor to ≥1.83.
Upgrade notes
track_best_outputsnow defaults toTrue(#286). Best outputs are retained on the result object by default, which is what most users expect when inspecting results — but it increases memory use for large valsets. Passtrack_best_outputs=Falseto restore the old behavior, especially if you embed GEPA inside a training loop.- State schema v4 → v5. Run directories written by v0.1.1 are migrated automatically on load; resuming an existing
run_dirwith v0.1.2 is supported. Note that a state written by v0.1.2 is not designed to be loaded by v0.1.1 — finish in-flight runs on the version that started them, or upgrade before resuming. - Python 3.14 dependency handling in the
fullextra was restructured (#322 and packaging cleanups); if you previously pinned workarounds for 3.14, they should no longer be necessary.
Experimental
- Parallel proposals (#314, @Shangyint):
optimize_anythingcan generate and evaluate multiple candidate proposals per iteration viaEngineConfig.num_parallel_proposals. This interface is experimental and will change: per RFC #329, the next minor release replaces the integer knob with composable sampling/selection strategies (see #369), with a deprecation shim for one release. Use it, but don't build durable config around the parameter name.
Known issues
- In
optimize_anythingruns, merge-proposal events do not yet fireGEPACallbackhooks (the callback plumbing from #290 does not reach the merge proposer). Mutation/iteration events are unaffected. A fix is queued for the next release.
Docs & showcase
- New guides: batch sampling (#335), candidate selection strategies (#30
- LangChain adapter — optimize LangChain/LangGraph applications directly with
- v0.1.22026-07-14 · 2026-07-14 12:04 UTC
查看更新说明
This release ships everything merged to
mainsince v0.1.1 (March 2026): two new adapters, parallel proposal generation, reflection-cost controls, a unified LM layer, dependency security bumps, and a large expansion of the docs and showcase.pip install -U gepaHighlights
- LangChain adapter — optimize LangChain/LangGraph applications directly with
gepa.optimize(#361, @bryonkucharski). Install withpip install 'gepa[langchain]'. - ConfidenceAdapter — logprob-aware scoring and reflection for classification tasks (#258, @rodolfo-nobrega). Install with
pip install 'gepa[confidence]'. - Reflection-cost controls — new
max_reflection_costbudget knob, with cost/token tracking moved into a unified LM layer (#327, #325); pass provider-specific parameters to the reflection model viareflection_lm_kwargs(#336). - Unified LM layer with reasoning-model support — first-class handling of reasoning models as reflection LMs (#253).
- Callbacks in
optimize_anything— theGEPACallbackprotocol now works inoptimize_anythingruns, not justgepa.optimize(#290). - Embed GEPA in your own training loop —
wandb_attach_existing/mlflow_attach_existinglog into an already-active run without GEPA managing its lifecycle (#280), and reflection prompts/outputs are logged to a proposals table for run archaeology (#276, #254). - Pluggable acceptance criterion — choose
"strict_improvement"or"improvement_or_equal", or pass your ownAcceptanceCriterion(#304). - Adapter-specific persistence — adapters can now store state in
GEPAState.adapter_stateso custom adapters survive checkpoint/resume (#230, @lukedhlee). - Dynamic datasets —
trainset_loaderexposed inIterationStartEventfor datasets that change during optimization (#247).
Fixes
- Corrected broken code snippets in the quickstart and FAQ (#347).
DspyAdapter: fixed a crash onoutputs=Noneand areflection_lmtype mismatch (#320, @Archelunch).- Refiner evaluator calls are now correctly counted toward the metric-call budget (#315, @Shangyint).
- Security: bumped
litellm,mlflow, andrequestsfloors to address Dependabot alerts (#322). If you installgepa[full], this raises the litellm floor to ≥1.83.
Upgrade notes
track_best_outputsnow defaults toTrue(#286). Best outputs are retained on the result object by default, which is what most users expect when inspecting results — but it increases memory use for large valsets. Passtrack_best_outputs=Falseto restore the old behavior, especially if you embed GEPA inside a training loop.- State schema v4 → v5. Run directories written by v0.1.1 are migrated automatically on load; resuming an existing
run_dirwith v0.1.2 is supported. Note that a state written by v0.1.2 is not designed to be loaded by v0.1.1 — finish in-flight runs on the version that started them, or upgrade before resuming. - Python 3.14 dependency handling in the
fullextra was restructured (#322 and packaging cleanups); if you previously pinned workarounds for 3.14, they should no longer be necessary.
Experimental
- Parallel proposals (#314, @Shangyint):
optimize_anythingcan generate and evaluate multiple candidate proposals per iteration viaEngineConfig.num_parallel_proposals. This interface is experimental and will change: per RFC #329, the next minor release replaces the integer knob with composable sampling/selection strategies (see #369), with a deprecation shim for one release. Use it, but don't build durable config around the parameter name.
Known issues
- In
optimize_anythingruns, merge-proposal events do not yet fireGEPACallbackhooks (the callback plumbing from #290 does not reach the merge proposer). Mutation/iteration events are unaffected. A fix is queued for the next release.
Docs & showcase
- New guides: batch sampling (#335), candidate selection strategies (#30
- LangChain adapter — optimize LangChain/LangGraph applications directly with
- v0.1.12026-03-16 · 2026-03-16 10:15 UTC
查看更新说明
Highlights
Candidate Tree Visualization — GEPA now generates an interactive HTML lineage tree of all candidates explored during optimization. Nodes are color-coded by role (best, Pareto front, seed) with hover previews and click-to-pin tooltips for reading full prompt text. The tree is automatically logged to WandB and MLflow at each step — no configuration needed. (#256)
gskill: Automated Skill Learning for Coding Agents — A new
gepa.gskillmodule that usesoptimize_anythingto automatically discover and learn repository-specific skills for coding agents, powered by SWE-smith and Docker. (#213)Top-K Pareto Candidate Selector — New
candidate_selection_strategy="top_k_pareto"limits parent selection to the top-K candidates by aggregate score (default K=5), focusing mutation effort on the most promising programs. (#246)Improvements
- Parallel evaluation on by default —
EngineConfignow defaults toparallel=Truewithmax_workers=os.cpu_count(). No configuration changes needed. (#240) - Atomic state saves — Checkpoints now use temp-file +
os.replace(), preventing corruption on interrupted runs. (#242) - JSON run artifacts —
run_log.jsonandcandidates.jsonare now written to the run directory after each state save, enabling post-hoc analysis without extra code. (#245) - Cleaner experiment tracking — WandB/MLflow logging overhauled: engine config logged at start, best/seed prompts in summary, scalar metrics begin at step 0. (#243)
- Earlier callback firing —
on_optimization_startnow fires before seed valset evaluation, not after. (#244)
Bug Fixes
cloudpickleis now a proper dependency in thefullextras group —use_cloudpickle=Trueno longer raisesModuleNotFoundError. (#242)
Examples & Tutorials
- Four new
optimize_anythingexample suites: AIME math, ARC-AGI, circle packing, and blackbox optimization. (#234) - New tutorial on speeding up a Sudoku solver with GEPA. (#224)
- Pydantic AI tutorial added to showcase. (#211)
What's Changed
- Update blog post links with new URLs by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/220
- fix image social preview by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/221
- Update blog by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/223
- Add tutorial on speeding up Sudoku solver with GEPA by @vacmar01 in https://github.com/gepa-ai/gepa/pull/224
- Add gskill: automated repository-specific skill learning for coding agents by @rohitsandadi in https://github.com/gepa-ai/gepa/pull/213
- Add Sutro link to the documentation index by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/226
- docs: add Pydantic AI tutorial to showcase by @diego-lima in https://github.com/gepa-ai/gepa/pull/211
- Add Google Scholar tags and Redirection for links by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/237
- add optimize-anything example suites by @lukeleeai in https://github.com/gepa-ai/gepa/pull/234
- docs: add gskill guide by @rohitsandadi in https://github.com/gepa-ai/gepa/pull/229
- Enable parallel evaluation by default in EngineConfig by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/240
- fix: add cloudpickle dep + atomic state saves by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/242
- docs: add BAML prompt optimization link and Bedrock FAQ by @LakshyAAAgrawal in https://github.com/gepa-ai
- Parallel evaluation on by default —
- v0.1.02026-02-19 · 2026-02-19 19:40 UTC
查看更新说明
Introducing optimize_anything, GEPA's new API for optimizing any text parameter. Checkout the blogpost at https://gepa-ai.github.io/gepa/blog/2026/02/18/introducing-optimize-anything/
What's Changed
- Automated docs and website by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/176
- Make ARC_AGI example readable in docs by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/177
- Add GA by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/179
- Add more external references in the docs by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/180
- Update GEPA index by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/183
- Fix colors by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/184
- Add info from twitter by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/186
- Add assets by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/187
- Add hero by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/188
- Add agents.md and claude.md by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/189
- Update the website frontpage matter by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/190
- feat: Generalize reflection prompt placeholders for broader use cases by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/195
- Add test coverage for Signature.run() list/tuple LM response handling by @Copilot in https://github.com/gepa-ai/gepa/pull/199
- Deduplicate missing template warnings in reflective mutation by @Copilot in https://github.com/gepa-ai/gepa/pull/198
- Expose per-parameter reflection prompt templates in public API by @Copilot in https://github.com/gepa-ai/gepa/pull/200
- Fix Pyright type error: add None guards for score comparison by @Copilot in https://github.com/gepa-ai/gepa/pull/201
- feat: Support per-parameter custom reflection prompts by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/197
- feat: Support custom candidate proposer functions by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/194
- feat: Enhanced language model protocol for flexible prompt formats by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/196
- feat: Make perfect_score optional for flexible optimization goals by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/193
- Update README.md by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/205
- Update header of the website by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/206
- Fix color by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/207
- Logo Improvement by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/208
- Update logo by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/209
- Add
optimize_anything: unified high-level API for GEPA by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/204 - Launch
optimize_anythingand GEPA for Agent Skills Optimization by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/214 - Update og previews by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/215
- OG Social Previews for blogposts by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/216
- Blogpost by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/217
- Update task ordering in blogpost by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/218
- Create details-anchor.js by @LakshyAAAgrawal in https://github.com/gepa-ai/gepa/pull/219
Full Changelog: https://github.com/gepa-ai/gepa/compare/v0.0.27...v0.1.0
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
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
pip install gepa
To install the latest from main:
pip install git+https://github.com/gepa-ai/gepa.git
Quick Start
Simple Prompt Optimization
Optimize a system prompt for math problems from the AIME benchmark in a few lines of code (full tutorial):
import gepa
trainset, valset, _ = gepa.examples.aime.init_dataset()
seed_prompt = {
"system_prompt": "You are a helpful assistant. Answer the question. "
"Put your final answer in the format '### <answer>'"
}
result = gepa.optimize(
seed_candidate=seed_prompt,
trainset=trainset,
valset=valset,
task_lm="openai/gpt-4.1-mini",
max_metric_calls=150,
reflection_lm="openai/gpt-5",
)
print("Optimized prompt:", result.best_candidate['system_prompt'])
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.
import dspy
optimizer = dspy.GEPA(
metric=your_metric,
max_metric_calls=150,
reflection_lm="openai/gpt-5",
)
optimized_program = optimizer.compile(student=MyProgram(), trainset=trainset, valset=valset)
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.
import gepa.optimize_anything as oa
from gepa.optimize_anything import optimize_anything, GEPAConfig, EngineConfig
def evaluate(candidate: str) -> float:
result = run_my_system(candidate)
oa.log(f"Output: {result.output}") # Actionable Side Information
oa.log(f"Error: {result.error}") # feeds back into reflection
return result.score
result = optimize_anything(
seed_candidate="<your initial artifact>",
evaluator=evaluate,
objective="Describe what you want to optimize for.",
config=GEPAConfig(engine=EngineConfig(max_metric_calls=100)),
)
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:
/plugin marketplace add gepa-ai/gepa
/plugin install gepa-optimize-anything@gepa
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:
- Select a candidate from the Pareto frontier (candidates excelling on different task subsets)
- Execute on a minibatch, capturing full execution traces
- Reflect — an LLM reads the traces (error messages, profiler output, reasoning logs) and diagnoses failures
- Mutate — generate an improved candidate informed by accumulated lessons from all ancestors
- Accept — add to the pool if improved, update the Pareto front
GEPA also supports system-aware merge — combining strengths of two Pareto-optimal candidates excelling on different tasks. The key concept is Actionable Side Information (ASI): diagnostic feedback returned by evaluators that serves as the text-optimization analogue of a gradient.
For details, see the paper and the documentation.
Adapters: Plug GEPA into Any System
GEPA connects to your system via the GEPAAdapter interface — implement evaluate and make_reflective_dataset, and GEPA handles the rest.
Built-in adapters:
| Adapter | Description |
|---|---|
| DefaultAdapter | System prompt optimization for single-turn LLM tasks |
| ConfidenceAdapter | Logprob-aware classification optimization — penalizes lucky guesses and feeds confidence diagnostics into reflection. pip install "gepa[confidence]" |
| DSPy Full Program | Evolves entire DSPy programs (signatures, modules, control flow). 67% → 93% on MATH. |
| Generic RAG | Vector store-agnostic RAG optimization (ChromaDB, Weaviate, Qdrant, Pinecone) |
| MCP Adapter | Optimize MCP tool descriptions and system prompts |
| TerminalBench | Optimize the Terminus terminal-use agent |
| AnyMaths | Mathematical problem-solving and reasoning tasks |
| LangChain | Optimize prompts for any LangChain pipeline — chat models, tool-using agents, LangGraph. pip install "gepa[langchain]" |
See the adapters guide for how to build your own, and DSPy's adapter as a reference.
Integrations
GEPA is integrated into several major frameworks:
- DSPy —
dspy.GEPAfor optimizing DSPy programs. Tutorials. - MLflow —
mlflow.genai.optimize_prompts()for automatic prompt improvement. - Comet ML Opik — Core optimization algorithm in Opik Agent Optimizer.
- Pydantic — Prompt optimization for Pydantic AI.
- OpenAI Cookbook — Self-evolving agents with GEPA.
- HuggingFace Cookbook — Prompt optimization guide.
- Google ADK / Gemini Enterprise Agent Platform —
adk optimizepowered by GEPA, also shipped inside Google Cloud's Gemini Enterprise Agent Platform Quality Flywheel. ADK docs · Community tutorial. - Microsoft AI: MAI-Thinking-1 — Uses GEPA / DSPy to optimize the Qwen3-30B LLM-judge prompt that filters Code pages in the model's pre-training pipeline (~233B tokens of curated data).
Example Optimized Prompts
GEPA can be thought of as precomputing reasoning during optimization to produce a plan for future task instances. Here are examples of the detailed prompts GEPA discovers:
You will be given two input fields: question and summary_1.
Your task is to generate a new search query (query) optimized for the second hop of a multi-hop retrieval system. The original user question is typically complex and requires information from multiple documents to answer. The first hop query is the original question used to retrieve an initial set of documents. Your goal is to generate a second hop query that retrieves additional relevant documents that were not found in the first hop but are necessary to answer the original question completely.
Detailed task instructions and hints:
-
Input Understanding:
questionis the original multi-hop question posed by the user.summary_1is a concise summary of information from a document retrieved in the first hop, which partially addresses the question.
-
Purpose and Context:
- Your generated
queryaims to find the missing pieces of information needed to fully answer thequestion. - The multi-hop retrieval system works in stages:
- First hop: The original question returns some documents.
- Second hop: Your query must help retrieve any other relevant documents NOT found in the first hop that hold complementary or broader context necessary for final answer extraction.
- Your generated
-
Key Observations from Examples and Feedback:
- First-hop documents often cover one entity or aspect in the question.
- Remaining relevant documents often involve connected or higher-level concepts mentioned in
summary_1but not explicitly asked in the original question. - The
queryshould be formulated to explicitly target these missing, but logically linked, documents. - Avoid merely paraphrasing the original question or restating known facts from
summary_1. - Instead, infer what broader or related entities/concepts might provide the crucial missing information.
- For example, if
summary_1describes a population for a small civil parish, but the question wants total population of the wider region, yourqueryshould target that wider region (e.g., "Madeira archipelago population in 2011"). - Similarly, if
summary_1covers a song and the question wants the album it came from, but first hop got song-level documents, your query should retrieve documents about the album itself.
-
How to Build the Query:
- Identify the entities or topics mentioned in
summary_1that appear related but different from first-hop documents. - Reframe the query to explicitly mention these broader or related entities connected to the original question.
- Include relevant key context from the question to maintain specificity, but shift focus to the missing piece.
- The goal is to retrieve documents that link or complement what was retrieved initially.
- Identify the entities or topics mentioned in
-
Practical Strategy:
- Read the
summary_1carefully to spot references to bigger contexts or other entities not covered in the first hop. - Ask yourself, "What entity or aspect does this summary hint at that could answer the original question but was not found yet?"
- Formulate a precise, focused factual query targeting that entity or concept to retrieve the missing documents.
- Read the
-
Output:
- Produce only the field
queryas a clear, concise question or keyword phrase designed for efficient retrieval of second-hop documents. - Ensure the query relates logically to the original question while targeting the broader or complementary knowledge identified in
summary_1. - Do not include the original question or simply rephrase it.
- Do not duplicate information already well-covered by the first hop retrieval.
- Produce only the field
By following these principles, you will help the multi-hop retrieval system find all necessary documents to answer the multi-faceted original question completely.
[HotpotQA Prompt End]
[AIME Prompt Begin]
You will be given one math problem as plain text under a key like "problem." Your job is to solve it correctly and return:
- reasoning: a concise, logically ordered solution that uses identities/structure to avoid brute force, ends with a quick verification.
- answer: the final requested number/expression only (no extra words).
Formatting:
- Use exactly two top-level fields named "reasoning" and "answer."
- Keep reasoning succinct but complete. Bullet points are fine.
- The answer field must contain only the final value requested (e.g., 227, 585, 601).
General problem-solving guidance:
- Parse the problem type (e.g., base representation, intersecting families of subsets, avoiding arithmetic progressions, symmetric sums with constraints, ordered tuples counting).
- Always enforce domain constraints (e.g., base-b digits in 0..b−1; no leading zero for base-10 "three-digit"; ordered vs unordered families; strict increase conditions in sequences).
- Use algebraic identities and modular arithmetic to reduce the search space; prefer structural arguments over naive enumeration.
- For "greatest/least" questions, derive tight bounds and give a construction that attains them.
Domain-specific strategies and pitfalls (learned from typical contest problems and prior feedback):
- Base-conversion/digit rearrangement:
- Translate positional notation correctly: in base b, (a b c)_b = a·b^2 + b·b + c; in base 10: abc = 100a + 10b + c.
- Enforce digit ranges strictly (e.g., in base 9, digits ∈ {0,…,8}; if also a is a base-10 leading digit, then a ∈ {1,…,8}).
- Set up equality and simplify. Use modular constraints to prune: • Mod 9 often collapses coefficients; e.g., 99a = 71b + 8c ⇒ mod 9 gives b + c ≡ 0 (mod 9). • Mod 8: 99 ≡ 3, 71 ≡ 7 ⇒ 3a ≡ 7b (mod 8) ⇒ b ≡ −3a (mod 8).
- Solve within digit bounds and verify numerically.
- Palindromes across bases:
- Bound the base length by magnitude (e.g., n < 1000 ⇒ octal has 3–4 digits).
- Characterize palindromes: • 3-digit octal: (A B A)_8 = 65A + 8B. • 4-digit octal: (A B B A)_8 = 513A + 72B (with A ≥ 1).
- Enumerate small parameter ranges and test the other-base palindrome constraint. For "greatest", check candidates in descending order with justification.
- Symmetric sums with a + b + c fixed (ordered triples of nonnegative integers):
- Use identities to compress expressions: S = ab(a + b) + bc(b + c) + ca(c + a) = (a + b + c)(ab + bc + ca) − 3abc.
- With a + b + c known (e.g., 300), convert the given sum into a relation among ab + bc + ca and abc.
- Use the shift a = A + x etc. to isolate a product like (a−A)(b−A)(c−A) and deduce factorization constraints, enabling clean counting.
- Count ordered solutions carefully; include/exclude symmetric/degenerate cases precisely.
- Intersecting families of subsets (collections from the power set):
- Intersecting means every pair has nonempty intersection. The empty set cannot be included.
- Complement pairs: S and S^c cannot both be present. Use this to structure counts.
- Use size-based pigeonhole facts: In [n], any two subsets of size > n/2 must intersect. For n = 5, any two subsets of size ≥ 3 intersect; thus "all subsets of size ≥ 3" is an intersecting family (size 16).
- Do not assume that "stars" (all subsets containing a fixed element) are the only intersecting families of maximum size. For odd n, both the star and "all subsets of size > n/2" have size 2^{n−1}.
- When counting collections of a fixed size: • Consider the minimum set size N in the family and do casework on how many 2-element sets are included (for n=5), as these control which 3-sets must be excluded (complements). • Ensure completeness of cases and avoid double counting by parameterizing canonical patterns (e.g., how many 2-sets, how they overlap, whether they share a common element). • Remember order of subsets in a collection does not matter; count distinct families.
- Avoiding 4-term arithmetic progressions in a strictly increasing sequence with fixed anchors:
- First bound the variable terms by strict increase (e.g., if fixed terms are 3,4,5,...,30,40,50 then 6 ≤ a < b ≤ 29).
- Pre-eliminate values that cause a 4-term AP with three fixed terms: • 3,4,5,a forbids a = 6. • b,30,40,50 forbids b = 20. • Similarly, a,30,40,50 forbids a = 20.
- Start with the count of pairs from allowed values and then subtract specific pairs that complete APs with two fixed endpoints: • 3,5,a,b ⇒ (a,b) = (7,9). • 3,a,b,30 ⇒ (a,b) = (12,21). • 4,a,b,40 ⇒ (a,b) = (16,28). • 5,a,b,50 ⇒ (a,b) = (20,35) but may be outside bounds or pre-excluded (e.g., 20 banned).
- Systematically check all endpoint combinations; use the fact that if endpoints differ by Δ, then Δ must be divisible by 3 for a 4-term AP, and solve for integer a,b within bounds.
- Avoid double subtraction; ensure monotonicity and domain constraints are respected.
- Order statistics with sum and absolute-sum constraints (e.g., x_1 ≤ ... ≤ x_n, sum |x_i| = 1, sum x_i = 0):
- Total positive mass equals total negative mass: both = 1/2.
- For maximizing x_k (k near the top): if there are T largest terms from k to n (T = n − k + 1), then sum of these T terms ≥ T·x_k. Since the total positive mass ≤ 1/2, we get x_k ≤ (1/2)/T.
- For minimizing x_l (l near the bottom): if there are l smallest terms, sum of these l terms ≤ l·x_l. Since the total negative mass is −1/2, we get x_l ≥ (−1/2)/l.
- To attain these bounds, concentrate masses evenly on exactly those positions: set the smallest l terms equal to −1/(2l), the largest T terms equal to 1/(2T), and the middle to 0 (respecting monotonicity). Verify sums and absolute sums.
- Example: For n=100, maximize x_76 − x_16: T = 25 ⇒ x_76 ≤ 1/50; l = 16 ⇒ x_16 ≥ −1/32; construction with 16 negatives at −1/32, 59 zeros, 25 positives at 1/50 attains 1/50 − (−1/32) = 41/800.
Quality checks:
- Verify digit/base constraints and final equalities numerically if applicable.
- For extremal problems, provide both a tight bound and an explicit construction achieving it.
- For counting, explicitly handle ordered vs unordered, exclude impossible/duplicate cases, and check complements/forbidden pairs.
- For AP-avoidance, confirm integrality and bounds; ensure no missed endpoint combinations.
- For "greatest/least" questions, justify optimality structurally (e.g., convexity/majorization/pigeonhole).
Finally:
- Put the clean final numeric result in the "answer" field only.
[AIME Prompt End]
When GEPA Shines
- Expensive rollouts — Scientific simulations, complex agents with tool calls, slow compilation. GEPA needs 100–500 evals vs 10K+ for RL.
- Scarce data — Works with as few as 3 examples. No large training sets required.
- API-only models — No weights access needed. Optimize GPT-5, Claude, Gemini directly through their APIs.
- Interpretability — Human-readable optimization traces show why each prompt changed.
- Complements RL — Use GEPA for rapid initial optimization, then apply RL/fine-tuning for additional gains (BetterTogether).
Further Reading
- Paper: GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning (arXiv:2507.19457)
- Experiment reproduction artifact: GEPA Artifact Repository
- Talk Slides: GEPA Talk Slides
- Blog Posts:
- Tutorials & Examples:
- dspy.GEPA Tutorials, with executable notebooks Step-by-step notebooks showing how to use GEPA for practical optimization tasks via DSPy, including math, structured data extraction for enterprise tasks and privacy conscious delegation task.
- Video tutorial by @weaviate on using dspy.GEPA to optimize a listwise reranker
- Matei Zaharia - Reflective Optimization of Agents with GEPA and DSPy
- Building and optimizing a multi-agent system for healthcare domain using DSPy+GEPA
- Social and Discussion:
- X (formerly Twitter) Announcement Thread (Lakshya A Agrawal)
- GEPA covered by VentureBeat
- GEPA's use by Databricks covered by VentureBeat
- Stay up to date:
- Questions, Discussions?
- GEPA Integrations:
Want to use GEPA in other frameworks?
- DSPy Adapter Code (integrates GEPA with DSPy),
- MLflow Prompt Optimization - GEPA is integrated into MLflow's
mlflow.genai.optimize_prompts()API for automatic prompt improvement using evaluation metrics and training data. Works with any agent framework and supports multi-prompt optimization. - Pydantic AI - Prompt optimization for Pydantic AI.
- Comet ML Opik - Core optimization algorithm in Opik Agent Optimizer.
- OpenAI Cookbook - Self-evolving agents with GEPA.
- HuggingFace Cookbook - Prompt optimization guide.
- Google ADK / Gemini Enterprise Agent Platform -
adk optimizepowered by GEPA, also shipped inside Google Cloud's Gemini Enterprise Agent Platform Quality Flywheel. ADK docs · Community tutorial. - Contributed Adapters – see our adapter templates and issue tracker to request new integrations.
- DefaultAdapter - System Prompt Optimization for a single-turn task.
- ConfidenceAdapter - Logprob-aware classification optimization using
llm-structured-confidence. Detects lucky guesses by extracting token-level logprobs from structured JSON outputs withenumconstraints, and feeds confidence diagnostics (logprob, probability, top alternatives) into the reflection LLM. Install withpip install "gepa[confidence]". See the guide. - DSPy Full Program Adapter - Evolves entire DSPy programs including signatures, modules, and control flow. Achieves 93% accuracy on MATH benchmark (vs 67% with basic DSPy ChainOfThought).
- Generic RAG Adapter - Vector store-agnostic RAG optimization supporting ChromaDB, Weaviate, Qdrant, Pinecone, and more. Optimizes query reformulation, context synthesis, answer generation, and document reranking prompts.
- MCP Adapter - Optimize Model Context Protocol (MCP) tool usage. Supports local stdio servers, remote SSE/HTTP servers, and optimizes tool descriptions and system prompts.
- TerminalBench Adapter - Easily integrating GEPA into a Terminus, a sophisticated external agentic pipeline, and optimizing the agents' system prompt.
- AnyMaths Adapter - Adapter for optimizing mathematical problem-solving and reasoning tasks. Contributed by @egmaminta.
- LangChain Adapter - Optimize prompts for any LangChain pipeline: single-turn chat models, tool-using agents built with
create_agent, custom LangGraph graphs, RAG, and more. Provider-agnostic via LangChain'sinit_chat_model. Install withpip install "gepa[langchain]"plus a provider package (e.g.langchain-openai).
- GEPA uses
- Microsoft AI: MAI-Thinking-1 — GEPA / DSPy optimizes the Qwen3-30B LLM-judge prompt used to filter Code pages in the pre-training pipeline (~233B tokens curated from ~2,000 human labels).
- Nubank: Building Customer Support AI Agents at 100M-User Scale — GEPA inside DSPy optimizes LLM-as-a-Judge prompts; lifts E2 eval accuracy 68.88% → 88.89%, drives Cohen's κ (GPT-4.1 vs GPT-4.1-mini) from 0.00 → 0.745; downstream production wins include +37pp AI transactional NPS and +29pp self-service rate across 5 deployed domains.
- Google: Gemini Enterprise Agent Platform —
adk optimizepowered by GEPA - Nous Research Hermes Agent: evolutionary self-improvement with DSPy + GEPA
- Context Compression using GEPA
- GEPA Integration into SuperOptiX-AI
- GEPA for Observable Javascript
- bandit_dspy
- GEPA in Go Programming Language
- 100% accuracy using GEPA on the clock-hands problem
- Prompt Optimization for Reliable Backdoor Detection in AI-Generated Code
- Attack Selection Reduces Safety in Concentrated AI Control Settings (Pivotal Research + Redwood) — GEPA-optimized red-team prompts outperform handwritten rubric prompts at evading trusted monitoring
- Going recursive: RLM-GEPA on AppWorld (Gabriel Lespérance) — PredictRLM(GPT-5.5 low) hits 0.917 TGC / 0.839 SGC unoptimized (beats leaderboard 0.804 SGC); RLM-GEPA lifts to 0.940 TGC / 0.911 SGC
- DivSkill-SQL: Residual Skill Optimization for Text-to-SQL Ensembles (UC San Diego + Microsoft) — adopts GEPA as inner-loop skill optimizer; +11.1pp on Spider2-Lite Snowflake, +8.3pp on BigQuery, +2.6pp on BIRD-Critic over CHASE-SQL
- DD-GEPA: Dialogue Disentanglement Prompt Optimization (Yokohama National University) — three-component prompt (task instruction / utterance representation / output instruction) optimized with GEPA; Qwen3-30B F1 39.40 → 42.52 on the Kummerfeld benchmark
- Teaching LLMs to Diagnose Production Incidents with ATLAS+GEPA
- DataBricks: Building State-of-the-Art Enterprise Agents 90x Cheaper with GEPA
- comet-ml/opik adds support for GEPA
- Tuning small models (Gemma3-1B) for writing fiction
- Cut OCR Error Rates by upto 38% across model classes (Gemini 2.5 Pro, 2.5 Flash, 2.0 Flash)
- LanceDB: Handwritten Medical-Notes OCR Pipeline with DSPy + GEPA — normalized OCR match 54.1% → 59.4%, avg edit distance 1.01 → 0.87 on Gemini 3.1 Flash Lite, ~15 min run on a laptop
- Optimizing a Data Analysis coding agent with GEPA, using execution-guided feedback on real-world workloads
- Generating Naruto (Anime) style dialogues with GPT-4o-mini using GEPA
- Augmenting RL-tuned models with GEPA: Achieving +142% student performance improvement by augmenting a RL-tuned teacher with GEPA
- DeepResearch Agent Optimized with GEPA
- Boosting Sanskrit QA: Finetuning EmbeddingGemma with 50k GEPA generated synthetic data samples (Tweet), (Code)
- Simulating Realistic Market Research Focus Groups with GEPA-Optimized AI Personas
- Google ADK: Official agent optimization powered by GEPA
- HuggingFace Cookbook on prompt optimization for with DSPy and GEPA
- OpenAI Cookbook showing how to build self-evolving agents using GEPA
- MarkTechPost tutorial: Reflective Prompt Optimization with GEPA — multi-component prompts, structured feedback, held-out validation
- What Do Prompts Reveal About Model Capabilities in Low-Resource Languages? (AfricaNLP 2026)
- Beyond the Answer: Decoding the Behavior of LLMs as Scientific Reasoners (ICLR 2026 Workshop)
- Self-Optimizing Multi-Agent Systems for Deep Research (ECIR 2026 Workshop) — GEPA outperforms TextGrad and expert-crafted prompts
- Prompt Optimisation for Error Detection in Medical Notes (MEDEC) — GPT-5 0.669 → 0.785, Qwen3-32B 0.578 → 0.690
- Automated Risk-of-Bias Assessment of Clinical Trials — GEPA-optimized prompts across 7 RoB domains, 30–40% improvement
- Clinical NER: GEPA vs Bio+ClinicalBERT (IEEE BigData 2025) — up to 12.5% F1 lift in zero-shot clinical NER
- Prompt Triage: Structured Optimization for VLMs on Medical Imaging (Stanford) — median 53% relative improvement on 5 imaging tasks
- Cancer-Myth: GEPA-optimized precautionary prompts for false presuppositions in cancer patient questions
- WER is Unaware (IWSDS 2026) — GEPA-optimized LLM-as-a-Judge for clinical ASR risk (90% accuracy, κ=0.816)
- EvoClinician — GEPA baseline on Med-Inquire multi-turn medical diagnosis
- TRACE — two-phase evolution "inspired by GEPA" over streaming EHRs
- SecureForge (Stanford) — GEPA-based hardening of code-gen LLMs against vulnerabilities; outperforms MIPRO
- OrchMAS — GEPA as MAS prompt-optimization baseline across six QA benchmarks
- REVERE (TCS + Yale) — GEPA as offline baseline on scientific research-coding (SUPER, RCB, ScienceAgentBench)
- Empowering Small Models for GPU Parallelization (OpenACC) — GPT-5 Nano to 100% compilation on PolyBench
- Automated Refinement of Essay Scoring Rubrics (U. Tokyo) — "a simplified version of GEPA"
- Optimized Agentic AI Systems for Asset Pricing (SSRN)
- VeriInteresting — GEPA-style prompt evolution for Verilog HDL code generation
- VeriAct — GEPA as a core part of formal specification synthesis
- Survey on AI-Driven Circuit Verification (ASPDAC 2026, CUHK) — cites GEPA as a promising approach to avoid data scarcity
- FEM-Bench — scientific-reasoning benchmark using GEPA as baseline optimizer
- AssayBench — assay-level virtual cell benchmark; GEPA optimizes pipelines before evaluation
- Reinforced Agent: Inference-Time Feedback for Tool-Calling Agents — reviewer architecture + GEPA prompt optimization
- Databricks Genie: GEPA-optimized table search inside Databricks' enterprise data agent
Contributions
We welcome adapters, bug fixes, and new use cases. See src/gepa/adapters/ for adapter examples and the contributing guide.
Want to highlight your use case? Reach out to [email protected] or submit via GitHub.
Contributors
Everyone who has committed to this repository, written a post on the GEPA blog, or authored the GEPA or optimize_anything paper. This list is generated by docs/scripts/generate_contributors.py. If you're missing, or you'd like your full name or GitHub account shown, please open an issue or a PR.
- Adriano Hernandez
- akushonkamen
- alex choi
- Alexandros G. Dimakis
- Alvin Cheung
- Andrei Cojocaru
- Andres Serrano
- Aobo Yang
- Aria Haghighi
- Arnaud Legendre
- Arnav Singhvi
- Ben Lerchin
- Ben McHone
- Bhartendu Kumar
- Bhavya Chopra
- Bryon Kucharski
- BSAIPF
- Caleb Biddulph
- Changxiu Ji
- Chen Qian
- Christopher Potts
- Cristian Rodriguez
- Dan Klein
- Deepanshu Pathak
- Devvrit Khatri
- Diego Lima
- Diem Nguyen
- Dilara Soylu
- Donghyun Lee
- Drew Breunig
- Emmanuel Maminta
- Eric Yang
- Ethan Aubin
- Fredrik Gustafsson
- Gareth.Y
- Gnaneswar Villuri
- Hanchen Li
- Herumb Shandilya
- Hoan Nguyen
- Inderjit S Dhillon
- Ion Stoica
- Isaac Miller
- James Zou
- Jialin Zhang
- Jin Long
- Joseph E. Gonzalez
- Karim Elmaaroufi
- Koushik Sen
- Krista Opsahl-Ong
- Kunle Olukotun
- Kurt Keutzer
- Kusha Sareen
- Lakshya A Agrawal
- Leo Ji
- Lutfi Eren Erdogan
- Marius Vach
- Matei Zaharia
- Mathieu
- MatsErdkamp
- Meng Jiang
- Mert Cemri
- Michael Hahn
- Michael J Ryan
- Michel Pavlukhin
- Noah Ziems
- Omar Khattab
- Oshri Naparstek
- Qiu
- Qiuyang Mang
- Qizheng Zhang
- Rishabh Agarwal
- Rishabh Tiwari
- Rishi Khare
- Rodolfo Nobrega
- Rohit Behera
- Rohit Sandadi
- Roi Pony
- Runyuan He
- Sanjit A. Seshia
- Santiago
- Satyam Mittal
- Seth Kimmel
- Shangyin Tan
- Shashikant
- Shawn Patterson
- Shriyaa Narayanan
- Sumit Jha
- Tal Oved
- TIRTH THAKKAR
- Tomu Hirata
- Udi Barzelay
- Wei-Liang Liao
- Wenjie Ma
- Xiaokun Chen
- Yushu Li
- ZF
- ZY Liu
Citation
@misc{agrawal2025gepareflectivepromptevolution,
title={GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning},
author={Lakshya A Agrawal and Shangyin Tan and Dilara Soylu and Noah Ziems and Rishi Khare and Krista Opsahl-Ong and Arnav Singhvi and Herumb Shandilya and Michael J Ryan and Meng Jiang and Christopher Potts and Koushik Sen and Alexandros G. Dimakis and Ion Stoica and Dan Klein and Matei Zaharia and Omar Khattab},
year={2025},
eprint={2507.19457},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2507.19457},
}