A mutation operator modifies a candidate solution to create a new candidate. In prompt optimization, it changes a prompt’s wording, instructions, or demonstrations; the modified prompt is then evaluated. section 6.5.1
Mutation works alongside crossover, which combines prompts. A search may select prompts from a pool for either operation. In GEPA, candidates on the Pareto front can be selected for mutation, with stronger candidates favored but others sometimes chosen to preserve exploration. section 6.5.1 section 6.5.2
Mutating a prompt
GEPA creates Prompt 3 by mutating Prompt 2. It first evaluates the new prompt on a minibatch, then evaluates it on the full validation set if it performs well. Because Prompt 3 scores highest on at least one example, it joins the Pareto front. section 6.5.2
Table 6.4 Maintaining the Pareto front after three steps
|
Prompt
|
Parent
|
Ex 1
|
Ex 2
|
Ex 3
|
Ex 4
|
Ex 5
|
In Pareto
|
|---|---|---|---|---|---|---|---|
|
1
|
–
|
0.5
|
0.6
|
0.7
|
0.4
|
0.1
|
False
|
|
2
|
1
|
0.6
|
0.7
|
0.8
|
0.5
|
0.0
|
True
|
|
3
|
2
|
0.4
|
0.3
|
0.2
|
0.3
|
0.2
|
True
|
Compare the example scores for Prompts 1, 2, and 3 and see which candidates remain on the Pareto front after mutation. section 6.5.2

