Evaluations
An evaluation suite is a set of test cases for an agent or a function, each pinned to a snapshot of the Ontology and graded automatically. Suites run on every publish, on a schedule, and whenever something underneath changes, such as a model route. Their scores gate releases: no agent version and no AI function version reaches Stable without passing. Every case keeps its history, so a regression shows up as a specific case that used to pass, not as a vague drop in quality
In the platform today
- Evaluation suites run in the platform service against an AI function, a registered function or an agent
- Suites come from
ontology.yamlunderevaluations:or fromPOST /api/v2/evals/suites, with atarget,cases(each withinputsandexpect),iterations(1 to 20),parallelism(4 by default, up to 16) and a pass-ratethreshold - The built graders are
exact,contains,numeric,jsonField,listIncludes,proposal,toolUsed,latencyandjudge, a model judge with a rubric - Every target runs dry, including AI functions an agent reaches through its tools: proposals are recorded and graded, never staged
stageProposals: trueon a suite stages them as real proposals waiting for a person- A case passes when every iteration passes; results land in
ops.eval_runsandops.eval_results, and in MLflow when it is available POST /api/v2/evals/suites/{id}:runruns a suite, andPOST /api/v2/evals/gateruns every suite for a target version and fails when a suite is below its threshold or a case that passed last time now fails; publishing an AI function goes through it
- Pinned snapshots, object-set, trajectory and custom graders, calibration, schedules, dependency reruns, cost caps and the full gate
# ontology.yaml, as built
evaluations:
triage-suite:
target: { aiFunction: triage } # or { function: name } or { agent: id }
iterations: 3
threshold: 0.9
cases:
- id: high
inputs: { defect: DEF-1042 }
expect:
- { kind: exact, path: risk, value: high }
- { kind: judge, rubric: The summary names the aircraft }
- Editor role on the target's project to write and run suites, and Owner to change a gate or override a blocked one
- The access labels on the objects the cases read, held by the person running the suite
- A model route in the model gateway for rubric judges, separate from the target's own route
Suites and cases
A suite belongs to one target: an agent, an AI function or a registered function. It holds cases and a pass-rate threshold. A case is one input with its expected outcome. Cases are cheap to write, and a suite grows as real runs show what matters
| Part of a case | What it holds | Example |
|---|---|---|
inputs | The arguments, or the agent run input | island shops, Thursday 13:00 |
expect | The graders and what they compare against | Proposes reallocate-tubs of 6 to 10 tubs to the shop at risk |
On request, cases pinned to a snapshot. Snapshots are what make agent evaluations repeatable. Without them a case written in July would be graded in October against October's stock, and its expected answer would be wrong for reasons unrelated to the agent. A pinned case reads exactly the objects that existed when it was written, through time travel on the backing tables, while still running live model calls
Graders
A grader checks one aspect of an output and passes, fails, errors or is skipped. An iteration passes only when every grader that ran passes, a case passes only when every iteration passes, and the run's pass rate is passed cases over all cases
| Grader | Passes when | Use for |
|---|---|---|
exact | The value at path equals value, optionally ignoring case and trimming | Categories, enums, booleans, primary keys |
contains | The text at path contains text | Names or terms a summary must mention |
numeric | The number at path is value within tolerance, or between min and max | Hours of cover, tubs, temperatures, costs |
jsonField | Fields of the output equal the given values | Structured replies |
listIncludes | The list at path includes all, or any, of items | At-risk shops, cited evidence |
proposal | A proposal of action was made with the given parameters, or none with absent: true | Whether an agent proposed the right change |
toolUsed | The target used tool | That an agent checked before it proposed |
latency | The target answered within maxMs | Keeping releases fast |
judge | A model judge reads rubric and the output and returns pass or fail with a reason | Draft replies, summaries, rationales |
Rubric graders
The judge grader uses a language model to grade an output against a written rubric, and stores its reason with the result. On request, rubric graders count towards a gate only once calibrated against people's labels
Object-set graders
On request, object-set graders. Many operational answers are sets of objects: the shops at risk, the deliveries affected by a hold, the batches a complaint concerns. An object-set grader compares the output set with the expected set by primary key and reports precision, recall, F1 and Jaccard similarity. Pick the metric by the cost of each kind of error. A recall scope that misses a shop is a food safety problem, so line_hold cases grade on recall. A list of shops to call this afternoon wastes a person's time with every false positive, so it grades on precision
Trajectory graders
On request, trajectory graders. Outcome graders say whether an agent got the right answer. Trajectory graders say whether it got there sensibly. They read the run's trace and check the path
- It called
room_leftbefore proposing a top-up - It never called a tool more than a set number of times
- It finished within a step budget
- No guardrail blocked it
An agent that reaches the right proposal in fourteen steps when four would do is slow and expensive in use, and is often one bad tool result away from the wrong proposal. Trajectory graders catch that before release. Today toolUsed checks that a tool was called
Writing a suite
Suites are written in ontology.yaml under evaluations:, as in the example above, or sent to POST /api/v2/evals/suites. On request, suites built in the console from traces
For agents and AI functions, set iterations to 3 or more. Model outputs vary between runs even at low temperature, and a case that passes once may fail one time in five. A case passes only when every iteration passes, which separates a dependable case from a flaky one
When suites run
- On publish. Publishing an AI function runs the gate for that version
- On demand. With
POST /api/v2/evals/suites/{id}:run, orPOST /api/v2/evals/gatefor every suite of a target version - On dependency change and on a schedule. On request, suites rerun when a tool function, model route or redaction rule they depend on changes, and nightly against the released version to catch drift from model providers
Cases run in parallel, up to 16 at a time and 4 by default. Evaluation runs use the same model gateway and budgets as production. Results are written to ops.eval_runs and ops.eval_results, and to MLflow when it is available. On request, a cost cap per suite run
Release gates
A gate turns a suite's results into a decision. The gate fails when a suite is below its threshold or a passing case now fails. On request, gates on critical cases, cost and latency, with Owner overrides
Regression tracking
Suite scores move for three reasons: the target changed, something under it changed, or the cases changed. The regression view separates them. Each case has a history across every version and every scheduled run, shown as a strip of passes and fails, and each change in a case's result is attributed to the version, route or dependency change that coincided with it
- Newly failing cases are listed first on every run, with the diff between the last passing output and the current one
- Flaky cases, those that pass on some recent runs and fail on others, are flagged and excluded from the regression count until someone tightens the case or the target
- Drift on scheduled runs, a score change with no version change, raises a review task for the owner with the model route's recent changes attached
- Coverage reports which tags, tools and action types the suite exercises, and which tools an agent can call that no case touches
Cases from production
The best cases come from real runs. From any trace, "add to suite" creates a case with the run's input and snapshot pinned and its actual outcome as the draft expectation, which you then correct. Rejected proposals are the richest source. When an approver rejects or edits an agent's proposal, the platform offers to turn the run into a case with the approver's version as the expected action. Over a season, a suite built this way comes to encode exactly the judgement the operations team applies
Hold back about one case in five as a validation set that prompt and instruction changes are not tuned against. If the main suite score climbs and the held-back score does not, the agent is learning the test rather than the job
Limitations
- Model calls are live, so agent and AI function scores are measurements with variance, not fixed results
- A judge can never run on the same model route as its target
- Flaky cases are excluded from the regression count until someone fixes them, so a suite with many flaky cases gates on less than it appears to
- Proposals made during a suite run are test runs; a suite cannot check what happens after an action commits, such as writeback or side effects