LLM-as-a-Judge
Using one model to grade another, and the biases that come with it.
LLM as a judge means using a strong model to grade other models' answers, which is far cheaper and faster than asking people. It can compare two answers and pick the better one, or score a single answer against a checklist. It agrees with human ratings reasonably well, but it has known biases: it tends to favour the answer shown first, longer answers, and answers written in its own style. Good setups ask the judge to explain its reasoning and swap the answer order to cancel those biases.
The LLM-as-a-Judge Architecture
User Prompt + Candidate Response
│
▼
[ EVALUATION RUBRIC & CoT PROMPT (G-Eval) ]
"Evaluate Helpfulness (1-5). Think step-by-step."
│
▼
[ FRONTIER JUDGE (GPT-4) ]
│
┌───────────────────────┴───────────────────────┐
▼ ▼
Step-by-Step Reasoning Final Score (1-5) / Pairwise Winner
"1. Factual accuracy: Excellent...
2. Tone: Appropriate...
Score: 5/5"
Three Evaluation Modes
- Pairwise Comparison (MT-Bench / Arena): Compare Response A vs Response B for prompt . Judge declares Winner, Loser, or Tie.
- Single Answer Grading (G-Eval): Score a single response on a 1–5 numerical scale based on explicit criteria (Helpfulness, Accuracy, Clarity).
- Reference-Guided Grading: Provide a gold-standard reference answer ; judge scores how accurately response matches key facts in .
Key Judge Biases & Mitigations
| Bias Type | Manifestation | Mitigation Strategy |
|---|---|---|
| Position Bias | Judge favors the response presented in Position 1 (Model A). | Swap Order: Evaluate (A, B) and (B, A). Accept only consistent winners. |
| Verbosity Bias | Judge favors longer, verbose responses over concise ones. | Enforce strict word count constraints or add explicit length-penalty rubrics. |
| Self-Enhancement | Judge favors responses matching its own model family style. | Use neutral multi-model judge ensembles (e.g., GPT-4 + Claude-3.5-Sonnet). |
| Egocentric Bias | Judge is overly lenient on minor factual errors. | Force Chain-of-Thought reasoning steps before score assignment. |
G-Eval Protocol (Liu et al., 2023)
System Prompt:
"You are an expert evaluator. Evaluate the summary based on the document.
Criteria: Consistency (Factual alignment).
Steps:
1. Read the document and summary.
2. Identify all factual claims in summary.
3. Verify claims against document.
4. Assign a score from 1 to 5."
Instead of sampling a single text integer, G-Eval takes logit probabilities of score tokens :
This converts discrete scores into a continuous, smooth floating-point rating!
Say this out loud
"LLM-as-a-Judge uses strong frontier models like GPT-4 to evaluate open-ended text quality. We use G-Eval with Chain-of-Thought reasoning to score outputs against explicit rubrics, computing continuous scores from logit probabilities. We mitigate position bias by swapping candidate order (A-B and B-A) and address verbosity bias using strict length-normalized rubrics."
Follow-ups to expect
- What is MT-Bench? A multi-turn conversation benchmark containing 80 multi-turn questions across 8 domains (coding, math, roleplay, reasoning), evaluated using GPT-4 as an automated judge.
- How much does LLM-as-a-Judge cost compared to human evaluation? LLM judges cost ~1/100th of human annotation budgets and evaluate in seconds rather than days, making them ideal for continuous CI/CD evaluation pipelines.
Check yourself
Question 1 of 3
What is Position Bias in pairwise LLM-as-a-Judge evaluations, and how is it mitigated?