Skip to content

Trust the judge

Sooner or later someone senior asks the real question: why should a model be allowed to block our pipeline?

This section exists to answer it with mechanics and a number, not reassurance.

The sharpest form of the objection is “nondeterminism has no place in CI”. Four things address it:

  • Temperature 0.
  • Pinned models. A named docevals.provider and docevals.model in a committed config, never a floating alias. A model that changes under you is a verdict that changes under you. See Pin the model in a gate.
  • Structured verdicts. The judge returns JSON against a fixed schema, not prose someone parses.
  • Content-addressed caching. The same page and the same assertion return the same verdict without another call.

Same inputs, same answer.

Each ai eval runs N times independently (judge.ensembleRuns, default 3). Each run is a separate request with no shared context, so they cannot reinforce one another. That is three independent opinions, not one opinion repeated.

Consensus aggregates them. Two rules are deliberate and worth stating:

  • A partial verdict counts as a fail. Partial credit on a binary contract is a fail.
  • An errored run counts against consensus. A timeout or a provider error is not a free pass.

Both asymmetries point the same way. Errors and ambiguity can push an eval toward human review, and can never produce a silent pass. That is the safety property a skeptic is probing for.

Consensus plus mean confidence decides the zone:

ZoneConditionOutcome
auto-passpassing consensus, mean confidence ≥ judge.zones.autoPass (default 0.8)pass
auto-failfailing consensus, mean confidence ≥ judge.zones.autoFail (default 0.8)fail
human reviewanything betweenneeds-review

This is the reframe that makes the design make sense: the judge is not being asked to be right every time. It is being asked to know when it is unsure.

Seen that way, the human-review zone stops looking like an admission of failure. It starts looking like what makes a binary verdict acceptable at all. Handling that queue is Human review.

Tightening the thresholds sends more to people; loosening sends more to automation. Do not tune them by feel. Calibrate tells you what the trade actually costs.

Every eval is pass or fail. The nuance lives in the suite pass rate, where a regression suite targets 1.0 and a capability suite targets about 0.7 instead. That makes “70% of our tutorials explain why before how” expressible, without any eval returning a mushy score. Every failing eval still exits 1, so a capability suite runs outside the merge gate. See Regression vs capability.

Nearly always, the assertion is. Before adjusting zones, ensemble size, or models, re-read the assertion against the two-reviewer test in Write good assertions. An eval that keeps landing in review is telling you it is ambiguous.

calibrate enforces this: below the agreement threshold it exits 1, and the correct response is to refine the assertions, not the grader.

A model grading its own output favors it. So manni docevals checks each ai eval before it is judged. Is the judge’s model among the machines the page records for what that eval grades? The model compared is the one that judges this eval, after its own provider: and model: and any --model flag, not the run’s default.

There are two ways the judge can be grading its own work. The first is content: it wrote what the eval reads. Which record answers that depends on the eval’s target:

targetMachines compared against
body (the default)the generated-by of every provenance entry
frontmatterthe generated-by of every meta-provenance entry that names fields
rawboth
{source: file, path}none; a companion file carries its own record if it is a page

The check covers the whole body, because target has no form that names lines. The second is criterion. A meta-provenance entry for the judge’s model lists this eval’s id under evals, so the judge proposed the assertion it is grading. When both hold, content is reported.

Each case warns on stderr, once per page and eval:

manni: docs/limits.md: provenance names claude-fable-5 for the body this eval grades, and it is also the judge. Self-judging favors the author; give "limits-stated" a model: of its own.
manni: docs/limits.md: meta-provenance names claude-fable-5 for the fields this eval grades, and it is also the judge. Self-judging favors the author; give "description-matches" a model: of its own.
manni: docs/limits.md: meta-provenance says claude-fable-5 proposed "limits-stated", and it is also the judge. Self-judging favors the author; give "limits-stated" a model: of its own.

A raw eval whose match is only in meta-provenance gets the second sentence. The same sentence is a warning-level problem in every report format, and the result carries selfPreference: {axis: "content" | "criterion", model}.

An assertion that says “a reader” leaves the judge to imagine who that is. A page’s personas: already says who. One option hands that to the judge, one eval at a time:

evals:
- id: fix-and-rerun
assertion: A reader can fix a failing field and confirm the check passes locally.
grader: ai
options:
readers: personas

The option works in three places, with one meaning:

WhereWhat it opts in
An eval on a page or in its manifestThat eval, on that page
A docevals.evals entryThat eval, on every page that runs it through a suite or a use:
A use: referenceThat page’s use of the library eval. Its options merge over the library’s, key by key.

The judge reads the page as its personas only when all four of these hold:

  1. The run judges. --deterministic-only reads no record.
  2. The eval is grader: ai and carries options: { readers: personas }.
  3. At least one id in the page’s personas: names a type: persona record in a declared collection. Ids match ignoring case.
  4. The page is not itself a record.

Anywhere else, the run is the one it was before the option existed. The prompt, the cache key, the output and the exit code are unchanged. Nothing warns about a page that names no persona, an id no record defines, or a repository with no records. manni strategy check reports a dangling id.

A readers value other than personas is an error where persona records exist, and the run exits 1. Where none exist, the option does nothing, as any option on an ai eval does. A misspelled key, such as reader:, is ignored everywhere.

The judge reads each persona’s descriptive frontmatter fields, rendered into a # Readers section of its prompt. The record’s body is never read, and every other field is left out.

FieldRendered as
title, else the idThe reader’s heading
descriptionThe paragraph under the heading
name, role, team-contextName:, Role: and Team context: lines
proficiency, prerequisites, goals, pains, content-typesA labelled list each

A string renders as one line and a list of strings as a list. Any other value is left out. These are the field names this repository’s persona schema uses. A schema with other names gives the judge only title and description.

The prompt tells the judge the assertion holds only when it holds for every reader. A page naming three personas still gets one verdict per eval, and that eval costs what it did before.

A judged result read as personas says so. Pretty adds the ids after the zone, and JSON adds a personas list to the result:

FAIL fix-and-rerun [auto-fail] (read as theo) docs/src/content/docs/meta/fix/index.meta.yaml:16

No tag means the judge read no persona. After opting an eval in, look for the tag. If it is missing, the page names no record, or the run did not judge.

Keep the fields short. A page naming four personas adds all their fields to each opted-in eval’s prompt. A prompt too long for a small local model errors the eval.

A library eval opts in every page that runs it. Run manni docevals list --eval <id> first, to see which pages re-judge once you opt it in.

  • --deterministic-only skips the judge entirely. No provider, no cost, and the right default for forks and pre-commit hooks.
  • --ai-only runs only judged evals.
  • --runs <n> overrides the ensemble size for a run.
  • --no-cache forces fresh judging.
PageAnswers
Calibrate“Is the judge actually agreeing with us?”, with a number
Human review“Who clears the queue, and does it persist?”
Choose a provider“Can we run this without sending pages to a vendor?”