LLM Evaluation Methods — Cheat Sheet

Quick-reference · Programmatic · Human · LLM-as-a-Judge · Reference-Based vs Free · Offline vs Online

1-PAGE REFERENCE

1Core Concept

Eval method: the mechanism that executes the judgment — who/what turns an output into a score.

Pipeline = what's checked. Method = who/what checks it: code, human, or judge LLM.

2The Three Methods

MethodStrengthWeakness
ProgrammaticFast, cheap, repeatableNeeds measurable criteria
HumanNuanced judgmentExpensive, slow
LLM-as-JudgeScalable + nuanceJudge must be validated

3Programmatic — RAG Retriever

Target: retriever · Task: retrieves relevant docs? · Criterion: Recall@K

Golden dataset ≠ method: human builds labels (50–100 Qs), scoring stays fully programmatic.

4Worked Example

Q: "Prereqs for ML course + duration?" Relevant docs: 1001, 1003.

K=5 returns: 1001,1002,1004,1005,1006 → 1 of 2 found.

5Recall@K

Relevant in Top-K ÷ Total relevant
1 ÷ 2 = 50%

Range: 0%–100%. Avg over dataset e.g. 67% Recall@5.

6Dataset-Level Flow

  1. Send question → retriever
  2. Get top-K docs
  3. Compare vs relevant docs
  4. Compute Recall@K
  5. Average across all Qs

7Improve the Retriever

Better embeddings Query expansion Raise K Add reranker Better chunking Precision/ranking metrics

8Human Eval — Helpfulness

Target: whole app · Task: rate helpfulness (accuracy, completeness, tone, usefulness)

No single formula captures "helpful" reliably → needs human judgment.

9Helpfulness Rubric (1–5)

5Accurate, complete, helpful, right tone
3Partially helpful, missing aspects
1Not helpful / incorrect

10Human Eval Flow

  1. 50–100 question dataset
  2. Send to chatbot
  3. Collect answer
  4. Rate w/ rubric
  5. Average → overall score

11Types of Human Eval

  • Direct Grading — score vs rubric
  • Red Teaming — attack to find failures
  • A/B Testing — compare live variants
  • Golden Dataset — define labels/rubric
  • Human-in-Loop — route ambiguous cases

12Human Eval Trade-offs

Disagreement signal: repeated grader disagreement → rubric is ambiguous.

+ High nuance/reliability   − Costly   − Doesn't scale to millions of outputs

13LLM-as-a-Judge

One LLM evaluates another's output — combines programmatic scale with human-like nuance.

Output → Judge LLM → Score + Reasoning

14Case: UPSC Auto-Grading

Target: answer-eval platform · Task: grade like human experts, cheaply, at scale

15Step 1 — Rubric

  • Discusses ethical governance & accountability
  • Explains the link
  • Gives mechanisms
  • Uses examples
  • Balanced conclusion

16Step 2 — Golden Dataset

SME scores 50–100 student answers with same rubric → becomes reference/golden labels.

17Step 3 — Judge Inputs

Question Max marks Rubric Student answer Scoring instructions

No credit for verbosity/keyword-stuffing; concise justification required.

18Step 4 — Human vs LLM

AnswerHumanLLM
A0011312
A00248
A00388

19MAE — Success Metric

(1/N) × Σ |Human − LLM|

MAE = 2.3 → judge off by ~2.3 marks avg. Goal: MAE → 0.

20Improve the Judge

Stronger judge LLM Better prompt Refine rubric Clearer instructions Calibration examples Analyze disagreements
Loop: evaluate → find gaps → improve → re-evaluate.

21Reference-Based vs Free

Test: reference/correct answer exists per case? Yes → based. No → free.
Reference-BasedGround truth per case; compare vs reference. e.g. Recall@K, UPSC scores
Reference-FreeNo per-case answer; judge vs rubric. e.g. Chatbot helpfulness

22Offline vs Online

OfflineBefore production, fixed dataset, controlled. "Does it work on our eval set?"
OnlineIn production, real traffic & feedback. "How's it doing live?"

23Pick the Method

Code can measure?Programmatic
Needs nuance?Human
Needs scale + nuance?LLM-as-Judge

24Mental Model

Pipeline = Target + Task + Criteria + Dataset + Method + Execution + Analysis

25Cheat Table

ProgrammaticCode executes eval
HumanHuman judgment executes
LLM-JudgeLLM scores output
Recall@KRelevant in Top-K ÷ Total
MAEAvg |Human − LLM| score
Ref-BasedGround truth exists
Ref-FreeJudge vs rubric only
OfflineFixed dataset, pre-prod
OnlineLive production signals