Overview
GEPA (Genetic Evolution with Pareto Acceptance) Native is a SkyDiscover implementation of the GEPA algorithm featuring three core innovations: reflective prompting, acceptance gating, and LLM-mediated merge operations.Reflective Prompting
Surfaces evaluator diagnostics and rejected programs as actionable feedback
Acceptance Gating
Rejects mutations that don’t strictly improve on the parent
LLM-Mediated Merge
Combines complementary programs to escape local optima
Key Concepts
1. Reflective Prompting
Unlike standard prompting which only shows successful programs, GEPA includes rejection history in the prompt:- Recently rejected programs and their scores
- Why they were rejected (lower than parent)
- Evaluator diagnostics from failed attempts
- Error messages and feedback
2. Acceptance Gating
GEPA only accepts a child program if:3. LLM-Mediated Merge
When progress stagnates or after each acceptance, GEPA merges two complementary programs:- Select candidates: Pick programs with complementary strengths
- Build merge prompt: Include both programs, per-metric comparison, diagnostics
- Generate merged solution: LLM combines the best ideas
- Accept if improved: Must meet or exceed both parents
Configuration
Basic Usage
Configuration File
Configuration Options
bool
default:"true"
Enable strict parent-improvement gating. Only accept children that score higher than their parent.
bool
default:"true"
Enable LLM-mediated merge operations to combine complementary programs.
int
default:"15"
Number of iterations without improvement before triggering a stagnation merge.
int
default:"10"
Maximum number of merge operations allowed during the run (budget control).
int
default:"5"
Number of recently rejected programs to include in reflective prompting.
How It Works
Evolution Loop
1
Proactive Merge (if scheduled)
Attempt a merge operation scheduled from previous acceptance
2
Generate Mutation
Create a child program from selected parent with reflective prompt
3
Acceptance Gate
Compare child score to parent score:
- If
child_score > parent_score: Accept and add to database - Otherwise: Reject and add to rejection history
4
Schedule Proactive Merge
If accepted and merge budget allows, schedule merge for next iteration
5
Track Improvement
Update stagnation counter. If stagnant, trigger reactive merge.
Reflective Prompt Structure
The GEPA prompt includes:Merge Candidates Selection
GEPA selects merge candidates from the Pareto frontier:When to Use GEPA Native
Best For
Best For
- Problems with rich evaluator feedback (errors, diagnostics, test failures)
- Multi-objective optimization (Pareto frontier matters)
- When rejection feedback is informative
- Problems where merging solutions makes sense (combining algorithmic ideas)
- Avoiding population pollution from bad mutations
Avoid When
Avoid When
- Sparse feedback (just a score, no diagnostics)
- Single-objective with no interesting Pareto structure
- Very noisy evaluation (acceptance gating may reject good solutions)
- Short runs (merge operations need time to show value)
Example
Algorithm Optimization with Test Feedback
- LLM sees exactly which test cases failed in rejected programs
- Learns to avoid those specific mistakes
- Merges programs that pass different subsets of tests
Merge Operations
Proactive Merge
Triggered after each successful acceptance (if budget allows):Reactive Merge
Triggered after N iterations without improvement:Merge Deduplication
GEPA tracks which pairs have been merged to avoid redundant operations:Monitoring GEPA
Acceptance Rate
Track how many programs are accepted vs. rejected:- 10-30%: Healthy (gate is working)
- > 50%: Gate may be too loose or problem is easy
- < 5%: Gate may be too strict or stuck
Merge Success Rate
Rejection History
Advanced Configuration
Disable Components
You can disable individual GEPA features:Aggressive Merging
Comparison with Other Algorithms
Tips for Best Results
Rich Evaluator Feedback
GEPA shines when your evaluator returns detailed diagnostics in
artifacts. Include test failures, error messages, performance breakdowns.Multi-Metric Problems
Use multiple metrics in your evaluator. GEPA’s Pareto frontier and merge selection work best with 2-5 metrics.
Budget Merge Wisely
Merge operations are expensive (extra LLM call + eval). Set
max_merge_attempts based on your iteration budget (10-20% of total).Tune Stagnation Threshold
Lower
merge_after_stagnation for faster merge triggers, higher for more patience. Start with 15 and adjust based on typical improvement frequency.