# `Nous.Eval.Sample`
[🔗](https://github.com/nyo16/nous/blob/v0.21.1/lib/nous/eval/sample.ex#L1)

One execution of one case, with its scores.

  * `:case_id` / `:index` - the case and the sample number (`0..k-1`)
  * `:seed` - the seed sent, or `nil`
  * `:trace_id` - the trace the sample ran under
  * `:outcome` - how the agent run ended: `:ok`, `:error`, `:killed`
    (timeout), or `:budget_exhausted` (never started or cancelled by the
    run budget)
  * `:output` - the agent's final output, `nil` unless `:ok`
  * `:error` - a printable description of the run error, or `nil`
  * `:verdict` - `:pass | :fail | :error` after composing the scorers
    (see `Nous.Eval.Scoring`); `nil` for a budget-exhausted sample
  * `:case_score` - the gated objective: `0.0` when a required scorer
    failed, else the weighted mean of the soft scorers (`1.0` with none);
    `nil` when the verdict is `:error`
  * `:scores` / `:scorer_errors` / `:skipped` - every scorer result,
    stored regardless of the verdict (`skipped` holds `{scorer, reason}`)
  * `:trace` - the `Nous.Eval.Trace`
  * `:usage` / `:cost` / `:duration_ms` / `:iterations` - resource use;
    `cost` is `nil` when no price is known

# `outcome`

```elixir
@type outcome() :: :ok | :error | :killed | :budget_exhausted
```

# `t`

```elixir
@type t() :: %Nous.Eval.Sample{
  case_id: String.t(),
  case_score: float() | nil,
  cost: float() | nil,
  duration_ms: non_neg_integer(),
  error: String.t() | nil,
  index: non_neg_integer(),
  iterations: non_neg_integer(),
  outcome: outcome(),
  output: term(),
  scorer_errors: [Nous.Eval.ScorerError.t()],
  scores: [Nous.Eval.Score.t()],
  seed: integer() | nil,
  skipped: [{String.t(), String.t()}],
  trace: Nous.Eval.Trace.t() | nil,
  trace_id: String.t() | nil,
  usage: Nous.Usage.t(),
  verdict: verdict() | nil
}
```

# `verdict`

```elixir
@type verdict() :: :pass | :fail | :error
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
