# What Is LLM-as-a-Judge?

> What an LLM judge is, how it grades answers against a rubric, where it goes wrong, and how to trust it, explained simply for your AI interview.

**In short:** LLM-as-a-judge means one language model grades another model's answer against a written rubric. It is fast and scales well, but judges have known biases, so you check them against human labels before trusting their scores.

AI and LLM interview question Q249, Evaluation and observability. Intermediate, very common (our estimate). From Venkat R. Murty's free Interview Kit: https://designervenkat.online/interview/ai/what-is-llm-as-a-judge

## Say it in 30 seconds

LLM-as-a-judge means one model grades another model's answer. I give the judge a rubric, the rules a good answer must meet, and it returns a verdict: pass or fail. It is fast and scales. The 2023 research found a strong judge reached over 80% agreement with human labels, about the level people agree with each other. Judges also have known biases, like favouring longer answers. So I check the judge against human labels before I trust its scores.

## Say it in 2 minutes

LLM-as-a-judge means a language model grades another model's answer. I give the judge a rubric, the rules a good answer must meet, plus the question and the answer. It replies with a verdict: pass, fail, or needs a person. Judges are fast, so they can read thousands of answers that a small team could never review by hand.

The approach has a known catch. The 2023 research on it found a strong judge reached over 80% agreement with human labels, about the level people agree with each other. But judges have biases. They can favour an answer because of its position, prefer longer wording, or favour answers they wrote themselves. Those are the things I check.

On a claims assistant, a judge checks each summary for the claimed amount and the policy clause. To start, a person labels about 100 summaries with the same rubric. I measure how often the judge agrees with those labels, read every disagreement, and tighten the rubric wherever it is vague.

I also swap the order of two answers when comparing them and judge twice, so position can't decide the winner. I keep code for checks with one right answer, use people on a sample, and rerun the judge check whenever the model or the prompt changes.

## What is LLM-as-a-judge, in plain words?

LLM-as-a-judge means one large language model (LLM, the AI model behind chat tools) grades the answer another model wrote. You give the judge a rubric, a short list of rules a good answer must meet, and it returns a verdict such as pass or fail.

The 2023 paper that tested the idea, published at NeurIPS (a major AI research conference), calls LLM-as-a-judge a way to approximate human preferences that are otherwise costly to get.

Think of a senior claims handler who reads a junior's letter against the policy checklist before it goes out. The checklist is the rubric and the senior is the judge. A judge model does that same reading, thousands of times a day.

A real case: an insurer's assistant writes a summary of each claim for an adjuster. Before a summary reaches anyone, a judge model checks it. Does it keep the claimed amount and the policy clause? One wrong number in a payout summary costs real money, so the rubric has to be exact.

- **Rubric:** The written rules a good answer must meet, such as keeping the exact amount.
- **Judge model:** The second model that reads an answer and gives it a verdict.
- **Verdict:** The judge's reply: pass, fail, or needs a person.
- **Human label:** A verdict a person gave on the same answer, used as the reference to check the judge.

## How does a judge grade one answer?

1. **Write the rubric:** Rules a grader can check, not a feeling. For example: "The summary keeps the claimed amount and the policy clause."
2. **Send the claim, the answer and the rubric:** The judge gets all three, with the answer clearly marked as the thing to grade.
3. **Ask for a fixed verdict:** Pass or fail. A fixed reply is easy to count, while free-form praise is hard to compare.
4. **Count and sample:** Count passes and fails for each version of the assistant, and send a sample to a person.

*Diagram, How a judge grades one answer: The model's answer and the rubric go into the judge. The judge sends back one of three verdicts, and each one lands in the score report. Unclear replies go to a person, never to a guessed pass.*
1. The rubric goes into the judge first: the rules a good answer must meet.
2. The model's answer goes in with it, marked as the thing to grade.
3. Every rule met: the judge replies pass.
4. A rule broken: the judge replies fail.
5. No clear verdict: the reply goes to a person.
6. Passes count toward the score.
7. Fails count too, and each one is a clear miss.
8. A person's verdict joins the score after it is read.

