Skip to content
The AI Agent Factory

24.4 LLM-as-judge: a rubric and a separate model

Approved by
Panaversity ·
19 min read

In everyday life. A head chef cannot taste every plate that leaves a busy kitchen. So she writes a tasting sheet: the sauce is warm, the rice is not sticky, the salt comes before the lemon. A second cook, never the one who cooked the dish, tastes each plate against the sheet. He marks it good or not good. When he cannot tell, he marks "not sure", and that plate goes to the head chef. She tastes only the plates he sends her.

What you will learn. How a second model reads the answers code cannot check, and why its mark is never the gate. You practice it in Lab 24, Task 3.

  • What is an LLM-as-judge?
  • What does the rubric say?
  • Why a separate model?
  • What does the judge return?
  • When does the judge run, and what does its mark do?
  • What does a judge cost?

Why it matters. Without a reader for meaning, an answer that code passed is never looked at again.

At work. At 4:30 on Friday, April 9, 2027, the builder opens a pull request that shortens the worker's prompt. One of the lines it cuts told the worker to keep a rule's conditions when it quotes the rule. The change touches the prompt, so the suite runs live on the 40 cases.

  1. The checks by code run first. They pass at the threshold, 39 of 40. The one failing case is the known extraction case, where the total was read as the subtotal, and the report names it.
  2. The judge reads the 25 answers to the questions. It marks 24 correct and one incorrect. To "Who approves a $12,000.00 invoice?" the worker now says "The controller, after payment", and cites ap-triage-rules.md, line 8.
  3. Code had passed that answer (24.3). Ana's expected decision is "The controller, before payment".
  4. The suite stays red. No mark from Ana exists for this answer at this commit, so the pull request waits over the weekend.
  5. Monday, April 12, 7:10. The morning triage runs on the old prompt, as it has all week. The change never reached it.
  6. At 8:40 Ana Morales has twenty minutes. She opens the report the builder sent, not the triage. It holds one answer to read. She reads it and marks it fail.
  7. The builder opens the trace (24.7 reads it). The fault began in the model's output, and its cause is the line Friday's change cut (24.8 shows how to tell). The builder puts the line back, the judge marks the new answer correct, and the pull request merges.

Ana read one answer, and her judgment reached the whole suite.

What is an LLM-as-judge?

An LLM-as-judge is a model that reads another model's answer and marks it. LLM means large language model. It is the third of the three ways to grade in 24.3, and the only one that reads. Anthropic's public evals course gives the same order: code for exact fields, a judge for free text, and people last.1

At Brightline, the judge reads only the answers to the 25 questions. It never marks an extraction: every field of an invoice has one right value, so code gates those alone.

The exam guide calls the whole of this an LLM-as-judge harness: the judge model, its rubric, and the code that sends each answer and parses the verdict.2

What does the rubric say?

A rubric is the written list of what the judge checks. The builder writes it from Ana's reasons: each time she marked a recorded answer fail, she said why, and each reason becomes a line. Three habits keep a rubric usable:

  • Each line is one yes-or-no question. "Does the answer keep the order of the steps in the policy line?" can be marked. "Is the answer good?" cannot. Anthropic's advice is to make criteria atomic, which means one thing each, and binary, which means yes or no.3
  • It says what must not change the mark. A longer answer is not a better one, and different wording of the same decision is still correct.3
  • It gives the judge a way out. When the answer cannot be judged from what the judge was given, the mark is "unknown".4

The prep course's judge has no "unknown". That verdict comes from Anthropic's public evals course and its post on agent evals.14

For each answer, the judge is given the question, Ana's label for that case, the worker's answer and the rubric.

Why a separate model?

The judge is a different model from the one that wrote the answer. A model that grades its own work tends to recognize and favor it. So Anthropic's docs and its public course both say to use a judge that did not write the answers.351 One practitioners' FAQ says the same model is usually fine as a judge, as long as it agrees with the expert on held-out answers.6 Brightline follows Anthropic.

The judge also starts with nothing from the worker's run: no history and no tool results, only what the suite hands it.

What does the judge return?

Two fields, and nothing else. This is the form Anthropic's public evals course uses:1

{
  "explanation": "The answer names the controller and cites line 8, but it puts the approval after payment. The label says before payment.",
  "verdict": "incorrect"
}

A verdict is the judge's mark: correct, incorrect or unknown. The suite's code parses this output strictly. That means it accepts exactly these two fields and exactly these three values, and it reads anything else as unknown, never as a pass. Chapter 25 teaches structured outputs, which make the API hold the model to this shape.

The exam's prep course teaches a different form: strengths, weaknesses, a field named reasoning, and a score from 1 to 10.7 Know both.

{
  "strengths": "Names the right approver and cites the right line.",
  "weaknesses": "Puts the approval after payment.",
  "reasoning": "The policy line says before payment, so the order is wrong.",
  "score": 3
}

The build uses the verdict for two reasons. First, a score needs someone to decide what a 3 means, and a pull request needs a yes or a no. Second, a field named reasoning can stop the judge from answering. In Claude. Anthropic's docs list a reasoning, thinking or trace field in JSON output as one thing that can make the model decline to answer.8 So the judge writes a short explanation. It does its longer thinking with thinking turned on, a setting that lets the model reason before it answers. The docs recommend this for a grader.5

When does the judge run, and what does its mark do?

The judge runs only when a pull request changes the prompt, the model, or the golden set's cases or labels, which is 19.16's "at each model or prompt change". Then CI runs the worker live, in the staging workspace (23.4) and under its spending limit (23.13). The judge reads each of the 25 answers once.

A judge judges and can be wrong, so its mark is never the gate by itself. A check by code stays the gate (24.3). Here the code's rule is short:

  • An answer the judge marks correct passes, if the checks by code passed it too.
  • An answer the judge marks incorrect or unknown waits for Ana's mark. Her pass passes it. Her fail fails the suite.
  • Her marks live in data/golden/marks.csv, stored by case and by the commit whose answer she read. So a mark she gave an old answer never passes a new one.
  • Recording a mark changes none of the inputs the live job watches: the prompt, the model, and the golden set's cases and labels. So her mark starts no new live run, and the suite replays the answers of the commit her mark names.

In Claude. The judge is one plain request to the model, a Messages API call, for each answer, to a Claude model that is not the worker's.

What does a judge cost?

Each verdict is a model call, so the judge costs money on every run where code costs nothing. It can be wrong in both directions. And every incorrect or unknown holds a pull request until Ana has time. Friday's change waited until Monday at 8:40. So use a judge only where reading is the only check. And when there are only a few answers, as in 19.16's four, a person reading them is still the fair choice.

The operating rule: let a judge read only what code cannot check. Give it a rubric written from the expert's reasons, a model that did not write the answer, and a verdict that may be "unknown". Every mark that is not "correct" goes to the expert.

Do this now. Take one row of 19.16's answer check, and ask your coding agent to draft the judge's rubric for it. Copy this line:

Write a rubric for a judge that marks one answer to this question. Use my reasons below, one yes-or-no question for each line. Say what must not change the mark. Return only an explanation and a verdict of correct, incorrect or unknown. Ask me for anything you need.

Then give it two answers you wrote yourself, one right and one with two steps in the wrong order, and read both verdicts.

Check yourself

Question 1 / 7

0 answered

For each answer it marks, what is Brightline's judge given?

  1. Introduction to evals: Build a minimum viable eval, Claude Academy.↑↑2↑3↑4
  2. Claude Certified Developer - Foundations Exam Guide, version 1.1, Anthropic.↑
  3. Building strong safety evaluations, Anthropic.↑↑2↑3
Owner
Panaversity