Synaptic.Scorer.Result (synaptic v0.2.6)

View Source

Standardized result returned by scorers.

The score field is a numeric value (usually between 0.0 and 1.0) that represents how well the step output satisfied the scorer's criteria. The reason and details fields are optional but recommended for debugging and observability.

Summary

Functions

Convenience constructor for scorer results.

Types

t()

@type t() :: %Synaptic.Scorer.Result{
  details: map(),
  name: String.t(),
  reason: String.t() | nil,
  run_id: String.t(),
  score: number(),
  step: atom(),
  timestamp: NaiveDateTime.t() | nil
}

Functions

new(opts)

@spec new(Keyword.t()) :: t()

Convenience constructor for scorer results.

The :name, :step, :run_id, and :score keys are required. A timestamp will be filled in with NaiveDateTime.utc_now/0 if not explicitly provided.