-
Notifications
You must be signed in to change notification settings - Fork 606
docs(v1): document GEPA prompt optimization #2037
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Ziems
wants to merge
5
commits into
main
Choose a base branch
from
claude/gepa-v1-docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
28e3e04
docs(v1): add GEPA page and drop perfect_score knob
Ziems 17c50cc
feat(v1): default GEPA model to match eval
Ziems 304c9e5
docs(v1): update GEPA model reference in documentation
Ziems 5be98ef
docs(v1): clean up GEPA documentation and update config parameters
Ziems 99cfabb
docs(v1): link GEPA from the overview docs page
Ziems File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,8 @@ | |
| "v1/environments", | ||
| "v1/evaluation", | ||
| "v1/harnesses", | ||
| "v1/harbor" | ||
| "v1/harbor", | ||
| "v1/gepa" | ||
| ] | ||
| }, | ||
| { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| # GEPA Prompt Optimization | ||
|
|
||
| verifiers offers built in support for [GEPA](https://github.com/gepa-ai/gepa), an algorithm that optimizes a system prompt to maximize the downstream reward for a given taskset: | ||
|
|
||
| ```bash | ||
| uv run gepa reverse-text-v1 | ||
| ``` | ||
|
|
||
| `gepa` runs GEPA where a number of rollouts are done before a teacher LLM reflects on the results to propose a better `Task.system_prompt` without any gradient based training. It runs against native v1 tasksets. | ||
|
|
||
| GEPA reuses the same `taskset` / `harness` / `client` / `sampling` config as eval, so the `.toml` config remains very similar: | ||
|
|
||
| ```toml | ||
| model = "deepseek/deepseek-v4-flash" | ||
|
|
||
| [taskset] | ||
| id = "reverse-text-v1" | ||
|
|
||
| [harness] | ||
| id = "default" | ||
|
|
||
| [sampling] | ||
| temperature = 1.0 | ||
| ``` | ||
|
|
||
| Validate the config by using `uv run gepa @ config.toml --dry-run`. To run GEPA, use `uv run gepa @ config.toml`. CLI arguments overwrite toml arguments when both are present. | ||
|
|
||
| ## Common config values | ||
|
|
||
| - `model` / `-m` — model for the rollouts under optimization (default: `deepseek/deepseek-v4-flash`, same as eval) | ||
| - `reflection_model` / `reflection_client` — model/endpoint that proposes new prompts (default: reuse `model` / `client`) | ||
| - `num_train` / `num_val` — train tasks for reflection minibatches and held-out val tasks for the pareto frontier (defaults: 100 / 50) | ||
| - `max_total_rollouts` — total rollouts the run may spend (default: 500) | ||
| - `max_concurrent` / `-c` — caps how many rollouts are in flight at once (default: 128) | ||
|
|
||
| ## Output | ||
|
|
||
| Results go under `outputs/<taskset>--<model>--<harness>/<uuid>/`, matching `eval`. The best system prompt is printed when the run finishes. | ||
|
|
||
| ## Limitations | ||
|
|
||
| **Tasksets** — GEPA optimizes `Task.system_prompt`, so the taskset must provide one. Tasksets that bake instructions into the user `prompt` instead (e.g. `gsm8k-v1`) are not supported out of the box. | ||
|
|
||
| **Harnesses** — any eval harness works. With `APPENDS_SYSTEM_PROMPT`, the optimized prompt is used as a system message but otherwise is folded into the user prompt. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing GEPA skill updates
Medium Severity
This violates the Skills Updates rule: GEPA is now linked from
docs/v1/overview.md, documented indocs/v1/gepa.md, and its CLI contracts/defaults changed (modeldefault,max_metric_calls→max_total_rollouts, droppedperfect_score), butskills/optimize-with-environments/SKILL.mdwas not added or updated. Agent workflows that rely on skills for optimization will miss the new first-class GEPA path and knobs.Additional Locations (2)
verifiers/v1/gepa/config.py#L28-L52docs/v1/gepa.md#L1-L44Triggered by project rule: BugBot Instructions
Reviewed by Cursor Bugbot for commit 99cfabb. Configure here.