RedLectern topic

AI evaluation

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

About AI evaluation

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.

Start here

route

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

Learn the foundations

1.Choose measures that fit the taskAn evaluation measures behavior or performance against stated tasks and criteria.

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.

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.

Try it

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.

2.Turn a requirement into a testA useful evaluation starts with an explicit requirement and the conditions where it matters.

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.

Try it

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.

3.Check uncertainty, errors, and validityA measured score is an estimate tied to a particular test, procedure, and set of assumptions.

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.

Try it

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?

Explore subtopics

Latest

No recent updates are available.

See the sources list

Books

Glossary

9 terms on this page.

Browse the AI glossary

Questions and comments