36.4 Evaluation the author cannot game
- Approved by
- Panaversity ·
In everyday life. Students do not mark their own exams, and they do not see the questions in advance. The exam board keeps some questions back for next year, and keeps a record of who marked what.
What you will learn. Four rules that make an evaluation trustworthy, and the runner Claude Code builds to apply them.
Why it matters. A learning loop is only as good as its gate. If the gate can be fooled, the worker will slowly learn its way into mistakes.
Four rules
1. Code checks before a model judges. Where a business rule can decide, it decides. Does the matched PO's amount agree within 1%? Did the worker refuse an invoice over its limit? Did any payment go out twice? These are checked by code, and a candidate that fails them is rejected without any model's opinion.
2. The author never judges alone. The model that wrote a candidate does not decide whether it is good. Where judgement is needed, a different model judges, calibrated against people's marks as in 24.5, and for anything that touches money, a person decides at approval (36.5).
3. Held-out cases stay hidden. The golden set from Chapter 24 is split. Part of it is visible to dreaming, as examples. The rest, the held-out cases, is used only by the evaluation runner. Dreaming's database role cannot read them. If dreaming could see the test, it could learn to pass the test, not to do the work.
4. Every report is complete. Each evaluation report names: the exact candidate, the baseline release it was compared with, the dataset version, the judge's configuration, every score, and the decision. A report that says only "passed" is not evidence.
What a candidate must show
A candidate is validated only if, on the held-out cases:
- it fixes the cases it was proposed for;
- it breaks nothing that worked before: no regression on any held-out case;
- it passes every code check, including the payment and tenant checks from Chapters 33 and 35;
- it does not raise the cost per assignment beyond a set limit, unless it is a safety fix.
For a candidate that changes a process or a tool, evaluation also checks control flow, permissions, retries, idempotency and what happens on failure, as Chapter 34's tests did.
The runner
Step 4. Build src/evaluation/ as a Workflow that takes a candidate ID. It loads the baseline release and a release with the candidate applied, runs both on the held-out cases with recorded model answers, runs the code checks first, calls a judge model different from the candidate's author for the cases that need judgement, and writes a complete report. It sets the candidate to validated or rejected, never to approved. Write the tests first: a candidate that fixes three cases and breaks one is rejected; a candidate written by model X is never judged by model X; dreaming's role cannot read the held-out table.
Notice the last line of the request: the runner can set validated or rejected. It cannot approve. Approval is a person's decision, made in the next step.
What to check.
- Are the held-out cases in a table dreaming's role cannot read? Try it.
- Is the judge chosen by the router with a rule that excludes the author's model?
- Does a single regression reject the candidate, or is it averaged away? An average that hides a broken payment case is not acceptable.
- Is the dataset versioned, so the same candidate evaluated twice gets the same report?
Keep the gate honest over time
Held-out cases leak. A person copies a hard case into a prompt. A held-out invoice becomes a real invoice and appears in experience records. Once dreaming has seen a case, it is no longer held out. Refresh the held-out set from new, reviewed work every quarter, and retire cases that may have leaked.
The invariant. Code checks first; the author never judges alone; the test stays hidden from the learner; and every decision is written down with its evidence.
Check yourself. A candidate scores 96% on held-out cases against the baseline's 94%. It fails one case the baseline passed: an invoice over the limit was posted. Do you validate it? (No. A higher average does not outweigh a regression on a payment rule. The code check fails, and the candidate is rejected.)
Sources
- Building Affordable, Self-Improving AI Workers (Panaversity, 29 November 2026), section 10.3
- Owner
- Panaversity