Run one
Position bias, and why both_orders matters
LLM judges favor whichever answer they read first. Left alone, that bias decides comparisons, and
you would never see it - the result looks like a clean verdict.
AgentX designs against it rather than mentioning it:
- The judge is shown “Answer 1” and “Answer 2”. It never learns which run is the candidate.
- The presentation order alternates case by case, so a biased judge cannot favor one run across the whole batch.
both_orders=Truejudges every pair twice with the sides swapped. If the winner reverses, the verdict measured position rather than quality: that pair is recorded as a tie, and the batch reports its flip rate.
assert_pairwise say so rather than reporting the win
they would otherwise show.
both_orders doubles the judge cost. That is the price of knowing whether the result is real.
Fail a build on it
A comparison run without
both_orders has no flip rate to check, so max_flip_rate is skipped
rather than passing on a fabricated zero.
What is graded
The head-to-head uses the same material a normal run of that dataset uses: its evaluation criteria and each case’s expected result as the reference answer. This matters more than it sounds. Without the reference, a confidently vague answer (“Maybe, it depends”) can beat a correct specific one, because the judge has no ground truth to check against. Override the criteria per comparison when you want to compare on one axis:Reading the result
comparison.skipped with a reason, rather than quietly
dropped in a way that would make a partial comparison look like a sweep.
Past comparisons are stored and included in backups:
When to use which
Absolute scores
“Is this good enough to ship?” Use a rating floor - CI gates and
min_rating. A threshold needs a number.Head to head
“Is this better than what we have?” Use pairwise. A comparison needs a preference, and
preferences survive judge drift that absolute numbers do not.

