ExAgent. Eval. Report
(ExAgent v3.0.0)
View Source
The results of ExAgent.Eval.run/3 and their summary.
Stability — Stable.
summary holds runs, passed, pass_rate, errors, per-evaluator
evaluators (mean, pass rate and number of scores per name), per-case
cases (%{name => pass_rate}), latency duration_ms (p50, p95, max),
token, request and tool-call subtotals (failed runs included), and cost_cents (nil
unless every run reported a cost). known_cost_cents sums the available
costs and partial subtotals, including those of failed runs. It is nil
when no run supplied a monetary amount.
summary.request_coverage and summary.tool_call_coverage describe the
counts received for summary.requests and summary.tool_calls independently.
Each is :complete when every attempt supplied a count (zero included),
:partial when only some did and :unknown when none did or the suite
was empty. Counts from partial results of failed attempts contribute on
the same basis. When a scenario turn is interrupted, counts from earlier
turns have partial coverage. ExAgent counts tool calls reserved in admitted batches.
Each evaluator has one entry in summary.evaluators (ExAgent.Eval.run/3
rejects repeated names). Each run's scores retains the individual results.
The scored count is the denominator for both the mean and pass rate.
Skips contribute nothing. A name with no scores has no summary entry.
Each evaluator entry has an errors count. It counts
grading errors included as zeros in scored. When a scoring batch times
out or exits, each discarded score counts once for its evaluator.
summary.grading_error_runs counts each target attempt with one or more
grading errors once. summary.errors counts failed target runs.
In summary.grading_coverage, total counts attempts without a target
error and scored counts how many received at least one emitted grade.
The zero recorded for a grading error does not contribute to coverage.
summary.all_skipped_runs counts successful target runs in which at least
one evaluator was configured and every evaluator skipped. These runs neither
pass nor count toward grading_coverage.scored.
summary.paused_runs counts attempts that returned successfully with status
:paused. Their evaluators can score whether the pause was expected.
summary.reliability maps each k from 1 to the fewest attempts of any
case (:repeat for ExAgent.Eval.run/3) to the mean over cases of
pass_at_k, the chance that at least one of k attempts passes
(1 - C(n - c, k) / C(n, k)), and pass_all_k (pass^k), the chance that
all k pass (C(c, k) / C(n, k)), for a case with c passes in n
attempts. summary.case_reliability[name][k] holds both metrics up to that
case's own attempt count. Every attempt that does not pass counts against
both metrics. Both maps are empty for an empty suite. The suite retains
pass_hat_k as an alias for pass_all_k.
summary.grading sums the usage of the grading models (ExAgent.Eval.judge/1 and
evaluators built with :model) over every attempt, in the shape of
ExAgent.Eval.Result grading: known input_tokens, output_tokens and
requests qualified by token_coverage and request_coverage,
cost_cents (nil unless every graded attempt reported one) and
known_cost_cents. It is nil when no attempt has grading usage, and it
is not part of the target's totals above.
The candidate summary.simulation sums the simulated users' usage in the same shape.
Each simulated attempt also retains its stop reason in Result.simulation.
summary.warnings lists {:judge_same_model, evaluator} for each
evaluator whose model has the {system, name} of the %ExAgent{}
target's model (any model of an ExAgent.Models.Fallback). A function
target gets no warnings.
summary.token_coverage qualifies the input and output subtotals separately.
:complete means every run supplied that dimension, :partial means only
a subtotal is known, and :unknown means no count was available.
A complete count can include normalized provider usage. A run can retain a
numeric count whose coverage is :unknown. Only counts with :complete
or :partial coverage contribute to that dimension's subtotal. A partial
count already summed within a run can include retained legacy counts whose
individual coverage was unknown.
Summary
Functions
Compare a candidate report with a baseline. added and removed list
cases unique to one side. pass_rate_delta compares all attempts in each
suite. common_case_pass_rate_delta averages the change across all shared
case names, weighted equally. It is nil when common_case_count is zero.
These suite and shared-name deltas are descriptive.
A plain-text summary and the failed runs, for a console or CI log.
Pass :include_content as true to include evaluator reasons and detailed
target errors. By default, failures show evaluator names or a portable
error diagnostic.
Load a versioned report, recalculating its summary. Reading is strict: an
unknown key or value is {:error, :invalid_report} and another version is
{:error, {:unsupported_report_version, v}}. A repeated attempt returns
{:error, {:duplicate_attempt, {case_name, attempt}}}. The reader
derives passes, reliability and grading coverage from the scores and checks
the supplied reliability against that calculation. The reader works in a
fresh VM, before the application starts.
Project an evaluation report to its versioned JSON representation
("format": "exagent.eval_report").
Types
Functions
@spec compare(t(), t()) :: %{ regressed: [{String.t(), float(), float()}], improved: [{String.t(), float(), float()}], added: [String.t()], removed: [String.t()], pass_rate_delta: float(), common_case_count: non_neg_integer(), comparable_case_count: non_neg_integer(), common_case_pass_rate_delta: float() | nil, pass_rate_delta_interval: {float(), float()} | nil, verdict: :improved | :regressed | :inconclusive | :no_common_cases | :no_comparable_cases, significant_regressions: [{String.t(), float(), float(), float()}], changed_cases: [String.t()], unverified_cases: [String.t()], ungraded_cases: [String.t()], method: String.t() }
Compare a candidate report with a baseline. added and removed list
cases unique to one side. pass_rate_delta compares all attempts in each
suite. common_case_pass_rate_delta averages the change across all shared
case names, weighted equally. It is nil when common_case_count is zero.
These suite and shared-name deltas are descriptive.
Comparable cases have scoring evidence and matching, verified digests in
both reports. A target error is evidence of failure. An attempt that
completed the target contributes evidence if at least one grade was
emitted and no grader reported an error.
The digest binds the input, expectations, case metadata, run
options, execution and grading timeouts, and versioned evaluators. A
scenario also binds its review configuration. The target may change. See
ExAgent.Eval.Case.new/3 and ExAgent.Eval.evaluator/3 for host versions.
comparable_case_count counts the eligible pairs. changed_cases lists
shared names with verified but different digests. unverified_cases
lists shared names with incomplete provenance. ungraded_cases lists
shared names with matching verified digests and no eligible attempts on
one or both sides.
regressed and improved list point changes on comparable cases.
The judgement is verdict (method: "beta_paired_v1"). Each comparable
case with c passes in n attempts has the posterior
Beta(1 + c, 1 + n - c) in each report. pass_rate_delta_interval is the
95% interval {low, high} of the mean change in those posterior means over
those pairs (normal approximation of a sum of independent cases). The
interval is nil without comparable cases. verdict is :regressed when
high < 0, :improved when low > 0, and :inconclusive when the
interval includes zero. :no_common_cases means no shared names and
:no_comparable_cases means none of the shared cases could be paired.
significant_regressions lists, as
{name, before, after, probability}, the comparable cases whose candidate is
worse with posterior probability P(p_candidate < p_base) >= 0.95,
computed exactly: a single pass that becomes a failure with one attempt
each gives 5/6 and is not significant. A failed run counts as a failed
attempt. The inference applies to this fixed subset of the suite.
A plain-text summary and the failed runs, for a console or CI log.
Pass :include_content as true to include evaluator reasons and detailed
target errors. By default, failures show evaluator names or a portable
error diagnostic.
When an evaluator skips, the summary lists its name and number of skips. A total below 0.01 cents keeps its reported precision. Integer totals are shown exactly, and larger floating-point totals are rounded to two decimals. Invalid UTF-8 is replaced in the formatted text. Results retain the original values.
@spec from_map(term()) :: {:ok, %ExAgent.Eval.Report{ cases: term(), created_at: term(), evaluators: term(), imported: term(), mode: term(), results: term(), suite: term(), summary: term() }} | {:error, :invalid_report | {:unsupported_report_version, term()} | {:duplicate_attempt, {String.t(), pos_integer()}}}
Load a versioned report, recalculating its summary. Reading is strict: an
unknown key or value is {:error, :invalid_report} and another version is
{:error, {:unsupported_report_version, v}}. A repeated attempt returns
{:error, {:duplicate_attempt, {case_name, attempt}}}. The reader
derives passes, reliability and grading coverage from the scores and checks
the supplied reliability against that calculation. The reader works in a
fresh VM, before the application starts.
@spec to_map( %ExAgent.Eval.Report{ cases: term(), created_at: term(), evaluators: term(), imported: term(), mode: term(), results: term(), suite: term(), summary: term() }, keyword() ) :: {:ok, map()} | {:error, :invalid_report}
Project an evaluation report to its versioned JSON representation
("format": "exagent.eval_report").
Version 1 stores case digests, provenance flags, evaluator versions,
reliability metrics, turn data and simulated-user accounting. A missing
grading recording can add a portable "diagnostic" to its score. The report
omits the underlying inputs and reviewer configuration. Errors keep only
their portable diagnostic.
By default, the map omits output previews and writes score reasons as
null. Pass include_content: true to include both, as with the Eval
CLI's --include-content. With content enabled, :output_preview sets
the byte limit per output (0 to 1,024, default 1,024). A limit of zero
omits the field. reasons: false writes null in place of score reasons,
which otherwise keep up to 2,048 bytes and can quote a reviewer's reasoning.