What is LLM-as-judge and what are its known biases?
324 views
47 of 83
1
The problem
Question presented to candidate:
"We want to use a strong model to grade our assistant's answers instead of paying people to read them. What exactly is LLM-as-judge, which biases does it have that could fool us, and what would you do so that we can trust its scores?"
What a strong answer should cover:
The setups: single-answer grading against a rubric (optionally with a reference or the source documents) and pairwise comparison of two answers; binary or few-level anchored verdicts beat a free 1-10 score
The documented biases with names: position bias (verdict flips when the order is swapped), verbosity bias (longer answers preferred), self-preference or self-enhancement (a model favours its own outputs), plus weak reasoning on maths or facts it cannot check and sensitivity to the judge prompt
Mitigations matched to each bias: judge both orders and keep only consistent verdicts or average them, length control or a rubric that does not reward length, a judge from a different model family, reasoning before the verdict, references or sources for factual checks, one criterion per call
Validation against human labels before use, and again whenever the judge model or prompt changes; agreement reported as kappa or a confusion matrix, not just accuracy
Published evidence: strong judges have reached human-level agreement on chat preference data (Zheng et al., MT-Bench and Chatbot Arena, over 80%), which is why the method is used, and the same work catalogued the biases
Clarifying questions expected:
Are we grading single answers against a rubric, or comparing two versions of the system?
Which model family generates the answers, and could the judge be the same model?
Do we have human-labelled cases to calibrate the judge on?
Code / implementation expected: Optional โ a swap-order check for position bias, or a length-controlled comparison, on a stub judge.
llm-as-judge
evals
bias
grading
2
Try it yourself
Sketch your approach before you read the solution. That is what the interview tests.
Stuck? Get a hint.
A short nudge toward the approach. It will not give the answer away.
3
Solution
Target Audience: Engineers about to let a model grade their model, and candidates who need to name the biases and the fixes precisely.
Difficulty: Medium
Verified with: Node 22 and Python 3.12 (a pairwise judge with a simulated position bias, and a scoring judge with a simulated verbosity bias). The judges are deterministic stubs with a bias built in on purpose, so the mechanism and the fix are visible; the size of the bias is an assumption, not a measurement of any model. Published findings are cited by paper, checked October 2026.
How to read this doc: Every idea is explained in plain language first, then tagged with ๐ Interview term: so you also learn the words an interviewer expects. All program output shown was produced by actually running the examples; the Verified section quotes it in full.
1. Why This Even Matters โ A Story First
A baking contest ha
The solution is hidden so you can try first
15 min read ยท 12 sections
4
Read the code
Position bias: one judge, two orders, and the swap-and-agree fix