Aludel.Evals.Report (aludel v0.7.0)

Copy Markdown View Source

A normalized, versioned representation of an evaluation suite run.

Reporters consume this struct instead of reading persistence schemas directly. This keeps output formats stable while the database representation evolves. Use from_suite_run/1 to create a report and to_map/1 when a plain map is needed for serialization.

Summary

Types

The final quality decision: passed, failed, invalid, or unavailable.

t()

Functions

Builds a schema-version-2 report from a persisted suite run.

Returns the report as a JSON-compatible map with string keys.

Types

status()

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

The final quality decision: passed, failed, invalid, or unavailable.

t()

@type t() :: %Aludel.Evals.Report{
  prompt_version_id: binary(),
  provider_id: binary(),
  quality_policy: map() | nil,
  results: [map()],
  schema_version: pos_integer(),
  status: status(),
  suite_id: binary(),
  suite_run_id: binary(),
  summary: map(),
  type: String.t()
}

Functions

from_suite_run(suite_run)

@spec from_suite_run(Aludel.Evals.SuiteRun.t()) :: t()

Builds a schema-version-2 report from a persisted suite run.

A quality-policy result determines the report status when present. Runs without a policy pass only when they contain at least one result and every result passed.

to_map(report)

@spec to_map(t()) :: map()

Returns the report as a JSON-compatible map with string keys.