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.
Eval files
Section titled “Eval files”An eval file sits in tests/evals/ and holds one key, evals:, a map of evals by name. A
file may hold several evals.
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]| Key | Required | Description |
|---|---|---|
title | yes | What the Studio calls the eval |
golden | yes | The golden set it scores against, by name: tests/evals/golden/<name>/ |
scorers | yes, at least one | How each field of an answer is checked; see below |
run | no | How talos runs the eval itself (kis test eval run). Without it, a harness runs it and reports (kis test eval send) |
fail_on | no | What fails the eval: fail (the default), any, or none |
thresholds | no | Bounds on the run’s metrics, by metric: {min, max} |
scores | no | What it scores: a feature, a flow or a prompt, in the product’s own word |
verifies | no | Requirement keys the eval verifies |
description, tags | no | Words 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._-]*$).
fail_on
Section titled “fail_on”| Value | The eval fails when |
|---|---|
fail | a check failed |
any | a check failed or warned |
none | no 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.
thresholds
Section titled “thresholds”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| Key | Description |
|---|---|
call | One 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. |
profiles | Provider profiles, one run each, as {{profile}} in the call. The profile’s keys stay in the environment that runs it. |
model | The captured variable that names the model that answered |
concurrency | Cases 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.
Golden sets
Section titled “Golden sets”A golden set is a folder, tests/evals/golden/<name>/, holding golden.yaml and its cases
file.
golden: title: Servicing comments source: synthetic case: Loan cases: cases.jsonl| Key | Required | Description |
|---|---|---|
title | yes | The set’s name on the screens |
source | yes | synthetic. AI Evals scores synthetic golden sets; evals on a customer’s own data stay in the product. |
cases | yes | The cases file beside golden.yaml, ending in .jsonl |
case | no | What one case is called on the screens (Loan, Ticket); Case by default |
description | no | Words 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.
Scorers
Section titled “Scorers”Each scorer checks one field: the case’s expected value at field against the answer’s.
| Key | Description |
|---|---|
field | The field checked; a dotted path reaches into objects (result.grade) |
kind | The scorer kind; see below |
fails | true: a check that does not pass fails. Otherwise it warns |
min, max | A graded kind’s pass marks on its 0 to 1 score. min is 0.8 when not given |
tolerance | approx_equals’s tolerance |
params | The 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 tomax, when given. in_rangeandlength_withintakeminandmaxas the bounds of the value or its length.
A check that does not pass fails when its scorer has fails: true, and warns otherwise.
| Group | Kinds |
|---|---|
| Comparison | equals, not_equals, approx_equals, in_range, one_of, not_one_of, exists, is_type, json_path_equals, conforms |
| Text | contains, not_contains, starts_with, ends_with, matches, length_within, exact_match |
| Sets | set_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, graded | token_f, char_f, bleu, meteor, rouge_1, rouge_2, rouge_l, edit_distance |
| Model-based, graded | reference_semantic (closeness of meaning to the expected answer, with embeddings), rubric, factuality, pairwise (a judge model) |
| Safety | pii |
| Custom | script |
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.
Differences
Section titled “Differences”Each check that does not pass names how the answer differs. Under kis test eval run:
| Difference | When |
|---|---|
match | The check passed |
missing | The answer has no value at the field, or a set lacks expected items |
extra | A set holds items the expected answer does not |
higher, lower | A number above or below the expected value or the bounds |
value-differs | Any other difference in value |
wrong-category | one_of or not_one_of did not pass |
keyword-missing, keyword-unexpected | contains or not_contains did not pass |
semantic-drift | A text-overlap or model-based score is under its pass mark |
not-scored | The scorer could not score the value; the reason says why |
call-failed | The 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.