Dsxir.Optimizer.GEPA.FeedbackPool (dsxir v0.2.0)

Copy Markdown

Samples reflective rollouts from a single individual's per-example score and feedback arrays. Returns up to K_success best-scoring entries and up to K_fail worst-scoring entries, skipping entries where feedback is nil.

Summary

Functions

Returns up to k_success best-scoring rollouts and up to k_fail worst-scoring rollouts from ind, in insertion order with duplicates by example_idx removed. Entries with nil score or feedback are skipped.

Types

rollout()

@type rollout() :: %{example_idx: non_neg_integer(), score: float(), feedback: term()}

Functions

sample_rollouts(ind, k_success, k_fail, rng_state)

@spec sample_rollouts(
  Dsxir.Optimizer.GEPA.Individual.t(),
  k_success :: non_neg_integer(),
  k_fail :: non_neg_integer(),
  rng :: term()
) :: {[rollout()], rng :: term()}

Returns up to k_success best-scoring rollouts and up to k_fail worst-scoring rollouts from ind, in insertion order with duplicates by example_idx removed. Entries with nil score or feedback are skipped.