Skip to content
Tech Interview Prep
Technical interview guide

LLM Evaluation

Measuring whether an LLM-based system actually works, given that outputs are open-ended and hard to score automatically.

Minutes to read
4
Practice MCQs
25
Interview Q&A
25
Edition
v5
Editorial status
Reviewed

Scope: BLEU, ROUGE, BERTScore, HELM, BIG-bench, TruthfulQA, MT-Bench, G-Eval, RAGAS, Model Cards, NIST AI RMF and GenAI Profile, and OWASP LLM references reviewed 2026-09-06.

Overview

Curated: · Written: · Reviewed:

LLM Evaluation

In one line

LLM evaluation is a release control: a versioned contract that says which product change may ship, measured on a frozen, sliced, uncertainty-bounded eval set, with rollback triggers defined before results come in. Reach for it whenever an open-ended output has to be judged before it reaches users, and whenever someone quotes a single aggregate score.

Key definitions

  • Evaluation contract: the decision, population, rubric, metrics, slices, baselines, thresholds, owners and review date, written before the run.
  • Slice: a subpopulation (language, cohort, intent, risk class) scored separately; the gate applies to each slice that carries risk.
  • Reference-anchored vs reference-free judging: the first checks claims against a gold answer and is more reliable but covers only what the references cover.
  • Chance-corrected agreement (Cohen's or Fleiss' kappa): agreement after removing what raters would match by chance.
  • Shadow traffic and sticky canary: replaying live requests through the candidate, and exposing a small fixed cohort to it, to test offline results against production.
  • Non-compensable gate: a safety or critical-slice failure that blocks release regardless of the average.

Formulas and complexity

Cohen's kappa for two raters, where $p_o$ is observed agreement and $p_e$ is chance agreement:

κ=po−pe1−pe\kappa = \frac{p_o - p_e}{1 - p_e}

Worked example: $p_o = 0.90$, $p_e = 0.50$, so $\kappa = 0.40 / 0.50 = 0.80$. Hypothetical figures, labelled as such.

Paired win-rate interval (bootstrap, $n$ frozen cases): the point estimate is $\hat{p} = \text{wins}/n$; resample cases with replacement and take the 2.5th and 97.5th percentiles. With 116 wins of 200 the interval is roughly [0.51, 0.65], which cannot separate a 58% candidate from a 55% one.

How it works

The decision and contract come first. Deterministic checks run on every case with no judge. Judge-scored and human-scored layers follow, calibrated against blinded expert labels. Safety is a separate gate. Results are read per slice with uncertainty, and the release is then confirmed by canary and rollback rules.

no yes no yes Decision and contract Deterministic checks Calibrated judge and human labels Slice scores with CI Safety and critical slices pass? Block and review Shadow and sticky canary Online metrics hold? Automatic rollback Ship

When to use and when not to

MethodUse whenAvoid when
Exact match or schema checkA machine-checkable contract exists (JSON, IDs, dates, tool args)Wording varies and meaning is what counts
ROUGE / BLEUConstrained translation or summarization comparison against a referenceOpen-ended correctness; paraphrases score low
BERTScoreSemantic similarity is needed and encoder limits are understoodYou need a verdict on factual correctness
LLM judge (reference-anchored)Claims can be checked against gold answersBehaviors the references do not cover
LLM judge (reference-free)No gold answer existsWithout human calibration and order control
Human expert reviewHigh-risk factual, legal, medical, security or policy outcomesBulk regression runs with no adjudication budget
Online canaryOffline evidence is strong but production value is unprovenAs the only check before any release

Traps interviewers probe

  1. Trusting one aggregate. A gain on general items can hide a safety regression. Fix: gate each risk slice separately and treat critical failures as non-compensable.
  2. Reading raw agreement as reliability. 85% agreement may be near chance when labels are skewed. Fix: report chance-corrected kappa on blinded labels and re-measure after any judge change.
  3. Counting ROUGE as correctness. A paraphrase that is right can score low and a wrong answer that reuses the reference can score high. Fix: use reference-anchored claim checks or human review for open-ended outputs.
  4. Splitting by prompt instead of by cluster. Paraphrases of one template leak across dev and test. Fix: group near-duplicates and multi-turn conversations before splitting, and treat 50 paraphrases as about one observation.
  5. Treating judge output as truth. Judges prefer longer answers and the first position. Fix: randomize or swap order, count only consistent pairs or report disagreement as noise, and calibrate against experts.

Interview tips

Open with the release decision: what ships, to whom, which harm is unacceptable, and what result rolls it back. Then name the layers in order.

Likely follow-ups:

  • Is 85% judge agreement good? Ask for chance-corrected agreement on blinded labels.
  • Win rate rose but complaints rose too. Look for a regressed slice hidden by the average.
  • How do you stop leakage? Dedup, group, hash, rotate, and investigate suspicious gains.
  • Offline says ship, PM says wait. Offline bounds risk but does not prove value; a canary resolves that.
  • Judge and a human disagree on a medical answer. Expert adjudication applies regardless of automated agreement.

30-second outline: "I start from the decision and the rollback trigger. I gate safety and critical slices separately with deterministic checks first, then a judge calibrated to blinded expert labels with order randomized. I report per-slice win rates with a bootstrap interval, and I canary with a pinned baseline before full rollout."

Feedback on this overview

Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.