The known biases of judges: position, verbosity, self-preference and leniency

Study time
≈ 2 h (estimate)
Needs
L2-M04-L02
Updated
2026-11-03

Progress is saved in this browser only. No account, nothing is sent to a server.

Draft · reviewed by AI, not yet by a person. Content may change. English translation: AI-assisted, not human-reviewed.
On this page

Module: L2-M04 · Duration: ~120 min (estimate, including the independent exercise) · Previous: L02 · Next: L04

1. Introduction

A judge does not just have noise (results that vary from one moment to the next); it can also be biased: pushed consistently in one direction unrelated to quality. Judges are reported to prefer the answer that comes first, the longer answer, the answer from their own model family, and to be quick to let things through. This lesson teaches finding each bias with a probe (a deliberate test), reducing it with a suitable mitigation, and stating plainly what that mitigation does not fix.

The biases of the simulated judge are parameters set by the lab (made-up magnitudes), so the probes are checked against a known truth. What happens with real models is quoted from the sources that were read (§12), with how much of each was read. The output of this lesson is a set of probes (swap order, change length, check against model family) with a report.

2. Learning objectives

  1. Describe the four biases (position, verbosity, self-preference, leniency) and the published evidence for each. Practice: §8.2.
  2. Run the swap-order, length and model-family probes on a log of verdicts and read the results. Practice: §8.2 parts A to C, §9 (TODO 1, 2).
  3. Tell bias apart from noise by counting per slot and using confidence intervals. Practice: §8.3.
  4. Apply the both-orders rule and point out the biases it does not fix. Practice: §8.2 part D, §9 (TODO 3).
  5. State what each probe cannot see. Practice: §8.4 (read test_a_judge_that_always_says_tie_is_perfectly_consistent), §9 (NOTE).

3. Prerequisites and tools

  • L2-M04-L01 and L02: the judge, raw output, parse; pairwise and pointwise.
  • L2-M01-L04: the Wilson confidence interval (the lab re-implements it as calibrate.wilson); the code lab code-labs/l2-m04 (self-contained).

4. Concepts

4.1 Bias is not noise, and position bias

Noise is random fluctuation; bias is a directional skew. A pairwise judge can prefer a position: Zheng et al. call it position bias and give the example of GPT-4 changing its mind when the two answers swap places [R1 §3.3]. They gave 80 questions two nearly equivalent answers (produced by GPT-3.5 twice) and measured consistency under a swap, with the default prompt: Claude-v1 23.8% (75.0% favouring the first answer), GPT-3.5 46.2% (50.0% first answer), GPT-4 65.0% (30.0% first answer); only GPT-4 was more than 60% consistent [R1, Table 2]. Wang et al. (2023) saw the same phenomenon in a different direction: GPT-4 favours the answer displayed first, ChatGPT often favours the second [R2 §1]; by changing the order alone, Vicuna-13B "could beat ChatGPT on 66 over 80 tested queries" when ChatGPT was the evaluator [R2, abstract]. The quality gap matters: for the pair Vicuna-13B against Alpaca-13B (far apart), GPT-4's contradiction rate under a swap was only 5.0%, against 46.3% for the pair Vicuna-13B against ChatGPT [R2, Table 2]. Shi et al. (15 judges) also found that the quality gap has a strong effect [R7, abstract]. The takeaway: the direction of bias differs between models, so a probe measures both directions and uses pairs of equal quality, because a pair with a big gap hides bias.

4.2 Length bias

Verbosity bias: a judge favours a longer answer even when it is no clearer or more correct. Zheng et al. tried a "repetitive list" attack: take 23 answers that contain numbered lists, ask GPT-4 to rephrase the list and insert it at the top, adding no information; a judge that rates the longer version better has been attacked successfully. Failure rate: Claude-v1 91.3%, GPT-3.5 91.3%, GPT-4 8.7% [R1, Table 3]. Saito et al. report that in the setting they studied, GPT-4 preferred longer answers more than humans did [R4, abstract]. Dubois et al. state that AlpacaEval favours models that produce long outputs; the length-controlled estimate raises the Spearman correlation with Chatbot Arena from 0.94 to 0.98 [R5, abstract]. OpenAI advises "control for response lengths" [R9].

4.3 Self-preference and leniency

