Topic 3 of 4 · 3 min read
Bias when AI ranks or grades work
Goal: Spot position or length bias in an AI comparison of two drafts and change the setup to remove it.
When an AI model compares or grades drafts, it can favour the draft in a certain position, the longer draft, or text that looks like its own, so its verdict is a biased measurement and not a neutral score.
Check yourself · 1 of 3
An AI grader prefers whichever answer it reads first. What is this bias called?
Why it matters
Teams now use ChatGPT, Claude or Gemini to pick the better of two answers, score essays, rank job applications or grade support replies. It is fast and cheap. But the grader is a model with habits. Studies of "LLM as a judge" have found three common ones:
- Position bias. The model prefers the first, or sometimes the last, answer it sees. Wang and colleagues showed that changing the order of two answers could change which one won.
- Length bias. Longer answers often get higher marks, even when the extra words add nothing.
- Self-preference. A model may rate text written by itself, or in its own style, higher than text from a person or another model.
Zheng and colleagues, who tested strong models as judges, found they agreed with human raters often, but these biases were real and measurable. So AI grading is useful, but only when you control for the bias.
How to remove the bias
- Swap and repeat. Run each comparison twice, with the two drafts in opposite order. Count a win only when the same draft wins both times. If the winner changes with order, call it a tie.
- Control for length. Ask for the criteria directly, such as accuracy and clarity. Tell the grader that length is not a merit. Better still, compare drafts of similar length.
- Use a rubric. Give the model a list of criteria with a score scale, and ask it to score each one before giving a verdict. This is more stable than "which is better?".
- Hide the source. Do not say which draft came from which writer or model.
- Use a different model as grader. If one model wrote the drafts, ask another to grade them.
- Spot-check with a person. Read a sample of the AI grades yourself.
Before and after
Before: A team asks a model, "Which reply is better?" Reply 1 is a short, correct answer. Reply 2 is long and wordy. The model picks Reply 2. The team ships it.
After: The team runs the comparison again with the order swapped and a rubric of accuracy, clarity and brevity. The short reply wins both times. The bias in the first run came from length and position.
What goes wrong
- Trusting one comparison in one order.
- Using the same model to write and grade, and being surprised that it likes its own work.
- Treating the score as an exact number. A "8 out of 10" from a model is a rough signal, not a measurement.
Examples
Swap test on two summaries
A manager asks Claude to compare two meeting summaries. Summary X wins when it is shown first. She swaps the order, and Summary Y wins. She records a tie and picks by reading both against the meeting notes herself.
Rubric instead of "which is better"
Ask: "Score each reply from 1 to 5 on accuracy, tone and brevity. Say that length itself earns no points. Then name the stronger reply." The explicit criteria make it harder for a long reply to win just because it is long.
Key points
- Models used as graders show position bias, length bias and self-preference.
- Running each comparison in both orders and counting only consistent wins removes much of the position bias.
- A rubric with named criteria is more stable than asking which draft is better.
- A model that wrote the drafts may rate them higher than a different grader would.
- AI grades are rough signals, so spot-check a sample with a person.
Common mistakes
- Trusting a single comparison with a fixed order.
- Letting the model that wrote the drafts also grade them.
- Using a bare "which is better?" with no criteria.
- Reading a model score such as 8 out of 10 as precise.
Check yourself · 2 of 3
You use an AI model to pick the better of two reply drafts. Which setup best reduces position bias?
Check yourself · 3 of 3
A grader model scores a long, wordy answer 9 and a short correct answer 7. Which change best tests for length bias?
Practice items, not counted towards your mastery.
Start here
- Quantifying language models' sensitivity to spurious features in prompt design (Sclar et al.) (opens in a new tab)PaperFree
Shows how small formatting changes can swing model accuracy by large amounts.
- Large Language Models are not Fair Evaluators (Wang et al.) (opens in a new tab)PaperFree
Shows that swapping the order of two answers can flip which one an AI judge prefers.
- Defeating Nondeterminism in LLM Inference (Thinking Machines Lab) (opens in a new tab)ArticleFree
Explains why the same prompt can return different answers even with randomness turned off.
More for this topic
- Judging LLM-as-a-Judge with MT-Bench and Chatbot Arena (Zheng et al.) (opens in a new tab)PaperFree
Measures position, length and self-preference biases in AI judges and how well they match human raters.