Here is the parsing step in plain Python. We pretend the judge replied, and the code only accepts a clear tag.

```python
# A simplified judge step for a claims-summary assistant. No real model: we pretend the judge replied.
RUBRIC = "The summary keeps the claimed amount and the policy clause."

def build_judge_prompt(claim, summary):
    return (
        "Grade the summary against the rubric.\n"
        f"<rubric>{RUBRIC}</rubric>\n"
        f"<claim>{claim}</claim>\n"
        f"<summary>{summary}</summary>\n"
        "Reply with <result>pass</result> or <result>fail</result>."
    )

def parse_verdict(judge_reply):
    # Only a clear tag counts. Anything else goes to a person, never a guessed pass.
    has_pass = "<result>pass</result>" in judge_reply
    has_fail = "<result>fail</result>" in judge_reply
    if has_pass != has_fail:
        return "pass" if has_pass else "fail"
    return "needs a person"

print(build_judge_prompt("Claim 88421: water damage, 4,200 USD, clause 7.3", "Water damage, 4,200 USD, clause 7.3.").splitlines()[0])
for reply in ["<result>pass</result>", "<result>fail</result>", "Looks fine to me."]:
    print(repr(reply), "->", parse_verdict(reply))
```

Output:

```text
Grade the summary against the rubric.
'<result>pass</result>' -> pass
'<result>fail</result>' -> fail
'Looks fine to me.' -> needs a person
```

## When should you use a judge instead of code or people?

Code is the fastest check when there is one right answer. A person is the most careful. A judge sits between them. Anthropic's evaluation guide sorts them the same way.

- **Code check: Exact or pattern match.** Fastest and most reliable for a clear answer. It can't judge tone or whether a summary means the right thing.
- **LLM judge: A model with a rubric.** Fast and flexible, scales to thousands of answers, and handles judgments that need reading. It has biases, covered below.
- **Human: A person reads it.** Most flexible and high quality, but slow and expensive. Best used on a sample, to check the other two.

> "LLM-based grading: Fast and flexible, scalable and suitable for complex judgment." (Anthropic, evaluation guide)
>
> "Human grading: Most flexible and high quality, but slow and expensive." (Anthropic, evaluation guide)
>
> "achieving over 80% agreement, the same level of agreement between humans" (Judging LLM-as-a-Judge, 2023 study (the agreement result))
>
> "Using a model grader means prompting a separate model to grade the outputs of the model you're evaluating." (OpenAI, graders guide)

Worked example. An insurer's assistant writes 4,000 claim summaries a month. A person reading each one for about 3 minutes would spend around 200 hours. A judge reads all 4,000 in one run, and a person checks a sample of 100 against the rubric. People spend their time on the hard calls, and the judge takes the routine reads.

## Where does a judge go wrong?

The 2023 study tested the judge itself and named three known biases. Position bias is when the judge favours an answer because of where it sits. The study defines it as a propensity to favour certain positions over others.

Verbosity bias is when the judge likes longer answers, even when a shorter one is clearer or more accurate. Self-enhancement bias is when a judge favours its own output. The study says LLM judges may favour the answers generated by themselves.

*Diagram, Where a judge goes wrong, and the fix: The study suggests a conservative check: swap the order of two answers, judge twice, and count only a win that holds both ways. Using a judge that did not write the answer is our own extra safeguard for self-preference, not the paper's advice.*
1. Swap the two answers and ask again, so slot position cannot decide.
2. A rubric helps, but check the judge on long and short answers too.
3. A judge that did not write the answer is less likely to favour it.
4. Only a win that holds in both orders counts.
5. Written rules can be re-checked by anyone later.
6. A new judge is checked against people before it counts.

The same study also found some good news: some of these biases are minor or can be mitigated. So measure them, and never assume a judge has none.

> **Tip:** Asked about biases? Name the three, then say how you check each: swap the order for position bias, use a judge that did not write the answer for self-preference, and read the misses against human labels for verbosity.

## How do you check the judge itself?

1. **Label a sample by hand:** A person grades about 100 answers with the same rubric. Those labels are the reference.
2. **Measure agreement:** Count how often the judge's verdict matches the person's. OpenAI's guide also advises running several candidate answers through the judge to check that its grading is stable.
3. **Read the misses:** Look at each disagreement. Often the rubric is vague, so tighten the wording and test again.
4. **Repeat after changes:** Models and prompts change, so the check runs again before you trust a new judge.

### How would you set up a judge for a claims assistant?

The first version of the judge looks fine on a dashboard. Its scores go up, so the team stops reading the summaries.

- **Without a check: Scores taken as truth.** A drop in accuracy goes unnoticed for weeks, because nobody measures the judge against people.
- **With a check: Judge tested against people.** A person labels 100 summaries, the agreement is measured, the misses fix the rubric, and the check repeats each month.

## What does the interviewer want to hear?

**A strong answer covers**

- [ ] A plain definition: one model grades another against a rubric.
- [ ] Why it's used: fast, scalable, and it reads nuance that code can't.
- [ ] Its known biases: position, verbosity and self-enhancement.
- [ ] How you trust it: check against human labels, and rerun after changes.
- [ ] Where code and people still fit: code for exact checks, people on a sample.
- [ ] A worked example with real stakes, like a claims summary.

**Common traps**

- Trap: "A judge is always right, so trust its score." Better: It's a model too, with biases. Check it against human labels first.
- Trap: "Use the same model to write and to judge." Better: A model may favour its own output. Use a different judge, and swap the order of answers.
- Trap: "People are too slow, so drop them." Better: Keep a person on a sample. That check is how you learn whether the judge is any good.

## Can you spot the weak judge?

**Spot the weak setup:** A team's judge says the new answer wins 70% of pairs. Which setup makes that score least trustworthy?

A. Every pair is shown to the judge with answer A first.
B. The rubric lists the claimed amount and the policy clause.
C. A person checked 100 verdicts, and 91 matched.
D. The judge is a different model family from the writer.

**Answer:** A. Always showing answer A first lets position bias favour one side. Swap the order and count only wins that hold both ways. The other three are sound: a clear rubric, a person checking a sample, and a judge from a different model family than the writer.

**Quick check:** Your judge agrees with people on 60 of 100 test answers. What do you do first?

A. Ship it, since 60 out of 100 is a pass.
B. Read the 40 disagreements, tighten the rubric, then test again.
C. Switch to the biggest judge you can get.
D. Stop checking with people to save time.

**Answer:** B. The disagreements show where the rubric is vague or the judge misreads a rule. Fix those, then measure again. A bigger judge or fewer human checks skips the step that tells you whether the judge works.

## Can you answer these from memory?

**Flash cards**

- **What is LLM-as-a-judge?** One model grades another model's answer against a written rubric.
- **What goes into a judge prompt?** The claim, the answer and the rubric. Ask for a fixed verdict.
- **Judge vs human?** Judges are fast and scale. People are slower, and their labels are the reference you check the judge against.
- **Name three known biases.** Position, verbosity and self-enhancement. Some are minor or can be mitigated.
- **How do you trust a judge?** Compare its verdicts with human labels on a sample, then fix the misses.
- **Why use a rubric?** Clear rules give steadier grades than a vague 'is this good?'

## Likely follow-up questions

- Q250 What biases do judges have (position, length, self-preference)? https://designervenkat.online/interview/ai/llm-judge-biases
- Q251 How do you calibrate a judge against humans? https://designervenkat.online/interview/ai/how-do-you-calibrate-a-judge-against-humans
- Q248 What is a golden dataset, and how do you build one? https://designervenkat.online/interview/ai/what-is-a-golden-dataset
- Q247 Offline vs online evaluation? https://designervenkat.online/interview/ai/offline-vs-online-evaluation
- Q254 Faithfulness vs relevance? https://designervenkat.online/interview/ai/faithfulness-vs-relevance
- Q256 Capability evals vs regression evals? https://designervenkat.online/interview/ai/capability-evals-vs-regression-evals

## Learn it in depth

- [A model as the judge](https://designervenkat.online/learn/ai-engineering/model-based-evals)
- [People as the judges](https://designervenkat.online/learn/ai-engineering/human-evals)