Self-preference (Zheng calls it self-enhancement): a judge scores answers generated by its own model family highly. The evidence is not uniform. Zheng et al. found GPT-4 favours itself with a win rate 10% above the human rate and Claude-v1 25% above, but the judges also favour other models, GPT-3.5 does not favour itself, and they write that with limited data "our study cannot determine whether the models exhibit a self-enhancement bias" [R1 §3.3]. Panickssery et al. define self-preference as a judge scoring its own answers higher while humans consider them equal; GPT-4 and Llama 2 recognise their own answers at a non-trivial level, and after fine-tuning, the strength of self-preference correlates linearly with the ability to recognise itself [R3, abstract]; they note that self-preference can be justified if the model's answer really is better [R3 §5.2]. Anthropic's code example says to grade with a different model from the one that produced the output [R10]: a recommendation, with no evidence attached.

Leniency (letting through answers that humans fail; L2-M03-L03 measured leniency between two graders, here it is a judge against humans): Thakur et al. estimate the probability P+ that a judge says "correct" when its criterion does not fully match the guidelines, and found P+ of most models notably above 0.5 [R8 §5.4]; judges are also less robust against fake answers such as "Yes" [R8, Figure 5]. Ye et al. list 12 biases (including bandwagon, authority, sentiment) and conclude that significant bias remains on some tasks [R6, abstract, Table 1]. The lab simulates four.

5. Technical deep dive

5.1 Probe design and results on the simulated judge

