Getting started¶
Your first evaluation, in about fifteen minutes, offline and with no API key: create a
dataset, run a few systems on it, make a reference from the best one's run, compare them
honestly, and choose one. Every command below was run as written, and the output shown is
what it printed (make guide-check runs this page in a fresh project on every change).
You work in a project of your own, as you will for real: a new folder, the harness installed
as a package, and the tutorial kit copied in. The running example is a support-ticket
summariser. The kit (harness/tutorial/ in this repository)
has six invented tickets, four systems and a goal. The "systems" are the harness's offline
echo provider, which returns the first n sentences of its input: a stand-in that behaves
like a model without needing one. A real model, local or hosted, is the
tutorials' subject.
The loop in one picture¶
sources/ ──dataset-create──▶ datasets/<id>.json ──dataset-materialize──▶ materialized/<id>/
(your items) (item list + sha256) (hash-checked copy)
systems/<id>.yaml ──evh run──▶ runs/<run_id>/ outputs, per-item scores, cost, speed,
(what you evaluate) (on a dataset) fingerprint: data + code + model + build
│
label-from-run ──▶ labels/<id>/<set>/ ──reference-promote──▶ references/silver/<id>/ (optional)
│
leaderboard · pair-test · family-test
│
run-promote ──▶ baselines/<goal>/<id>/<n>.json (a decision + why + its test)
| term | what it is | lives in | edited? |
|---|---|---|---|
| source | one input item, any file | data/sources/ or anywhere |
never, once frozen |
| dataset | a frozen list of items with the sha256 of each: the comparison contract | data/datasets/<id>.json |
never; a change is _v2 |
| materialized | a hash-checked working copy of the dataset | data/materialized/<id>/ |
derived; delete freely |
| system | what you evaluate: provider, model, prompt, settings; no dataset (a run names it) | data/systems/<system_id>.yaml |
a change is a new system_id |
| run | one pass of an arm over a dataset: outputs, scores, fingerprint | data/runs/<run_id>/ |
never |
| label | what is right for one item, and who said it: a person, a model or a rule; in sets | data/labels/<dataset>/<set>/ |
never; a correction is a new set |
| reference | what each item is scored against: labels promoted at gold (the yardstick) or silver (good for ranking) | data/references/<tier>/<id>/ |
never; a change is a new one |
| goal | what the evaluation is for: who uses the output, the decision, the measure | data/goals/<goal_id>.yaml |
yes |
| baseline | the run you chose to measure future changes against, with why | data/baselines/ |
replaced by the next choice, never edited |
0 · Set up¶
A new folder, a virtual environment, and the harness pinned to a release. One install is everything: the hosted-model clients, the judges, the catalog. Nothing else to add.
mkdir my-evals && cd my-evals
python3 -m venv .venv && . .venv/bin/activate
pip install "evaluation-harness @ git+https://github.com/chipi/eval-harness@v0.8.3#subdirectory=harness"
Then the project's folders and the tutorial kit, under version control from the start. --store is required and has no default: files keeps every run, label and score as a file under data/, in git; sqlite keeps the data in one database file, data/project.sqlite, out of git. They are equal choices (this guide uses files; evh data-migrate switches later).
evh init --store files --tutorial
git init -q && git add -A && git commit -qm "Start: the tutorial kit"
folders data/sources, data/systems, data/goals, data/fields
wrote 30 file(s), the tutorial kit under tutorial/
data/ is where everything the harness freezes and records will live (data/project.yaml records its format); tutorial/ is the
kit; .gitignore already keeps out what the harness derives (materialized copies, the
catalog build, caches, your .env). AGENTS.md (and CLAUDE.md, which imports it) tells an
agent working in the project its rules, the loop and how to read results; edit it to add what is
particular to yours. Every command from here runs from this folder.
1 · Create a dataset¶
evh dataset-create --dataset-id tickets_v1 --source-dir tutorial/tickets
data/datasets/tickets_v1.json (6 item(s))
data/datasets/tickets_v1.json lists every item with the sha256 of its bytes. From now on
tickets_v1 means those six byte strings: every run records the dataset's hash, and
run-compare refuses to compare runs across two different datasets. Name a dataset for what
it is (support_tickets_2026q1_v1), not for what you are doing (test2). If an input
changes, make tickets_v2: editing a frozen item silently invalidates every number measured
on it (tutorial 4 makes a version).
Keep your sources under version control (or gitignore them, if you cannot redistribute them: the dataset's hashes are the record either way). An untracked input makes the tree "dirty", and a run from a dirty tree cannot become a reference or a baseline.
2 · Materialize¶
evh dataset-materialize --dataset-id tickets_v1
data/materialized/tickets_v1 (6 item(s), all hashes verified)
A working copy, re-checked against the frozen hashes. If a source changed since the freeze, this fails instead of quietly measuring different bytes.
3 · Describe your systems¶
A system is a YAML file, named by its id. Everything that defines it goes in params, so two
systems differ only where their files do, and the run's fingerprint will say exactly where. It
names no dataset: a run puts it on one, and the same system runs on any.
# data/systems/tickets_lead2_v1.yaml
system_id: tickets_lead2_v1 # unique, versioned: change the system, bump the id
params:
provider: echo # your adapter decides what these mean
sentences: 2
cp tutorial/systems/tickets_*.yaml data/systems/
In a --store sqlite project data/ holds only project.sqlite, so cp has no folder to copy
into. Put each file with evh data-put --path systems/<file> --file tutorial/systems/<file>,
which works in both stores (for the goal below: --path goals/tickets_summary.yaml).
The four systems: lead1 (one sentence), lead2 (two), lead2_noisy (two, with random word
drops: what a model at temperature > 0 looks like), and author (three), the most thorough
system we have, which will write the reference.
Say what the evaluation is for. A goal names who uses the output, the decision it informs,
the measure that decides it and which direction is better, and the datasets it rests on. It is
optional, and worth the minute: every run that names it (--goal) records it, and the catalog's goal page
leads with the decision. Every field a goal file can have, and its allowed values:
RUNBOOK §4c.
cp tutorial/goals/tickets_summary.yaml data/goals/
4 · Run the best arm first¶
Commit before measuring. A run records the commit it ran on; from a dirty tree that commit does not describe what ran, and the run cannot become a reference or a baseline. (Run directories themselves never count as dirt.)
git add -A && git commit -qm "tickets_v1: dataset, systems, goal"
A dry run calls nothing and shows what a pass will cost:
evh run --system tickets_author_v1 --dataset tickets_v1 --goal tickets_summary --dry-run
system tickets_author_v1 (echo)
dataset tickets_v1 (6 items)
API calls 6
No price in the system, so no estimate. Add usd_per_mtok_in / usd_per_mtok_out to the
params of the system file (0 is a valid price for a local model) and the run will record
what it actually cost.
cap NONE — set EVAL_MAX_COST_USD
You cannot score quality without something to score against, and most projects start with nothing. The usual first move is to run the best system you have, often an expensive model you would not run in production, and let its outputs be the answers the others are measured against:
evh run --system tickets_author_v1 --dataset tickets_v1 --goal tickets_summary
note: no reference set for tickets_v1; the run is not refused for it. It is scored without one: the bundled adapter records output_words only, and no quality score (overlap_f1 compares an output with a reference).
To get a quality score, make a reference set (labels you promote, RFC-023) from:
a person's labels: evh label-sheet --dataset-id tickets_v1 --out sheet.csv, then evh label-import
...
wrote 1 run(s) to .../my-evals/data/runs
With no reference it records only what needs none (the output's length, its cost, how long each call took), and it says how to make one. The next step does.
5 · Make its outputs the reference (optional)¶
A label says what is right for one item, and who said it: a person, a model or a rule. A reference is labels you promote on purpose, with a reason, at the tier you choose. Here the author arm's outputs become a model's labels, and you promote them:
evh label-from-run --run <the tickets_author_v1 run_id> --set author_v1
evh reference-promote --dataset-id tickets_v1 --labels author_v1 --tier silver \
--reason "The author arm's summaries rank the others until a person writes gold." --by me
git add data/labels data/references && git commit -qm "silver/tickets_v1: the author arm's labels, promoted"
data/labels/tickets_v1/author_v1: 6 label(s), source model · tickets_author_v1_...
every set on it: evh label-set-list tickets_v1
.../my-evals/data/references/silver/tickets_v1: 6 of 6 item(s), silver, promoted from tickets_v1/author_v1 (model · tickets_author_v1_...)
commit it before the next run: an untracked reference marks every run scored against it dirty
evh runs-list prints the run ids. label-from-run copies the run's outputs and calls nothing,
and the labels record the run, its system and its fingerprint. Promoted as silver, they are
consistent, cheap, and not correct: they encode the author's opinion, mistakes included, good
enough to rank the other arms by how close they come to it, and every run scored against them
says so. The step is optional: if you already have answers a person wrote (gold), import
them as a person's labels (evh label-import) and promote them at gold instead
(tutorial 3 adds gold to this project and shows
what silver got wrong).
6 · Run the other arms, three times each¶
for a in lead1 lead2 lead2_noisy; do
evh run --system tickets_${a}_v1 --dataset tickets_v1 --goal tickets_summary --repeat 3
done
scoring against SILVER references for tickets_v1
...
Arm spread over 3 repeats (max - min on identical input):
...
overlap_f1 spread=0.000000 deterministic
...
Arm spread over 3 repeats (max - min on identical input):
...
overlap_f1 spread=0.029372 treat deltas below 0.029372 as noise
Each arm prints its runs, then its spread for every metric; above are lead2's overlap_f1
and then lead2_noisy's. This is the step people skip. The spread is how far the arm
disagrees with itself on identical input. Any difference between two arms smaller than that
is noise, whatever the table says. A deterministic arm (spread 0) makes every delta real; a
real model at temperature 0 often is not deterministic. Your lead2_noisy numbers will differ
from these: it is unseeded on purpose. (latency_ms has a spread too, since the harness times
every call; its row says speed, not a quality metric, and cost rows cost, not a quality
metric. A run that spent money prints spent $… after them.)
7 · Compare¶
All arms at once:
evh leaderboard tickets_v1
dataset: tickets_v1 ranked by: overlap_f1 (higher is better)
arm runs overlap_f1 output_words cost_usd latency_ms total_cost_usd
...
tickets_lead2_v1 3 0.9001 28.5000 0.000000 0.0 0.000000
tickets_lead2_noisy_v1 3 0.8009 22.9444 0.000000 0.0 0.000000
tickets_lead1_v1 3 0.6409 16.0000 0.000000 0.0 0.000000
goal tickets_summary: leader tickets_lead2_v1, recommended tickets_lead2_v1
IS THE ORDERING REAL? metric=overlap_f1 k=3 arms N=6 items
global test (permutation on within-item ranks): p = 0.0002 -> an arm effect exists
...
pairs distinguishable: 1 of 3
...
Scored against SILVER references (consistent, not correct). Good for ranking
these arms against each other; not a claim that any of them is correct.
The leaderboard sorts; the block underneath says how much of the order is real. Read that
block, not the row numbers. It ranks the arms as the goal does, and names the goal's leader and
the arm it recommends. Runs scored against different references are never ranked together: each
reference gets its own table. The author run wrote the silver reference and has no quality
score, so it is not ranked. The table also carries each arm's cost and speed (all zero here:
echo is free and instant).
One pair you named in advance, tested item by item:
evh pair-test tickets_v1 --a tickets_lead2_v1 --b tickets_lead1_v1
items A wins 6/6
sign-flip p 0.0312 (exact, all 2^6 sign patterns)
verdict SIGNIFICANT at 0.05
(uncorrected: valid only if this pair was named before the table was read)
A winner claim. "lead2 is the best" means significantly better than every other arm, with the
correction for testing several at once. If you picked the pair after looking at the
leaderboard, the pair-test p-value above is wrong; family-test corrects for every
comparison you could have made:
evh family-test tickets_v1 --a tickets_lead2_v1 --against tickets_
family size m=2, declared before the p-values were read
Holm step-down at alpha=0.05
p: exact, over all 2^6 sign patterns
opponent delta A wins-losses (ties) p thresh verdict
tickets_lead1_v1 +0.2592 6–0 (0 ties) 0.0312 0.0250 --
tickets_lead2_noisy_v1 +0.1121 6–0 (0 ties) 0.0312 0.0500 --
significantly different from 0 of 2 opponents; ahead on the point estimate against 2 of 2
Ahead of both on every ticket (6–0 (0 ties): lead2 wins all six items, loses none, ties none), and
significantly different from neither: on
six items the smallest p a paired test can reach is 0.0312, and with two comparisons the first
must beat 0.025. Up to 30 items the p is exact, and every command prints the same one; above
that it is a seeded estimate, and from 10,000 items the permutation distribution's normal limit. The line under the header says which
(RUNBOOK §7b). Six items
are enough to learn the loop, not to pick a winner. run-compare diffs two runs' fingerprints
and scores (evh run-compare --baseline <run_id> --candidate <run_id> --noise <spread>).
8 · Choose¶
A baseline is the run future changes are measured against: a decision, recorded with its reason. The reason has to say what the tests showed, not what you hoped:
evh run-promote --run <the tickets_lead2_v1 run_id> \
--reason "lead2 is closest to the author's silver on all six tickets but differs significantly from neither arm at n=6; working baseline until the dataset grows"
evh baselines
# From a terminal your login is the actor; with no terminal (an agent, a script, CI) add --by person:NAME or set EVH_ACTOR
NOTE: tickets_lead2_v1 has 3 repeats; the catalog, the inspector and the tests read their mean.
The baseline records this run's own scores and, under `repeats`, the mean:
...
overlap_f1 0.9001 (mean of 3: 0.9001)
...
tickets_summary's baseline on tickets_v1: version 1
...
why lead2 is closest to the author's silver on all six tickets but differs significantly from neither arm at n=6; working baseline until the dataset grows
scores (mean of 3 repeats) ...
evidence the first version: nothing to compare with
lead2 ran three times; any of its repeats can be promoted, and the baseline records every
repeat and their mean under repeats, the number the catalog, the inspector and the tests read.
Refused if the run came from a dirty tree, if its build is unknown, or if the reason is under
three words: six months from now, "why is this the baseline?" must have an answer. The baseline
is the goal's (tickets_summary), version 1; the next promotion writes version 2 beside it, with
the paired test of the new arm against this one frozen in, and evh baseline-rollback goes back.
Last, check that everything recorded still holds together. Run it in CI; it exits non-zero:
git add data/baselines && git commit -qm "tickets_v1: baseline"
evh validate
ok V2 every run's dataset_id resolves (1 dataset(s) known)
ok V3 every run identifies its build
ok V4 materialized copies match their frozen hashes (1 of 1 datasets materialized here)
ok V6 every baseline's source run still exists and matches what the baseline carries
...
VALIDATION PASSED
That is the loop: a dataset, arms, a reference, a comparison that says what it can and cannot tell, and a recorded choice.
Where to go next¶
Each tutorial starts from where this page ends, or from a project of your own:
| 1 · A local model against a baseline | your own items, your own adapter.py, a small model on CPU against a no-model baseline |
| 2 · A hosted LLM, with your own key | the providers you can choose (OpenAI-compatible endpoints such as OpenRouter, Anthropic, a LiteLLM proxy), the variable each one reads, prices and a spend cap |
| 3 · A frontier model's run as the reference, gold, and judging | how good the silver was, measured against answers a person wrote, and re-measuring the stored outputs with LLM judges |
| 4 · Eval rounds and dataset versions | round on round: keep what wins, drop what lost, record why; a new version of a dataset that remembers where it came from |
| 5 · The catalog and the inspector | pages over your runs, an inspector that tests arms item by item, and the evh command behind every view |
| 6 · Datasets from production | what your system did in production, kept as a capture: a dataset from it, labels from what happened afterwards, validation and test; then production's own decisions scored against those labels, the rows where it was wrong picked, and the next version of a dataset you govern made from them |
| 7 · Set up a model before you test it | a model record, onboarding it where it runs (its build, whether it reasons, JSON, determinism), an arm that names it, a smoke before the full run; on your own machine with Ollama |
| 8 · The Workbench | the same loop on screens: a goal, its dataset, systems, rounds, reviews, production, the reference set, a judge, the held-out test and studies; every screen calling the command it shows |
| 9 · Your own system: a custom adapter | adapter.py end to end: call_system and score, what the adapter declares (kinds, descriptions, CALL_ONCE), prices on a system, a goal that says which way is better, and every view of it, offline |
And the references, for when you know what you are looking for: INTEGRATION (your system in the harness: the adapter, what it returns, a catalog of your own layout), RUNBOOK (every command, flag, environment variable and exit code), CONCEPTS (why each refusal exists).
And for an agent: evh init wrote AGENTS.md, its rules and this loop in brief. An agent with a
shell runs the commands above itself and reads them with --json (evh runs-list --json,
evh leaderboard --json, evh pair-test --json, evh goal-list --json); it needs neither the
catalog nor MCP. evh mcp serves the same read commands as tools to an agent that cannot run
them, Claude, ChatGPT, the OpenAI API, Gemini or any MCP client, on your project or for a team;
this repository's own evals answer at https://evals.humancopilot.eu/mcp, without sign-in
(INTEGRATION).