In this lesson, you compared your two prompt versions with a pairwise judge, ran every pair in both orders, and counted a win only when both orders agreed.
Key Points
- A pairwise judge compares two answers. Your checks in the first lesson passed both prompt versions, v1 and v2, on all thirty-six answers. A pairwise judge sees both answers at once and picks the better one on one criterion: here, your status criterion from the last lesson, asked as a comparison.
- A pointwise judge can’t rank two answers. Your status judge grades one answer at a time, so it gives each version its own pass rate: how often an answer is good enough, not which of two answers states the status better.
- Save the pairs first.
evals/pair-answers.jsasks the assistant each of the twenty status questions once with each version and saves the question, the latest report, and both answers as one line ofevals/pairs.jsonl, so every judge call sees the same pairs. - The judge’s reply is a reason, then a winner:
"first","second", or"tie"when neither answer states the status better, checked with Zod. The answers go inside<first>and<second>tags.pick()sends a pair in the order you give it, turns"first"or"second"back into a version name, and passes a tie through as it is. - The order can change the verdict. On the pair for “Le col de Fenêtre est-il enneigé ?”, both answers give the old snow below the col. With v1 first, the judge picked v1, the first answer. With the same answers swapped, it called them a tie, so the pair fails the both-orders check.
- A split can come from position bias. The split is consistent with position bias, a judge favoring a place whatever the answer, though a repeated call can also change a verdict. Whichever place a judge leans toward, always putting one version there hands it that lean on every pair.
- Count a win only when both orders pick the same version. Two ties make a tie, and a pair whose orders disagree is a split. A tie is the judge’s verdict that neither answer is better; a split is two verdicts that disagree.
- One order hides the splits. In one recorded run on 1 December 2026, with v1 first, v1 won ten pairs, v2 won one, and nine tied. Counted both ways, v1 won eight, v2 won one, eight tied, and three pairs split.
- Three splits can name the wrong winner. In this run, three of the twenty pairs failed the check: between two closer versions, that’s enough to name the wrong winner, and one order can’t tell you which three. In three judge runs over one saved set of answers, one to three pairs split, and v1 led every time. Your numbers will differ.
- Both orders double the judge calls: forty for twenty pairs.
- v1’s lead is on one set of answers, by the judge’s word alone. v2 is the shorter version, and judges can also favor longer answers, so the lead isn’t settled until you check the judge against your own grades.
Final Code
The lesson adds three files to the project. Add two scripts to package.json, so npm run pair-answers saves the pairs once and npm run pair judges them in both orders as often as you like: