Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions dspy/teleprompt/gepa/gepa.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ class GEPA(Teleprompter):
"""
GEPA is an evolutionary optimizer, which uses reflection to evolve text components
of complex systems. GEPA is proposed in the paper [GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learning](https://arxiv.org/abs/2507.19457).
The GEPA optimization engine is provided by the `gepa` package, available from [https://github.com/gepa-ai/gepa](https://github.com/gepa-ai/gepa).

GEPA captures full traces of the DSPy module's execution, identifies the parts of the trace
corresponding to a specific predictor, and reflects on the behaviour of the predictor to
Expand Down Expand Up @@ -175,8 +176,8 @@ def metric(
...
```

GEPA can also be used as a batch inference-time search strategy, by passing `valset=trainset, track_stats=True`, and using the
`detailed_results` attribute of the optimized program (returned by `compile`) to get the Pareto frontier of the batch.
GEPA can also be used as a batch inference-time search strategy, by passing `valset=trainset, track_stats=True, track_best_outputs=True`, and using the
`detailed_results` attribute of the optimized program (returned by `compile`) to get the Pareto frontier of the batch. `optimized_program.detailed_results.best_outputs_valset` will contain the best outputs for each task in the batch.

Example:
```
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ dependencies = [
"rich>=13.7.1",
"numpy>=1.26.0",
"xxhash>=3.5.0",
"gepa==0.0.1"
"gepa==0.0.2"
]

[project.optional-dependencies]
Expand Down