Dsxir.Optimizer.GEPA.Individual (dsxir v0.4.0)

Copy Markdown

One member of the GEPA population. Carries the delta that produced it, its per-example scores and feedback (positionally aligned with the pinned devset), and provenance.

id is deterministic from {parent_ids, delta, generation} so the same inputs produce the same id across runs.

Summary

Functions

Builds an Individual from a delta plus its per-example evaluation results. Id is derived deterministically from {parent_ids, delta, generation}, so the same inputs yield the same id across runs.

Types

id()

@type id() :: String.t()

predictor_feedback()

@type predictor_feedback() :: %{required(atom()) => String.t() | nil}

t()

@type t() :: %Dsxir.Optimizer.GEPA.Individual{
  aggregated: float() | nil,
  born_at: DateTime.t(),
  delta: Dsxir.Optimizer.GEPA.Delta.t(),
  feedback: [predictor_feedback() | String.t() | nil],
  generation: non_neg_integer(),
  id: id(),
  operator: :seed | :mutate_instr | :mutate_demos | :crossover,
  parent_ids: [id()],
  scores: [float() | nil]
}

Functions

new(delta, scores, feedback, parent_ids, operator, generation)

@spec new(
  Dsxir.Optimizer.GEPA.Delta.t(),
  [float() | nil],
  [predictor_feedback() | String.t() | nil],
  parent_ids :: [String.t()],
  operator :: atom(),
  generation :: non_neg_integer()
) :: t()

Builds an Individual from a delta plus its per-example evaluation results. Id is derived deterministically from {parent_ids, delta, generation}, so the same inputs yield the same id across runs.