AI Glossary / Causal inference and experimentation / Beginner
Metric
Definition
A metric is a defined quantitative measure used to describe or compare some property of an AI system, dataset, process, or outcome. Examples include prediction error, recall, response time, and task-completion rate. A useful metric has an explicit calculation, population, unit, and interpretation. In this evaluation context, metric means a measurement of interest; it need not satisfy the mathematical distance rules associated with a metric space.
What it means
A statement such as “the model is better” becomes more informative when it specifies better in what respect. A metric makes one aspect measurable, allowing progress and trade-offs to be discussed with evidence.
However, a metric is a representation of a goal rather than the goal itself. Accuracy may describe correct classifications, while a service cares about the consequences of different mistakes. Response time may matter, but a fast incorrect answer is not necessarily useful. Choosing a metric therefore requires deciding what the number captures, what it omits, and how it relates to the decision that will use it.
How it works
Start with a concrete evaluation question. Define the events or examples to count, the reference or outcome against which to compare them, and the formula. Specify units, direction of improvement, aggregation, and handling of missing or undefined cases.
Measure on data or observations appropriate to the claim. Compare a baseline under the same conditions and inspect variation across important subsets. When sampling is involved, consider uncertainty rather than interpreting every small numerical change as meaningful.
A metric becomes an optimization objective when a system is explicitly trained or selected to improve it. Other metrics may remain diagnostic or serve as constraints. Keeping those roles clear helps explain why improving one number may worsen another.
Three practical examples
1. Classification quality: a support-routing team measures recall for each request category to see which kinds of messages are being missed.
2. Service operation: an AI application tracks response-time percentiles to understand delays experienced by users, alongside measures of answer quality.
3. Forecast performance: planners report mean absolute error in units of demand while separately examining overprediction, underprediction, and costly large misses.
Think of it this way
Think of a dashboard with fuel level, speed, and engine temperature. Each gauge answers a different question, and no single reading fully describes whether a journey is going well. The analogy is limited because AI metrics may depend on uncertain labels, sampled users, or chosen thresholds. A precise-looking number can still measure the wrong thing or reflect a biased sample.
Worked example
Consider 100 messages, of which ten genuinely require urgent handling. System A labels all messages non-urgent. It is correct on 90 messages, so accuracy is 90%, but it detects none of the ten urgent messages: urgent-class recall is 0%.
System B detects eight urgent messages and incorrectly flags five non-urgent messages. It has eight true positives, two false negatives, five false positives, and 85 true negatives. Accuracy is (8 + 85)/100 = 93%, precision is 8/13, approximately 61.5%, and recall is 8/10 = 80%.
These metrics describe different aspects of the same predictions. They do not decide whether five unnecessary urgent flags are acceptable. That requires a stated operational objective and the costs of missed or unnecessary interventions.
Illustrative case study
Fictional case: Cedar Answers evaluates a new assistant using the percentage of conversations that end quickly. The number improves, but reviewers find that some users stop because the assistant does not solve their problem. Short conversations therefore mix efficient resolution with abandonment.
The team clarifies its desired outcome and adds task-resolution judgments and follow-up evidence. It keeps conversation length as a diagnostic measure rather than treating it as direct proof of success. The revised report explains the relationship between each number and the product decision. This fictional example illustrates measurement design, not a claim that any particular metric should always be avoided.
Common misconceptions and mistakes
Do not assume every metric should increase. Error and delay usually improve when they decrease, while other scores have different ranges or preferred values.
Do not compare results with different denominators, thresholds, data populations, or averaging rules as if they were identical measurements. A changed metric definition can create apparent progress without a changed system.
Avoid interpreting a small average improvement as improvement for every group or case. Also distinguish a measured correlation with success from proof that directly optimizing the metric will produce the intended success.
Business use
Metrics give business teams a shared basis for evaluating progress, investigating failures, and deciding whether a change meets its purpose. They work best when tied to a clear decision and supported by examples that make the numbers understandable.
Choose a manageable set covering the main objective, important constraints, and diagnostic questions. Document ownership and definitions so different teams calculate the same thing. Revisit whether the measurement still represents the application when users, data, or workflows change. A reliable dashboard needs stable definitions and relevant evidence, not simply more decimal places or a larger collection of scores.
People also ask
Is a metric the same as a loss function?
A loss can be a metric used to evaluate prediction error, and it may be optimized during training. Many metrics, such as response time, are not that training loss.
Can one metric be enough?
Sometimes for a narrow comparison, but broader decisions often involve several properties and trade-offs that one number cannot express adequately.
Does metric always mean a distance?
No. In model evaluation it commonly means a quantitative measure. Mathematical metric spaces use a more specific distance-based definition.
Check your understanding
A report says error fell from ten to eight, but the first value is a total over 100 examples and the second over 50. Can the numbers be compared directly?
Answer: No. The differing sample counts change the meaning of the totals. A consistent aggregation and comparable evaluation population are needed before concluding that quality improved.
Related terms
- Evaluation
- Objective
- Loss function
- Accuracy
- Precision
- Recall
- Proxy metric
- Baseline
- Metric space
- key performance indicator
Learn next
Pick one AI task and write a complete metric definition: what is counted, the denominator, the unit, direction of improvement, and evaluation population. Describe a way the metric could improve while the user's outcome worsens. Add a complementary check that would reveal that failure.
More in Causal inference and experimentation
- Longitudinal targeted maximum likelihood estimation - Longitudinal targeted maximum likelihood estimation, or LTMLE, is a framework for estimating specified causal quantities from data containing treatment...
- Max error - Max error is the largest absolute difference between a prediction and its observed target in an evaluated dataset.
- METEOR - METEOR is an automatic text-evaluation metric developed for machine translation.
- Minimax loss - Minimax loss, in the supplied glossary's generative-adversarial-network context, is the original GAN objective that a generator tries to minimize while a...
- Mixed Precision - Mixed precision is the use of more than one numerical precision within a computation.
- Mixture experiment - A mixture experiment studies how the proportions of components in a blend affect a measured response.
Sources
Primary references: Google Machine Learning Glossary, metric, https://developers.google.com/machine-learning/glossary#metric ; scikit-learn, Metrics and scoring, https://scikit-learn.org/stable/modules/model_evaluation.html . The evaluation meaning and relationship between scoring and the intended prediction task were consulted. This entry explicitly distinguishes evaluation metrics from mathematical distance metrics. The confusion-count calculation and fictional service example are original illustrations.
Previous: Metonymy Next: Metric Learning