ExAgent. Eval. Result
(ExAgent v3.0.0)
View Source
One run of one case. scores holds %{name, score, passed, reason} per
evaluator (score and passed are nil when it skipped). A grading
error adds the optional key error: true and records zero and a failed
check. Use Map.get(score, :error) == true to identify these scores.
The attempt's passed is true when at least one evaluator issued a
grade, every grade passed and neither the target nor any grader failed.
Abstentions and grading errors supply no grade.
A missing or ambiguous grading recording adds :diagnostic with type
"fixture_miss" or "fixture_ambiguous" to the failing score.
A failed run keeps
the usage its partial result reports; usage fields are nil when there is
none (a timeout, a raise or a target without a result).
token_coverage qualifies input and output separately as :complete,
:partial or :unknown. When a successful run reports one direction as
available and the other as partial or unavailable, the available count
keeps its complete coverage. An overall partial status still qualifies
both counts when the target provides no directional accounting.
cost_cents is the run's reported total. known_cost_cents retains that
total or the known subtotal when only part of the run could be priced.
run_status retains the target's reported :succeeded, :paused,
:failed, :cancelled or :running status. Runs, Composition and Flow
report success as :succeeded. Absent or unrecognized statuses give nil.
An evaluator can pass a run whose status is :paused.
Stability — Stable.
The candidate scenario fields include turn_count, the number of user turns
attempted. Its counts cover the entire conversation. Resuming a turn
replaces its paused accounting with the cumulative result.
If an attempt exits during a turn, incomplete_turn is true and the
available counts cover previously finished turns. The total cost is unknown.
A simulated scenario also records the candidate simulation field with stop and usage.
The stop is :condition_met, :max_turns, :paused, :failed or
:interrupted. The usage uses the same qualified shape as grading
below and counts only the simulated user. It is nil if the simulator
did not run. A timeout retains previously closed simulator requests and
gives an in-flight request unknown coverage.
continuation_id is the logical ID returned by a successful paused target,
when present as a valid UTF-8 string of 1 to 512 bytes. Other attempts
record nil. Use the ID with the trusted scoped Store and the host's
approval policy. Resume through the API appropriate for the target.
IDs supplied by the host are visible to readers of the result.
grading is the usage of the attempt's grading models, summed over its
evaluators, or nil when no evaluator reported usage or grades with a
model: input_tokens, output_tokens and requests are known subtotals
qualified by token_coverage (%{input, output}) and request_coverage,
each :complete, :partial or :unknown; cost_cents is nil unless
every part reported a cost, and known_cost_cents sums the known costs. An
evaluator built with :model that reports no usage, raises or times out
leaves its part unknown, never zero. See ExAgent.Eval.evaluator/3.
Summary
Types
@type t() :: %ExAgent.Eval.Result{ attempt: term(), case: term(), continuation_id: term(), cost_cents: term(), duration_ms: term(), error: term(), fixture: term(), grading: term(), incomplete_turn: term(), input_tokens: term(), known_cost_cents: term(), output: term(), output_tokens: term(), passed: term(), requests: term(), run_status: term(), scores: term(), simulation: term(), token_coverage: term(), tool_calls: term(), turn_count: term() }