productinterview.tools
MenuClose

Grading LLM Outputs: Code Checks, LLM Judges and Human Review

Choosing between code checks, LLM judges and human review.

CoreEvals core3 lessons5 questions

What this module covers

  • The three kinds of grader, and what each is good and bad at
  • Picking the cheapest grader that can reliably judge each failure mode
  • Why binary pass/fail criteria are easier to trust than 1–10 scores
  • How to write an LLM judgeLLM-as-judge. Using a language model, with a rubric, to grade another model's outputs. Read the full explanation prompt that grades one thing well
Grading: code, judge, human

Why it matters, by role

  • Applied AI PMProduct Manager. Decides what a product should do, for whom, and why. Read the full explanation: choosing graders is a cost and trust decision you'll be asked to make and defend.
  • Model PM: eval suites mix all three graders; you need to know where each one breaks.
  • AI Safety PM: safety graders must be strict and well understood, or harmful outputs slip through.
  • Forward Deployed EngineerForward Deployed Engineer. An engineer embedded with customers who scopes, builds and ships AI solutions into production. Read the full explanation: you'll set up grading for each customer pilot, often with the customer's experts as the human reviewers.
  • AI Product Engineer: you'll implement the code checks and judges yourself.

Lessons

  1. Three ways to grade: code, judge, human
  2. Why pass/fail beats 1–10 scores
  3. Writing a judge that grades one thing

Three ways to grade: code, judge, human

Grader How it works Good for Weak at Cost and speed
Code check A deterministic rule: exact match, regex, JSON schema, "did it call the refund tool?" Format, structure, tool calls, anything with one right answer Meaning, tone, open-ended quality Free and instant
LLMLarge language model. A model trained to predict the next token of text, used to generate and reason over language. Read the full explanation judge A model grades the output against a written criterion Meaning and quality at scale: "did it cite a real policy?" Needs validating; can be lenient or biased Cheap, fast
Human review A person, ideally a domain expert, grades the output The reference everything else is checked against; subtle or high-stakes calls Slow, expensive, and people disagree Slow, costly

The rule: use the cheapest grader that can reliably judge each failure mode. If a code check can catch it, don't use a judge. Use humans to build the reference labels that validate your judges, and for the cases too subtle or risky to automate.

Most real eval suites use all three: code checks for structure, judges for meaning, and a human-labelled sample to keep the judges honest.

Why pass/fail beats 1–10 scores

It's tempting to ask a judge (or a person) to score "helpfulness from 1 to 10". It rarely works:

  • Nobody agrees on what a 6 means. Scores drift between graders and over time.
  • Averages hide failures. A 7.2 average can mean "mostly fine" or "great, with some terrible answers".
  • You can't act on it. A score doesn't say what went wrong.

Binary criteria fix this. "Does the answer cite a policy section that exists? Pass or fail." Two experts can agree on that, you can measure a judge against it (see judge validation), and a failure tells you exactly what to fix.

If you need more nuance, use several binary criteria, one per failure mode, instead of one scale.

Writing a judge that grades one thing

A judge prompt that checks one criterion is far easier to make reliable than one that grades "overall quality". A good judge prompt has:

  1. One criterion, written as something observable: "The answer states a refund amount that matches the order total" rather than "The answer is accurate".
  2. The context the judge needs, such as the order details or the policy document. A judge can't check facts it can't see.
  3. Pass and fail definitions, with the tricky edge cases spelled out.
  4. A few labelled examples, including near-misses.
  5. Reasoning before the verdict: ask for a short explanation, then PASS or FAIL. It improves accuracy and makes disagreements easy to read.
  6. A fixed output format, so code can parse the verdict.

Then validate it against expert labels before trusting it.

Questions

Rubric

Dimension Weak Passable Strong
Grader choice Uses one grader for everything Mixes graders Picks the cheapest reliable grader per failure mode, and says why
Criteria Vague scales ("rate helpfulness 1–10") Some binary criteria Observable pass/fail criteria tied to real failure modes
Judge design "Ask a model if it's good" A judge prompt with a criterion One criterion, context, examples, reasoning first, fixed format
Trust Assumes the judge is right Mentions checking it Plans validation against expert labels

Build it

Next modules