Evaluations and a judge you can trust
You change a sentence in your agent’s prompt. You ask it five questions, the answers look better, and you ship. A week later, someone asks a question the old prompt answered well, and the new one doesn’t.
So you try to be rigorous. You play a case 20 times on main, then 20 times on your change. On Agent Core, the same prompt passed one case 3 times out of 20, then 12 times out of 20 a few minutes later, with nothing changed in between. Our before-and-after numbers mostly measured the provider’s drift, not our change.
What the article argues
Anthropic’s Demystifying evals for AI agents describes an evaluation as tasks, trials and graders. A task is one test with success criteria. Each attempt is a trial, and since agents aren’t deterministic, one trial says little. Graders can be code, a model or a human. Code checks are fast and reproducible but brittle. A model grader handles open-ended answers, but it has to be checked against human judgment. The article also insists on reading transcripts, because a low score can come from a broken grader or an ambiguous task as easily as from the agent: “we do not take eval scores at face value.”
What we built
A judge in the service. In agent-core#74 I added a judge that grades completed runs, off the client’s path. It reads the question, the history the run saw, the tool results in call order and the answer. It returned one JSON object: six dimensions scored 1 to 5, each with a short reason, plus a composite. A seventh, cited_sources, came later with source links in answers (agent-core#121). A 1 or 2 on source support, invented claims or audience-safe sources caps the composite at 2, so a polished answer that leaks a private source can’t average its way to a good score. Later, agent-core#204 had the judge also label the kind of answer: answered, cant_do, not_found or needs_detail. A refusal completes like any other answer, and the label is how we count them.
Synthetic cases through the real service. agent-core#77 added a runner that plays cases through the real API and the live model, the way the client does. A case is a YAML file: a small workspace, the asker, the question, what the answer must say and must not say, and which source IDs it must never expose. The report ends with a pass or fail verdict against fixed thresholds, such as privacy at 100%, expectations at 90% and a judge median of 4. agent-core#83 added the first 13 cases on a shared Hogwarts workspace. Private facts are invented, never taken from the books, so a forbidden phrase appears only if a private source leaked. Before that PR merged, its cases had found three bugs of one shape: a general question asked from a chat or a private thread searched public channels only, then answered “not found” while the answer sat in the conversation it came from.
Commands sized to the step. A comparison played every case three times and took about 30 minutes, so people skipped it. agent-core#147 split it into three commands: selected families without the judge while you edit, every case once before a PR, and every case three times for a model change. A retry keeps every attempt in the report, so a case that fails and then passes still counts against the verdict. The same PR found that the evaluation had been testing a higher reasoning setting than production. It now uses production’s and prints it in the report.
Comparing at the same time. agent-core#157 is the answer to the drift. npm run comms:compare checks out main in a temporary worktree and plays the same cases on main and on the change at once, so both sides see the same drift. Failed runs aren’t played again, because that would bias the pass rates. A case counts as better or worse only when a two-sided Fisher exact test gives p < 0.05.
Main against main gave 13 of 16 and 14 of 16: no clear difference, as it should.
What it measured
The comparison changed what we believed about the judge. Two cases kept failing on unrelated PRs. One of them, asker-6-what-time-is-it, asks the time for someone who lives in Paris. The case wants a local time with its zone, no “UTC”, and no search (trimmed):
fixture:
users:
- id: 101
name: Minerva McGonagall
timezone: Europe/Paris
question: What time is it?
expect:
must_say:
- \b([01]?\d|2[0-3]):[0-5]\d ?CES?T\b
must_not_say:
- \bUTC\b
forbidden_tools:
- comms.search_content
The answer has to come from the agent’s system prompt, which holds the moment the question was asked. The unit test pins that sentence like this:
The question was asked on Wednesday, 2026-11-11 at 17:12 CET in the asker's
time zone (Europe/Paris), which is 2026-11-11 16:12 UTC.
@todoist answered “It’s 17:12 CET”, which was right. The judge got the question and the answer, but only the date in UTC. No source it saw held a time, so it scored the time as invented. That is a hard dimension, and the run failed.
agent-core#255 builds that sentence in one function and gives it to both the agent and the judge, as asked_at on the judge’s side, so the two can’t drift apart. The rubric gained one sentence: “An answer that gives today’s date, the day or the current time from asked_at scores high on source_support and invented_claims, even though no source holds it: asked_at is the clock the assistant was given.” The comparison, judge on, both sides at once:
asker-6-what-time-is-it (judge on, 6 runs) 1/6 -> 6/6, better (p = 0.015)
asker-7-what-day-and-time-in-utc (judge on) 6/6 -> 6/6
agent-core#259 fixed two more judge mistakes. In a chat whose older messages were left out, the agent answered “I couldn’t find which platform Albus first mentioned because older messages in this chat were left out.” The judge scored it 1 to 3 on helpful, because the agent “failed to paginate or search earlier messages”. No tool can do either: the chat read returns only the newest messages, and search doesn’t read chats. To “The train leaves at eleven on October 21.”, taken from the current chat, it gave 1 on cited_sources for “no Source line”, although the rubric already exempted the current chat. The mean helpful score on the first case went from 2.70 to 5.00, and the mean cited_sources score on the second from 2.33 to 5.00. Each fix was one sentence in the rubric, and the PR moved the rubric version.
The judge also has a blind spot by design: it grades against what the agent read. Take group-chats-1, the case that caught one of the three “not found” bugs above. Severus posts in the staff group chat, and Minerva asks there (trimmed):
conversations:
- id: cv-staff
title: Staff group
messages:
- creator: 303
content: 'Reminder for everyone: end-of-year exams start on June 3.'
anchor:
kind: conversation
object_id: cv-staff
asker: 101
question: When do the end-of-year exams start?
expect:
must_say:
- \bjune 3(rd)?\b|\b3(rd)? (of )?june\b
Search never covers chats, and reading the current chat was the model’s choice. It often skipped it, searched the public channels, and answered that it had found nothing there. The judge scored such an answer 5, because nothing the agent read held the date. The hand-written must_say pattern, not the judge, caught it.
The fix, agent-core#88, took the choice away. Every run in a chat now starts with the chat already read, through the same tool the model would call, comms.load_conversation with no arguments. The model sees the exam message before its first request. group-chats-1 went from 1 correct answer in 5 runs to 3 of 3.
What I’d tell someone doing the same
- Compare at the same time, with enough runs. Small differences need many. With 16 runs per side, a case that passes 8 times on main has to pass 15 times on the change to count as better. A comparison that ends with “no clear difference” is an answer, not a failure to get one.
- When a case keeps failing, suspect the grader too. Three of the failures that broke unrelated PRs came from the judge, not the agent. Give the judge the inputs the agent had, built by the same code.
- Check facts, not wording. Our cases had checks like a required “I” in the answer or forbidden openings. They failed answers whose facts were right, such as one that named the right group member without the word “only”. agent-core#501 dropped them and kept every check on facts, invented claims, private sources, links and mentions. Voice is now judged by reading pairs of answers blind.
- Watch for a fix that breaks another case. One case turned “starting at seven” into “7:00 PM” in about 15% of runs. I tried four wordings of a rule to keep a time written in words. Each one made a French case answer “Le festin commence à eight” in some runs (8 of 12 passes against 12 of 12 on main, too few runs to be sure), so I left the wording alone. The French answer was fixed later by removing a sentence from the prompt, not by adding one (agent-core#501).
- Don’t test the exact count. A test asserted the number of cases. Two PRs each raised it from 117 to 118 and merged a minute apart. Git merged the identical edits without a conflict, main held 119 cases against an expected 118, and the deploy stopped. agent-core#474 replaced the count with a minimum of three cases per family.
The trade-off is time and trust in a second model. An evaluation with the judge is slower, and the judge itself sometimes gets no answer from the provider. It now asks again once (agent-core#150, agent-core#481), because the verdict fails on every completed run without a score. And a rubric change makes older scores incomparable, which is why the version travels with every score.