Crossover combines two or more candidate prompts to create a new prompt for evaluation. In genetic algorithms, it is commonly paired with mutation; GEPA performs one of these operations at a time. section 6.5.1
Candidates for crossover are selected from a pool. In GEPA, that pool is the Pareto front: prompts that score highest on at least one validation example. section 6.5.2
Figure 6.4 The first four steps in generating and evaluating candidate prompts in the GEPA optimizer. The nodes indicate single prompts. Those in gray are in the Pareto front and may be used to create subsequent candidate prompts. After step 1, we have a single prompt, which is the prompt related to the DSPy program passed to the GEPA optimizer. In step 2, we mutate this prompt, creating Prompt 2, and evaluate it on the validation set. As long as this prompt is the top-performing prompt on at least one example in the validation set, it becomes part of the Pareto front. In step 3, we can either mutate or combine prompts from the Pareto front. In this case, we combine Prompts 1 and 2, creating Prompt 3. This prompt is the top-scoring prompt on at least one example, so it enters the Pareto front, but Prompt 1 is no longer part of the Pareto front. In step 4, we can again either mutate or combine elements of the Pareto front. In this case, we mutate Prompt 3, creating Prompt 4, which also becomes part of the Pareto front.
The figure traces candidate prompts through mutation and crossover, showing how combining two prompts creates a new candidate that is evaluated. section 6.5.2






