GEPA (Genetic-Pareto) is a prompt optimization method published in 2025 by researchers from UC Berkeley, Stanford University, Databricks and other institutions. A language model reflects in natural language on the execution traces and evaluation results of a multi-step AI system, diagnoses the causes of failure, and rewrites the prompt of each step accordingly. Candidates that achieve the best score on at least one evaluation example are kept on a Pareto frontier, so that candidates with different strengths continue to be developed.
Because it does not modify model weights, GEPA can be applied to models that are accessible only through an API. It is available as an open-source library and as an optimizer in the prompt programming framework DSPy.