Evaluation Methods

Which method fits which feature, how to choose a model, and how to build a pipeline you can trust.

Reference · Chapters 3–4

Method chooser

MethodNeeds reference?Use whenTrap
Functional correctnessNo (needs tests)Output can be executed or checked: code, SQL, game score, task completedHard to automate outside code-like tasks
Exact matchYesShort, unambiguous answers (math, trivia)The “contains” variant accepts wrong answers; fails on long or varied outputs
Lexical similarityYes, many referencesWording matters (BLEU, ROUGE, edit distance)Penalizes valid phrasings; BLEU barely separates correct from incorrect code
Semantic similarityYes, fewer referencesMeaning matters, many phrasings are validOnly as good as the embedding model; costs compute
AI as a judgeOptionalSubjective criteria; production without referencesInconsistency, non-standard criteria, cost and latency, biases
Comparative evaluationNoRanking models on subjective qualityNot for correctness questions; quadratic pairs; tells you which is better, not how good
PerplexityNoTraining signal, data contamination checks, abnormal-text detectionRises after post-training, so a weak proxy for chat models

Key numbers and definitions

AI-judge checklist

What to evaluate (Ch4)

Choosing a model

  1. Filter by hard attributes (licence, privacy, size, and latency if someone else hosts the model).
  2. Narrow with public benchmarks and leaderboards. They are a filter, not a verdict, and likely contaminated.
  3. Experiment with your own eval pipeline.
  4. Monitor in production. The process is iterative.

API vs. self-host: weigh privacy · lineage · performance · functionality · cost · control · on-device. Contamination checks: n-gram overlap (accurate, needs training data) or perplexity (cheap, needs only the model).

Pipeline checklist

← Lesson 3Lesson 4Book Map

Related ideas