Basic adapter for simple Q&A tasks.
Evaluates candidates by checking if the expected answer appears in the generated response. Suitable for testing and simple optimization tasks.
Note: This is a simplified adapter for testing. For production use, implement the GEPA.Adapter behavior directly.
Summary
Functions
Evaluate a batch of examples with the candidate program.
Build reflective dataset from evaluation results.
Create a new basic adapter.
Types
Functions
@spec evaluate( t(), [GEPA.Adapter.data_inst()], GEPA.Adapter.candidate(), boolean() ) :: {:ok, GEPA.EvaluationBatch.t()}
Evaluate a batch of examples with the candidate program.
@spec make_reflective_dataset( t(), GEPA.Adapter.candidate(), GEPA.EvaluationBatch.t(), [String.t()] ) :: {:ok, GEPA.Adapter.reflective_dataset()}
Build reflective dataset from evaluation results.
Create a new basic adapter.
Options
:llm_client- Module implementing generate/1 (default: GEPA.LLM.Mock):failure_score- Score for failed evaluations (default: 0.0)