# `GEPA.EvaluationBatch`
[🔗](https://github.com/nshkrdotcom/gepa_ex/blob/v0.3.0/lib/gepa/evaluation_batch.ex#L1)

Container for per-example evaluation results returned by an adapter.

GEPA treats outputs and trajectories as opaque user data, but it relies on a
strict one-to-one alignment between `outputs`, `scores`, optional
`trajectories`, and optional `objective_scores`. This mirrors the Python
reference contract and keeps bugs in adapters from leaking into optimizer
state.

# `t`

```elixir
@type t() :: %GEPA.EvaluationBatch{
  num_metric_calls: non_neg_integer() | nil,
  objective_scores: [%{required(String.t()) =&gt; number()}] | nil,
  outputs: [term()],
  scores: [float()],
  trajectories: [term()] | nil
}
```

# `normalize_scores`

```elixir
@spec normalize_scores(t()) :: t()
```

Return a copy whose scores are floats.

# `valid?`

```elixir
@spec valid?(
  term(),
  keyword()
) :: boolean()
```

Validate that a batch satisfies the official GEPA adapter invariants.

# `validate`

```elixir
@spec validate(
  term(),
  keyword()
) :: :ok | {:error, term()}
```

Return `:ok` for a valid batch or a precise error tuple otherwise.

# `validate!`

```elixir
@spec validate!(
  t(),
  keyword()
) :: t()
```

Raise unless a batch is valid; otherwise return the batch unchanged.

---

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