Start with evaluation basics
Work through classification metrics, then practice matching a metric to a task and its errors.
Start with: Machine Learning Crash Course
RedLectern topic
Task definitions · test design · metrics · uncertainty · error analysis · evaluation validity.
For: Everyone · builders · researchers.
After this page you can: Design an evaluation that measures a stated requirement.
Page reviewed
Part of: Artificial Intelligence
AI evaluation asks whether a system meets a stated requirement under specified conditions. Start by writing down the task, who or what will use the result, and what counts as success or failure. Then choose test examples that reflect those conditions, a scoring rule, and a reference point for comparison. A score is only useful when its test and scoring procedure match the question being asked. NIST’s measurement guidance emphasizes documented tests, measures of uncertainty, comparisons, and reporting.
Different metrics answer different questions. Accuracy counts correct classifications, while precision and recall focus on different kinds of positive-class errors; the right choice depends on the task and the cost of mistakes. A test can also miss its target: performance on a fixed collection does not by itself establish performance on related tasks or in a real setting. Learn to inspect individual failures, quantify uncertainty, and check whether the measure represents the requirement. For broader evaluation settings, continue to AI benchmarks and Evaluating AI systems.
Work through classification metrics, then practice matching a metric to a task and its errors.
Start with: Machine Learning Crash Course
Use documented test sets and metrics, and consider whether the test measures the intended concept.
Start with: Measure: NIST AI Risk Management Framework Playbook
Explore how statistical assumptions and test items affect conclusions from benchmark results.
Start with: Expanding the AI Evaluation Toolbox with Statistical Models
An evaluation measures behavior or performance against stated tasks and criteria. Define the task and scoring rule before comparing systems, since a metric’s usefulness depends on the task, the cost of different mistakes, and the balance of the data. A benchmark combines test data and a procedure for comparison; a baseline gives the result a reference point. For classification, accuracy counts all correct predictions, precision focuses on predicted positives, and recall focuses on actual positives. F1 combines precision and recall using their harmonic mean. Calibration compares predicted probabilities with observed outcomes. Perplexity expresses average next-token prediction uncertainty on text. These measures describe different properties and need not settle the same question.
Defines baseline as a reference model for comparing performance.
Shows how calibration curves compare predicted probabilities with observed positive frequencies.
Explains perplexity as the exponentiation of average cross-entropy per token.
Evaluation
Measuring behavior or performance against stated tasks and criteria.
Benchmark
A defined collection of tests and a procedure used to compare performance.
Baseline
A reference approach against which another approach is compared.
Accuracy
The proportion of predictions that are correct under a defined scoring rule.
Precision
The share of predicted positive cases that are actually positive.
Recall
The share of actual positive cases successfully identified.
F1 score
The harmonic mean of precision and recall.
Calibration
How well predicted probabilities match observed outcome frequencies.
Perplexity
A measure of how uncertain a model is about observed tokens.
A classifier flags messages for review. Missing a harmful message is more costly than sending a harmless one for review. Which metric should you examine closely, and what complementary metric would help describe the tradeoff?
Examine recall closely because it measures the share of actual positive cases found. Also report precision, which shows how many flagged messages are actually positive, so the extra review burden is visible.
A useful evaluation starts with an explicit requirement and the conditions where it matters. Translate the requirement into observable outcomes, specify which examples count, define how outputs will be scored, and record the tools and procedures used. Keep the test aligned with the intended context: a dataset that does not represent the people or situations of use can produce misleading assessments. Include examples that target known failure modes, and inspect results across relevant groups when appropriate. If you tune a system repeatedly against a test set, information about that set can leak into development and weaken its role as a final check. Separate development choices from final evaluation where possible, and document the limits of the test.
Explains how repeated tuning against a test set can leak information into model development.
Write one test case for the requirement “the system should identify duplicate support requests.” State what counts as a duplicate, what the system must output, and one case that could expose a weakness.
Example: Given two requests with the same issue described in different words, label them duplicate if they refer to the same underlying problem and were submitted by the same account within one day. The system should flag the pair. Include a near-match from different accounts as a check against over-flagging.
A measured score is an estimate tied to a particular test, procedure, and set of assumptions. Report uncertainty when the evaluation supports it, and be cautious with simple averages or error bars whose assumptions do not fit the data. Inspect examples behind aggregate results to find recurring failure patterns and cases where the scoring rule may miss the intended requirement. Validity asks whether the evidence supports the interpretation being made: a test can be repeatable yet measure the wrong thing, or perform well on its test while generalizing poorly beyond those conditions. Document test details, limitations, and the intended setting so readers can judge what the result does and does not establish.
Calls for uncertainty measures, comparison, and documented evaluation, with tests relevant to deployment conditions.
Describes construct validity and limits on generalizing beyond validation conditions.
An evaluation reports that a system correctly classifies most examples in a test set. Name one question about uncertainty and one question about validity that you would ask before generalizing the result.
Uncertainty: how much would the estimated score vary across comparable samples or repeated trials? Validity: do the test examples and scoring rule represent the requirement and the conditions where the system will be used?
No recent updates are available.
Gareth James, Daniela Witten, Trevor Hastie, and Robert Tibshirani · 2021
An approachable statistical learning text with practical methods for estimating predictive performance, including resampling. The authors offer a free PDF.
Trevor Hastie, Robert Tibshirani, and Jerome Friedman · 2009
A deeper statistical reference for model assessment, selection, inference, and averaging. The complete book is legally available from the authors’ site.