Skip to content
Talk to our solutions team

Eval Files and Scorers

An eval names a golden set and the scorers that check each field of an answer against the case’s expected answer. This page lists the keys of both files and the scorer kinds. kis spec checks both files, and kis test eval run and kis test eval send refuse an eval with a key it does not have.

An eval file sits in tests/evals/ and holds one key, evals:, a map of evals by name. A file may hold several evals.

tests/evals/servicing.yaml
evals:
grade: # ref: tests/evals/servicing.yaml#grade
title: Servicing comments, grade
scores: servicing_comments
golden: servicing-comments
scorers:
- {field: grade, kind: equals, fails: true}
- {field: categories, kind: set_overlap}
- {field: summary, kind: reference_semantic, min: 0.8}
fail_on: fail
thresholds:
pass_rate: {min: 0.95}
verifies: [SAR-REQ-12]
KeyRequiredDescription
titleyesWhat the Studio calls the eval
goldenyesThe golden set it scores against, by name: tests/evals/golden/<name>/
scorersyes, at least oneHow each field of an answer is checked; see below
runnoHow talos runs the eval itself (kis test eval run). Without it, a harness runs it and reports (kis test eval send)
fail_onnoWhat fails the eval: fail (the default), any, or none
thresholdsnoBounds on the run’s metrics, by metric: {min, max}
scoresnoWhat it scores: a feature, a flow or a prompt, in the product’s own word
verifiesnoRequirement keys the eval verifies
description, tagsnoWords and tags for the Studio

An eval’s name, and a golden set’s, is lowercase letters, digits, dots, dashes and underscores, starting with a letter or a digit (^[a-z0-9][a-z0-9._-]*$).

ValueThe eval fails when
faila check failed
anya check failed or warned
noneno check fails it: the eval reports, and passes with warnings when checks did not pass

A threshold that is not met fails the eval under every fail_on.

A threshold bounds a metric of the run with min, max or both:

  • pass_rate, the share of checks that passed, is always measured.
  • A harness’s report may give other metrics (f1, say), and a threshold may bound them.
  • A threshold on a metric the run does not give refuses the run.
evals:
triage:
title: Ticket triage
golden: tickets
scorers:
- {field: priority, kind: equals, fails: true}
- {field: tags, kind: set_overlap, min: 0.5}
run:
profiles: [azure-prod, anthropic-eval]
model: model
concurrency: 4
call:
http:
url: "{{base_url}}/triage"
method: POST
body: {type: raw, payload: '{"ticket": {{ case.input | json }}, "profile": "{{profile}}"}'}
response:
variables:
priority: response.priority
tags: response.tags
model: response.model
assertions:
- status_code == 200
KeyDescription
callOne test step made for each case: an http, cli, script or grpc step, or a group. case (its id, input and metadata, never its expected) and profile are in scope. The variables the step captures are the fields of the answer.
profilesProvider profiles, one run each, as {{profile}} in the call. The profile’s keys stay in the environment that runs it.
modelThe captured variable that names the model that answered
concurrencyCases called at once, 1 to 32; 1 by default

The call takes its variables, HTTP defaults and databases from the tests folder’s suite.yaml files and the environment file, as a test step does. A call that errors, or whose assertions fail, is one failed check of the case’s field call.

A golden set is a folder, tests/evals/golden/<name>/, holding golden.yaml and its cases file.

tests/evals/golden/servicing-comments/golden.yaml
golden:
title: Servicing comments
source: synthetic
case: Loan
cases: cases.jsonl
KeyRequiredDescription
titleyesThe set’s name on the screens
sourceyessynthetic. AI Evals scores synthetic golden sets; evals on a customer’s own data stay in the product.
casesyesThe cases file beside golden.yaml, ending in .jsonl
casenoWhat one case is called on the screens (Loan, Ticket); Case by default
descriptionnoWords for the Studio

The cases file holds one JSON object a line:

{"id": "L-1001", "input": {"comment": "Borrower called about the late fee."}, "expected": {"grade": "B", "categories": ["fees"]}, "metadata": {"branch": "north"}}

Each case has an id, unique in the set. input and metadata are what the call or the harness sees; expected is what the scorers check against.

A golden set’s version is the content hash of its folder’s files at a commit: a change to any of them is a new version. In the Studio, a version scores only after a person makes it active; see Running AI evals.

Each scorer checks one field: the case’s expected value at field against the answer’s.

KeyDescription
fieldThe field checked; a dotted path reaches into objects (result.grade)
kindThe scorer kind; see below
failstrue: a check that does not pass fails. Otherwise it warns
min, maxA graded kind’s pass marks on its 0 to 1 score. min is 0.8 when not given
toleranceapprox_equals’s tolerance
paramsThe kind’s own settings

How a check passes:

  • A predicate kind (equals, one_of, matches, …) passes or does not.
  • A graded kind scores 0 to 1 and passes from min (0.8 by default) up to max, when given.
  • in_range and length_within take min and max as the bounds of the value or its length.

A check that does not pass fails when its scorer has fails: true, and warns otherwise.

GroupKinds
Comparisonequals, not_equals, approx_equals, in_range, one_of, not_one_of, exists, is_type, json_path_equals, conforms
Textcontains, not_contains, starts_with, ends_with, matches, length_within, exact_match
Setsset_overlap: the overlap of the answer and the expected value taken as sets (shared items over all items), graded. A list is a set of its items, a string a set of its comma-separated parts
Text overlap, gradedtoken_f, char_f, bleu, meteor, rouge_1, rouge_2, rouge_l, edit_distance
Model-based, gradedreference_semantic (closeness of meaning to the expected answer, with embeddings), rubric, factuality, pairwise (a judge model)
Safetypii
Customscript

reference_semantic and the judge kinds call a model; see Judge and embedding models.

A harness that scores with a safety classifier or a tokenizer of its own reports those checks through kis test eval send under their kinds: prompt_injection, jailbreak, refusal, token_count_under and token_cost_under. kis test eval run runs the kinds in the table above.

Each check that does not pass names how the answer differs. Under kis test eval run:

DifferenceWhen
matchThe check passed
missingThe answer has no value at the field, or a set lacks expected items
extraA set holds items the expected answer does not
higher, lowerA number above or below the expected value or the bounds
value-differsAny other difference in value
wrong-categoryone_of or not_one_of did not pass
keyword-missing, keyword-unexpectedcontains or not_contains did not pass
semantic-driftA text-overlap or model-based score is under its pass mark
not-scoredThe scorer could not score the value; the reason says why
call-failedThe call for the case failed (field call)

A harness names its own differences in its report. The Studio shows the words above, and any other word as it was sent.

Each check also carries a reason: what was expected and what came, or the score and its pass mark, with what a set lacked or added and a judge’s answer.

Continue with CLI and report format.