probes.py works on a log of verdicts: each record is one pair in one order, with the raw output. content_winner converts the slot into the real winning answer (x, y, tie) so the two orders can be compared. data/pairs.jsonl has 112 pairs of four types, 28 of each: quality (one right answer, one wrong), order (two correct phrasings from the same source), length (same content, one answer with three filler sentences with no information added) and self (two equally correct answers, one from the family tutor-a, the judge's family). For the last three types, the "human" (a synthetic label) always says tie.

  • position_stats: consistency (the same answer wins in both orders) and the number of verdicts falling in slot A, slot B, tie; length_stats: how many verdicts on length pairs pick the longer answer; self_stats: how many pick the answer from the judge's family.

The FAIR judge (no bias, no noise) returns a tie on every equal pair: consistency 28/28. The default judge: consistency of only 10/28 on order pairs, slot A chosen 22 times, slot B 0 times; on length pairs it chooses the longer answer 37 times, the shorter 1 time, and ties 13 times out of 51 readable verdicts; on self pairs it chooses its own family's answer 34 times, the other family's 1 time. When only one bias is set, only the matching probe reports it (three tests of the family ..._alone_is_found_by_...).

5.2 Probes have noise too

Low consistency does not prove position bias. The try-it-yourself part (§8.3) runs 28 order pairs with w_pos equal to 0, 3 and 8, the same noise of 4 points and tie_margin=4: with no bias at all, consistency is still only 14/28, with 9 verdicts in slot A and 5 in slot B; w_pos = 3 gives 15/28 (A 15, B 0); 8 gives 0/28 (A 47, B 0). Noise alone halves consistency; what separates bias from noise is asymmetry: slot B never wins. With 28 pairs, 9 against 5 says nothing.

The same goes for self-preference on pointwise labels: the judge lets through (threshold 5) 18/50 tutor-a replies that humans failed and 15/60 tutor-b replies. The 95% Wilson intervals are 0.241 to 0.499 and 0.158 to 0.372, which overlap: indistinguishable from chance, even though the judge was given a bias of 10 points. A probe needs pairs designed in advance (like self), not inference from existing labels.

5.3 Mitigations, and what they do not fix

Both orders. Zheng et al. propose a conservative approach: call the judge twice with the order swapped and declare a win only when one answer is preferred both times, otherwise a tie; another approach is to assign positions randomly, which is effective at scale [R1 §3.4]. probes.both_orders implements the conservative rule; random_order implements random assignment based on a hash of the pair id. Wang et al. average the scores across orders [R2 §3.2]. On 112 pairs, agreement with humans is 48/108 with one order and 73/104 with both (the number of readable pairs differs because unreadable outputs are dropped; part D). The price: two calls per pair.

It does not fix length. The both-orders rule lets length bias through: the longer answer winning in both orders is still a win (test test_swapping_orders_fixes_position_bias_but_not_length_bias). Other approaches: say in the prompt that length is not a criterion (Zheng did, [R1] Figure 5, but Wang shows that a reminder like that is not enough for order [R2]); pair answers of the same length (flag_length_gap flags pairs where one is more than 1.5 times longer); control with regression as Dubois does [R5]. Adding three filler sentences raises the pointwise score on 14 of 94 readable replies, lowers none, with a mean of +0.149 (part E). The judge keeps its blind spot and noise for the padded version; with w_len = 0 the change is 0 (test).

Leniency is a threshold matter. With a threshold of "4 points or more", the judge lets through 68 of the 110 replies that humans failed; with a threshold of 5 it is 33 (part F). Choosing the threshold from human labels is the job of L04. Self-preference is reduced by using a judge from a different family than the system being scored (family_conflict compares the two family labels), checked with the self probe.

6. The QA perspective

6.1 What the probes do not see

  • A judge that always returns a tie is perfectly consistent (test_a_judge_that_always_says_tie_is_perfectly_consistent), so consistency must be reported together with agreement with humans.
  • The length probe only knows that the lengths differ, not that length caused the choice; the longer answer is sometimes genuinely better. This probe tries only one kind of padding; other kinds (lists, repeated ideas) may give different results.
  • The self probe needs a family label for each answer; with a real model you must take it from your own logs.
  • Figures from papers do not carry over to your data; the magnitudes in the lab are made up; these four biases are not the full set (12 types in [R6]).

6.2 Order and reporting

Run the probes before calibrating (L04), apply the mitigations, and only then measure agreement with humans. Report the number of pairs, the number readable, the per-slot counts, the confidence intervals and the mitigations switched on; run again when the judge, prompt or rubric changes (L05). "The judge was checked for bias" without these figures cannot be verified.

7. Real-world scenarios

Scenario 1 (fictional): "The new version wins 62%". The HocVui Tutor team compared the new tutor version with the old one using a pairwise judge and saw the new version win 62%. The pipeline always put the new version in slot A. The order probe showed that on equal pairs the judge almost only picked slot A; with the both-orders rule, the win rate fell to near a tie. They reported "no difference yet" instead of "62% better".

Scenario 2 (fictional): "A judge from the same family". The judge and the tutor tutor-a are from the same model family, and tutor-a topped the report. family_conflict flagged the conflict; the self probe showed that the judge overwhelmingly picked its own family's answer. The team switched to a judge from a different family.

8. Hands-on tutorial

8.1 Setup

cd academy-content/code-labs/l2-m04
python3 -m venv .venv && source .venv/bin/activate     # Windows: .venv\Scripts\activate
python -m pip install -r requirements.txt
python -m pytest            # 79 passed

8.2 Run the demo

python -m lab.demo l03

Output (copied from a real run on Python 3.14.6 and 3.12.14, 2026-11-03; the two versions give identical output):

== default simulated judge
A. position, 28 equal-quality pairs in both orders: consistent 10/28, slot A 22, slot B 0, tie 34, A share 1.000
B. length, judgments on equal-content pairs: longer 37, shorter 1, tie 13 of 51
C. self, own-family reply picked 34, other 1, tie 21 of 56
D. base_only   agreement with the human winner on all 112 pairs: 48/108 = 0.444 (4 unreadable)
D. both_orders agreement with the human winner on all 112 pairs: 73/104 = 0.702 (8 unreadable)
E. padding 3 neutral sentences, 100 replies: up 14, same 80, down 0, mean change 0.149 (6 unreadable)
== fair simulated judge (no bias, no noise)
A. position, 28 equal-quality pairs in both orders: consistent 28/28, slot A 0, slot B 0, tie 56, A share None
B. length, judgments on equal-content pairs: longer 0, shorter 0, tie 56 of 56
C. self, own-family reply picked 0, other 0, tie 56 of 56
D. base_only   agreement with the human winner on all 112 pairs: 112/112 = 1.000 (0 unreadable)
D. both_orders agreement with the human winner on all 112 pairs: 112/112 = 1.000 (0 unreadable)
E. padding 3 neutral sentences, 100 replies: up 0, same 100, down 0, mean change 0.000 (0 unreadable)
F. leniency: default threshold 4 passes 68/110 replies a human failed; threshold 5 passes 33
G. self-preference in the labels: judge passes (threshold 5) 18/50 human-failed tutor-a replies and 15/60 human-failed tutor-b replies

Reading the output:

  • A to C. With the FAIR judge everything is a tie; with the default judge slot B never wins, and the longer answer and the answer from its own family win overwhelmingly.
  • D, E. Agreement with humans, one order against both; padding raises the score for 14 of 94 replies.
  • F, G. Leniency by threshold; self-preference on pointwise labels (small sample, §5.2).

8.3 Try it yourself

Save it as try_l03.py in the lab's root folder (next to lab/), run python try_l03.py, then delete the file:

from lab import calibrate, data, judge, probes

qs = {q["id"]: q for q in data.load_json("questions.json")}
pairs = [p for p in data.load_jsonl("pairs.jsonl") if p["type"] == "order"]
for w_pos in (0, 3, 8):
    j = judge.SimJudge(**{**judge.FAIR, "w_pos": w_pos, "noise": 4, "tie_margin": 4})
    ps = probes.position_stats(probes.run_pairs(j, pairs, qs))
    print(w_pos, ps["consistent"], ps["readable"], ps["slot_a"], ps["slot_b"], ps["slot_tie"])
print([round(x, 3) for x in calibrate.wilson(18, 50)], [round(x, 3) for x in calibrate.wilson(15, 60)])

Output (identical on Python 3.14.6 and 3.12.14):

0 14 28 9 5 42
3 15 28 15 0 41
8 0 28 47 0 9
[0.241, 0.499] [0.158, 0.372]

Reading: the last three columns are the number of verdicts in slot A, slot B, tie. With w_pos = 0, consistency is 14/28 even with no bias; with 8 it is 0/28 and slot B never wins. The last line is the two Wilson intervals of §5.2.

8.4 Run the lesson's tests

python -m pytest tests/test_l03_bias.py tests/test_data.py -v

Result: 22 passed (17 tests for this lesson, 5 data checks). Read test_a_fair_judge_shows_no_bias_on_any_probe and test_swapping_orders_fixes_position_bias_but_not_length_bias.

8.5 Troubleshooting

Symptom Cause Fix
ValueError: pair ... needs both orders A record is missing one order run_pairs always writes both
ValueError: no pair has a readable verdict ... Every output was unreadable Look at the prompt and parser (L02)
a_share is None All ties Correct for an unbiased judge

9. Independent exercise

Problem: A "black box" judge left 80 records (40 pairs, each in two orders). Find its bias from the outputs alone, then check whether the both-orders rule cures it.

Requirements: complete exercises/test_l03_bias.py:

  1. TODO 1: fill in POSITION_CONSISTENCY (consistency on order pairs) and LENGTH_LONGER_RATE (the share of verdicts on length pairs that pick the longer answer), each as a reduced fraction string.
  2. TODO 2: fill in BIAS ("position", "verbosity", "self" or "none"; the judge belongs to the family tutor-a) and NOTE: at least 20 words giving the numbers from the log that support the answer and one thing the log does not tell you.
  3. TODO 3: write the function longer_wins_both_orders(records): among the length pairs, how many have the longer answer winning under the both-orders rule (probes.both_orders)? Return an integer; unreadable pairs do not count.

Test data: exercises/judge_log.jsonl (without the judge's parameters).

Deliverable: two variables, BIAS, NOTE and the function longer_wins_both_orders in the file exercises/test_l03_bias.py itself.

Acceptance criteria: python -m pytest exercises/test_l03_bias.py passes (3 tests). The test recomputes the numbers from the log and checks BIAS against the test's own thresholds; for NOTE it only counts words.

Hint: look at each pair type separately; a bias only shows on the pair type designed for it. Noise makes consistency lower than 1 without needing any bias. For TODO 3, what does a positive result say about the limits of a mitigation?

10. Knowledge check

0/16 done · Results are kept in this browser only.

P02 · True or false

A simulated judge gives consistency of 28/28 on the order pairs, so that judge is certainly unbiased and grades correctly.

P04 · Select all that apply

Select everything that helps separate bias from noise in the position probe.

P05 · Put in order

Put the workflow for using bias probes in an eval project in order.

  1. Apply the mitigations: both orders, length-matched pairs, a judge from a different family
  2. Report the number of pairs, the number readable, the counts per slot, the confidence interval and the mitigations that are on
  3. Measure agreement with human labels (L04)
  4. Rerun when you change the judge, prompt or rubric
  5. Run the bias probes on the judge, before calibration

P06 · Match

Match each bias to the lab's way of measuring it.

P07 · Spot the bug

The function below is meant to implement the both-orders rule (content_winner returns "x", "y", "tie" or "error") but has a bug that makes it declare a win when the judge is inconsistent. Find the bug.

def both_orders(w_base, w_swapped):
    if "error" in (w_base, w_swapped):
        return "error"
    return w_base if w_base != w_swapped else "tie"

P08 · Short answer

The order probe on a simulated judge gives 32 non-tie verdicts: 20 fall in slot A, 12 in slot B (made-up numbers for practice). The 95% Wilson interval of 20/32 is 0.453 to 0.771. What do you conclude about position bias?

P09 · Essay

The HocVui team compares the new tutor version with the old one using a pairwise judge; the pipeline always puts the new version in slot A and the new version wins 58% (made-up number). Write 5-8 sentences: what do you check, what do you report and why should you not yet say "the new version is better, 58%".

P11 · Recall

Lesson: L2-M04-L02

One pairwise judge output is Câu A rõ hơn nhưng B đúng. [[A]] ... [[B]] ("Answer A is clearer but B is correct"). What happens to that pair when the probe runs?

P12 · Recall

Lesson: L2-M01-L04

A probe gives 12/40 pairs biased for judge A (Wilson 95%: 0.181 to 0.454) and 9/40 for judge B (0.123 to 0.375). According to L2-M01-L04, what is the reasonable conclusion?

P13 · Select all that apply

Select every mitigation that does not fix length bias.

P14 · Multiple choice

The same 198 pointwise answers, with no reference answer, with a more lenient simulated judge (lenience = 15). Of the 110 answers a human failed, how many pass at the threshold "a score of 5 or higher"? (Numbers of the simulation.)

P15 · True or false

probes.random_order (assigns a random order from a hash of the pair id) removes fixed position bias from the average but does not remove noise.

P16 · Short answer

Add four neutral filler sentences to 100 answers: the score rises on 15 of the 94 readable answers, none falls, the mean change is 0.160 (default simulated judge; 6 unreadable outputs excluded). What does the figure "none falls" tell you, and what does this probe not tell you?

11. Summary

  • Concepts: bias is a directional skew, unlike noise; four biases with published evidence at differing levels of certainty; probes use pairs designed in advance.
  • Skills: run probes on a log, count per slot, read alongside confidence intervals, apply the both-orders rule.
  • Traps: treating low consistency as evidence of bias; treating both orders as a cure for every bias; carrying a paper's figures over to your data; treating simulated figures as properties of a real model.
  • You can now: build and read a bias report for a judge, and say which mitigations are on and which biases remain.

12. References

ID Title Publisher URL Accessed Relevance
R1 Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena (Zheng et al., 2023) arXiv https://arxiv.org/abs/2306.05685 2026-11-03 Full-text PDF; §3.3, §3.4, Table 2, 3
R2 Large Language Models are not Fair Evaluators (Wang et al., 2023) arXiv https://arxiv.org/abs/2305.17926 2026-11-03 Full-text PDF; read the abstract, introduction, §2, §3.2; did not read the later experiments
R3 LLM Evaluators Recognize and Favor Their Own Generations (Panickssery et al., 2024) arXiv https://arxiv.org/abs/2404.13076 2026-11-03 Full-text PDF; read the abstract, introduction, §3, §5.2
R4 Verbosity Bias in Preference Labeling by Large Language Models (Saito et al., 2023) arXiv https://arxiv.org/abs/2310.10076 2026-11-03 Abstract and introduction only
R5 Length-Controlled AlpacaEval (Dubois et al., 2024) arXiv https://arxiv.org/abs/2404.04475 2026-11-03 Abstract and introduction only
R6 Justice or Prejudice? Quantifying Biases in LLM-as-a-Judge (Ye et al., 2024) arXiv https://arxiv.org/abs/2410.02736 2026-11-03 Abstract, introduction, Table 1; did not read the results
R7 Judging the Judges: A Systematic Study of Position Bias (Shi et al., 2024) arXiv https://arxiv.org/abs/2406.07791 2026-11-03 Abstract and introduction only
R8 Judging the Judges: Evaluating Alignment and Vulnerabilities in LLMs-as-Judges (Thakur et al., 2024) arXiv https://arxiv.org/abs/2406.12624 2026-11-03 Abstract, §5.4, Figure 5, Appendix B
R9 Evaluation best practices OpenAI https://developers.openai.com/api/docs/guides/evaluation-best-practices 2026-11-03 Whole page
R10 Define success criteria and build evaluations Anthropic https://platform.claude.com/docs/en/test-and-evaluate/develop-tests 2026-11-03 Whole page; code comments

Key terms (English ↔ Vietnamese)

English Tiếng Việt
Bias / noise Thiên lệch (có hướng) / nhiễu (ngẫu nhiên)
Position / verbosity bias Thiên lệch vị trí / độ dài
Self-preference, leniency Tự ưu ái, dễ dãi
Probe Phép thử có chủ đích để đo một thiên lệch
Both-orders rule Quy tắc cả hai thứ tự