GEPA.Adapters.Default (GEPA v0.3.0)

Copy Markdown View Source

Official-style default adapter for simple text-in/text-out tasks.

The adapter calls a task model with chat messages, evaluates the response, and builds reflective records from captured trajectories. It is useful when users want to optimize one prompt without writing a custom adapter first.

Summary

Functions

Create a default adapter.

Types

evaluator_result()

@type evaluator_result() ::
  float()
  | {float(), String.t()}
  | {float(), String.t(), %{required(String.t()) => float()} | nil}
  | %{
      score: float(),
      feedback: String.t(),
      objective_scores: %{required(String.t()) => float()} | nil
    }

t()

@type t() :: %GEPA.Adapters.Default{
  evaluator: (map(), String.t() -> evaluator_result()) | nil,
  failure_score: float(),
  model: function() | GEPA.LLM.t()
}

Functions

new(opts)

@spec new(keyword()) :: t()

Create a default adapter.