Evals & Observability·Question 2 of 83BasicAI-75

Walk me through the taxonomy of evaluation methods for LLM systems and when you'd use each.

Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.

Model answer: the part to lead with

Four tiers, ordered by cost and by how much human judgment they encode:

  1. Code-graded assertions - exact match, regex/contains, JSON schema validation, numeric tolerance, executing generated code against tests. Deterministic, free, fast. Use whenever the criterion is objectively checkable: classification labels, extraction fields, output format, math answers, code correctness.
  2. Model-graded (LLM-as-judge) - another LLM scores or compares outputs against a rubric. Cheap enough to run on every CI push, but noisy and biased (position, verbosity, self-preference), so it must be calibrated against human labels before you trust it. Use for genuinely subjective criteria: helpfulness, tone, faithfulness to sources, instruction-following nuance.
  3. Human evaluation - expert or crowdworker labels, pointwise or pairwise. Slow and expensive, so use it strategically: to create ground truth for calibrating judges, for high-stakes domains (medical, legal), and as the periodic audit that keeps automated graders honest.
  4. Online evaluation - A/B tests, interleaving, implicit feedback (thumbs, regeneration rate, task completion, escalations). The only tier that measures what users actually experience, but it needs traffic, time, and a shipped feature - and it can't tell you why something regressed.
Full worked answer with diagram

Four tiers, ordered by cost and by how much human judgment they encode:

  1. Code-graded assertions - exact match, regex/contains, JSON schema validation, numeric tolerance, executing generated code against tests. Deterministic, free, fast. Use whenever the criterion is objectively checkable: classification labels, extraction fields, output format, math answers, code correctness.
  2. Model-graded (LLM-as-judge) - another LLM scores or compares outputs against a rubric. Cheap enough to run on every CI push, but noisy and biased (position, verbosity, self-preference), so it must be calibrated against human labels before you trust it. Use for genuinely subjective criteria: helpfulness, tone, faithfulness to sources, instruction-following nuance.
  3. Human evaluation - expert or crowdworker labels, pointwise or pairwise. Slow and expensive, so use it strategically: to create ground truth for calibrating judges, for high-stakes domains (medical, legal), and as the periodic audit that keeps automated graders honest.
  4. Online evaluation - A/B tests, interleaving, implicit feedback (thumbs, regeneration rate, task completion, escalations). The only tier that measures what users actually experience, but it needs traffic, time, and a shipped feature - and it can't tell you why something regressed.

The operating principle: use the cheapest grader that faithfully captures the criterion. If you can write an assertion, never use a judge. If a judge suffices, don't burn human hours on routine grading - spend them auditing the judge. And treat offline evals as predictors that online metrics must confirm; a persistent gap between offline scores and online outcomes means your eval set no longer represents production traffic.

Going further: follow-up territory

Strong candidates add that these compose within one suite: a single test case might assert JSON validity (code), score faithfulness (judge), and feed an online resolution-rate metric once deployed.

Worth sketching. Drawn as a decision tree, it shows you escalate to expensive graders only when the cheap one cannot carry the criterion.

flowchart TD
    Q["Criterion to grade"] --> D1{"Deterministically<br/>checkable?"}
    D1 -->|"yes"| A["Code assertion:<br/>free, exact, every push"]
    D1 -->|"no"| D2{"Rubric a careful<br/>human could apply?"}
    D2 -->|"yes"| J["LLM judge,<br/>calibrated against humans"]
    D2 -->|"no"| H["Human eval:<br/>ground truth and audits"]
    A --> ON["Online A/B confirms<br/>on real users"]
    J --> ON

What a good answer covers

  • Code-graded assertions - exact match, regex/contains, JSON schema validation, numeric tolerance,…
  • Model-graded (LLM-as-judge) - another LLM scores or compares outputs against a rubric
  • Human evaluation - expert or crowdworker labels, pointwise or pairwise
  • Online evaluation - A/B tests, interleaving, implicit feedback (thumbs, regeneration rate, task…
  • The operating principle: use the cheapest grader that faithfully captures the criterion

Key terms: Code-graded assertions · Model-graded (LLM-as-judge) · Human evaluation · Online evaluation

Interviewer follow-ups to expect

  1. Give a concrete criterion that looks judge-worthy but can be reduced to an assertion. When would you pay for human eval even though your judge agrees with humans 85% of the time?

Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep