In this article
  1. Before you start
  2. Why interviewers ask this
  3. Metric limitations from first principles
  4. Worked example
  5. The Staff-level answer
  6. The rubric
  7. Three variants of this question
  8. Common mistakes
  9. Follow-up questions
  10. Sources

Before you start

This page is one question inside the machine learning (ML) system design interview guide. "These metrics" here means the usual set for a classifier: accuracy, precision, recall, the F1 score and the precision-recall and receiver operating characteristic (ROC) curves.

Why interviewers ask this

In a system design round the metric is the first decision, because every later choice (data, loss, threshold, monitoring) is tuned to it. Interviewers ask about its limits to see whether a candidate treats a metric as a fact about the model or as a statement about a decision.

A weak answer lists the formulas and says "accuracy is bad when classes are imbalanced." A strong answer shows three separate ways a number misleads, with arithmetic. A Staff-level answer connects the choice to the decision: the scikit-learn guidance is to start from the ultimate goal of the prediction and to use the scoring function you are given, for example in a business context, when there is one. The same reasoning runs through designs such as real-time fraud detection and ML for healthcare, where the two kinds of error cost very different amounts.

Metric limitations from first principles

Operating point
An operating point is the specific threshold a deployed classifier uses, together with the precision and recall it produces there. Two models with the same curves can run at different operating points, and users only ever experience the operating point, not the curve.

In plain words

Imagine a smoke alarm. "It is right 99% of days" sounds excellent. But an alarm that never rings is right on almost every day, because there is almost never a fire. The number is true and still useless. It does not describe what you care about: does it ring when there is a fire, and how often does it ring for nothing?

The analogy breaks in one place. A smoke alarm has one sensitivity dial, while a model has a score for every example and you choose where to cut. Put precisely: every metric below is a function of a model's scores, a threshold and a labeled dataset. Each one throws part of that information away.

Precision is the number of true positives over the number of true positives plus false positives; recall is the number of true positives over true positives plus false negatives. Accuracy is the share of all predictions that are correct.

Step 1: Every metric describes one threshold on one dataset

A metric is a snapshot: the same model gives different numbers at different thresholds and on different data. The precision-recall curve shows the trade-off between precision and recall for different thresholds, so a single precision figure is meaningless until you say where the cut was made.

The default cut is a convention. scikit-learn predicts the positive class when the probability is greater than 0.5, a rule its documentation calls "most certainly not ideal for most use cases"; its insurance example reaches a cost-driven threshold of about 0.02. Curves are no escape either: the same page shows a default and a tuned classifier that share the same ROC and precision-recall curves because they share scores, even though their predicted labels differ. Curves ignore the operating point.

You now know the root limit: a number needs its threshold and its data. Next, the first way a number misleads.

Step 2: Accuracy hides class imbalance

Take 10,000 examples in which 1% are positive (illustrative). A model that always predicts negative scores 99% accuracy and zero recall: it is right on 9,900 cases and misses all 100 positives.1 On the page that defines it, precision-recall is described as useful when the classes are very imbalanced for exactly this reason.

The effect appears on any task where the case you care about is rare: fraud, disease, abuse. scikit-learn notes that accuracy is the default score for classifiers, which is why it is so often reported without a second thought.

The fix is not a cleverer single number. Report recall for the rare class next to precision, and look per class, because a macro or weighted average across classes can also hide one class that fails completely.

You now know accuracy can look excellent with a useless model. Next: why precision falls even when the model is good.

Step 3: Precision falls with the base rate

Precision depends on how rare positives are, not only on how good the model is. At 1% prevalence, 90% recall and a 5% false-positive rate give a precision of about 15%: of 10,000 examples the model catches 90 of the 100 positives but also raises 495 false alarms.1 Moving the same model to a population with 10% positives lifts precision to about 67%, with nothing changed in the model.1

At a fixed recall and false-positive rate, precision follows the formula below, so it falls as the base rate falls. Here R is the recall, F is the false-positive rate and π is the base rate.

precision=RπRπ+F(1−π)

Two consequences follow. First, a result measured on a balanced test set does not carry over to production. Second, when positives drift in frequency, a metric can fall without the model getting worse. For a detector in production, such as harmful-content detection or an anomaly-detection system, you therefore estimate the base rate first and compute the expected number of false alarms per day, which is the number the operations team feels.

Step 4: Averages like F1 hide which side is weak and assume equal costs

The F1 score collapses precision and recall into one number. Take the scikit-learn toy case of four labels where the model gets precision 1.0 and recall 0.5 (model evaluation documentation). Its F1 is 0.67, a respectable-looking figure that does not reveal that half the positives were missed.1 Weighting changes the picture: on the same predictions the F-measure that favors precision (F0.5) is 0.83, and the one that favors recall (F2) is 0.56.1

The deeper limit is cost. F1 weights a false alarm and a miss equally. The scikit-learn tumor-detection example argues the opposite: the cost of a missed cancer is much higher than the cost of further diagnostic tests, so physicians prioritize recall and accept more false positives. If the two errors have different prices, choose the metric and the threshold from those prices.

Step 5: Offline metrics are proxies for the online outcome

A held-out metric is a proxy for the outcome the business cares about, so it can improve while that outcome does not. The held-out set is a frozen sample of past data. Once the model is live, its actions change the data it later sees (a feedback loop), labels can arrive weeks late (label delay), and the population drifts (distribution shift). Each of these makes the offline number a stale or biased estimate.

The check is an online experiment, an A/B test, that compares the new model with the current one on the business metric. The scikit-learn guidance is to start from the ultimate goal of the prediction, and that goal is measured online. An offline metric is only a proxy, and an online experiment checks it: use the offline number to screen candidates and the experiment to decide.

Each common metric hides a different failureFlow of five limits: every metric depends on one threshold and dataset, accuracy hides class imbalance, precision falls with the base rate, F1 hides the weak side and assumes equal costs, and an offline metric is only a proxy for the online outcome.One threshold, onedataseta metric is a snapshotClass imbalanceaccuracy hides zero recallBase raterare positives lowerprecisionAverages and costsF1 hides the weak sideOffline vs onlinea held-out metric is aproxyDiagram: Interview Clozo, CC BY 4.0 ·interview.clozo.ai/blog/are-there-some-limitations-to-these-metrics.html

Each common metric hides a different failure, so name the failure before you trust the number.CC BY 4.0 — source: Are there some limitations to these metrics?
Step-by-step description
  1. A metric is a snapshot at one cut-off.
  2. Accuracy can hit 99% with zero recall.
  3. Rare positives lower precision.
  4. F1 assumes equal error costs.
  5. An online test checks the proxy.
  • A model that always predicts negative scores 99% accuracy and zero recall when 1% of examples are positive.
  • At 1% prevalence, 90% recall and a 5% false-positive rate give a precision of about 15%.
  • F1 averages precision and recall and assumes their errors cost the same.
  • An offline metric is only a proxy, and an online experiment checks it.

Knowing it is half the job. Saying it is the other half.

Interview Clozo is an AI interview copilot for real interview rounds: it hears the question and puts a strong answer on your screen, and you say it in your own words. See the features or how it works.

Start Free Trial →

Worked example

Twenty examples show the effect of the threshold. Six are positive with scores 0.95, 0.85, 0.70, 0.45, 0.32 and 0.12; fourteen are negative, the highest scoring 0.60, 0.40 and 0.35 and the other eleven 0.25 or less, one of them 0.11 (illustrative scores). A score counts as positive only when it is above the threshold.1

At a threshold of 0.5, the model flags four examples, three of them truly positive: precision is 0.75, recall is 0.5 and accuracy is 0.8. At 0.3 it flags eight, five of them positive: precision is 0.63, recall is 0.83 and accuracy is still 0.8.1 Accuracy is 0.8 at both 0.5 and 0.3, while recall rises from 0.5 to 0.83. At 0.1 it flags fourteen, catching all six positives: recall is 1.0, precision falls to 0.43 and accuracy drops to 0.6.1

Accuracy was identical at the first two cut-offs, yet recall differed by a third, and the best F1 sat at the middle threshold, not at the default.
ThresholdPrecisionRecallAccuracyF1
0.5 (the default)0.750.50.80.6
0.30.6250.83330.80.7143
0.10.42861.00.60.6
Always predict negative (baseline)undefined0.00.70.0

The always-negative baseline already reaches an accuracy of 0.7 here, so accuracy of 0.8 is only a small gain over doing nothing.1 With a missed positive ten times as costly as a false alarm (illustrative), 0.1 is the cheapest of the three (cost 8 against 13 and 31); with equal costs, 0.5 and 0.3 tie at four errors each, which is what equal accuracy means.1 The metric does not choose; the cost does.

Lowering the threshold trades precision for recallGrouped bars for illustrative scores of twenty examples at thresholds 0.5, 0.3 and 0.1: recall rises from 0.5 to 1.0, precision falls from 0.75 to 0.43, and accuracy is 0.8, 0.8 and 0.6.Metric value00.510.50.30.1ThresholdPrecisionRecallAccuracy0.750.630.430.50.8310.80.80.6Diagram: Interview Clozo, CC BY 4.0 ·interview.clozo.ai/blog/are-there-some-limitations-to-these-metrics.html
Moving the threshold trades precision for recall, and accuracy stayed flat between the first two cut-offs while recall jumped.CC BY 4.0 — source: Are there some limitations to these metrics?
Text description of the diagram
  • Accuracy is 0.8 at both 0.5 and 0.3, while recall rises from 0.5 to 0.83.
  • At a threshold of 0.1 recall is 1.0, precision falls to 0.43 and accuracy drops to 0.6.

The Staff-level answer

Interviewer asks

Are there some limitations to these metrics?

A strong answer

Yes, and I would name three. First, each number describes one threshold on one dataset: accuracy can be high while recall is zero when positives are rare, and 0.5 is a default, not an optimum. Second, precision depends on the base rate, so a good detector can still be wrong most of the time it fires if positives are rare. Third, F1 averages precision and recall and assumes their errors cost the same, which is rarely true. So I would set the threshold from the cost of each error on a held-out set, report precision and recall at that operating point with confidence intervals, and tie the model to the business outcome it is meant to move.

What makes it Staff-level: the answer ends on the decision (threshold from costs, validated on held-out data, tied to the business outcome) instead of a list of formulas. It follows the scikit-learn warning against tuning the threshold on the same data used to train the classifier, because of the risk of overfitting.

The rubric

A strong answer shows the failure with arithmetic, and a Staff answer turns the failure into a decision and a monitoring plan.
DimensionWeak answerStrong answerStaff answer
Correctness"Accuracy is bad."Accuracy hides zero recall under imbalance, with an example.Adds base rate and threshold as separate limits, each with a number.
DepthLists formulasExplains why precision falls at a low base rate.Notes curves ignore the operating point; the precision-recall (PR) curve shifts with prevalence, the ROC curve does not.
Trade-offsNonePrecision against recall as the threshold moves.Chooses the threshold from error costs, on held-out data.
CommunicationJargon, no orderNames three limits in order.One-sentence structure, then the decision it implies.
Follow-up readinessStuck on "so what?"Can name a replacement metric.Links the metric to the business outcome and its monitoring.

Three variants of this question

Why is accuracy a bad metric for imbalanced data?

Because a model that always predicts the majority class scores high accuracy and zero recall; with 1% positives it reaches 99% accuracy while missing every positive.1 Use recall and precision for the rare class instead.

Is a higher AUC always a better model?

No. The area under the curve (AUC) summarizes the ranking of scores across all thresholds, so two classifiers with the same scores have the same curves even when their thresholded labels differ (scikit-learn). It says nothing about the operating point you will actually deploy. The ROC curve is built from the true-positive and false-positive rates, which are each measured within one class, so it does not change with the base rate and can look strong while precision at the operating point is poor. With rare positives, the precision-recall (PR) curve is the better view; scikit-learn describes it as useful when the classes are very imbalanced.

Is F1 enough to choose a model?

Only if a miss and a false alarm cost the same and you also look at precision and recall separately. F1 can read 0.67 for a model with perfect precision and recall of 0.5.1

Common mistakes

  • "The model is 99% accurate, so it works." (wrong) With rare positives that can mean zero recall. (right) "Accuracy is 99% but recall on the positive class is the number I care about."
  • "I will use 0.5 as the threshold." (wrong) It is a convention. (right) "I will tune the threshold on held-out data from the cost of each error."
  • "Precision was 70% in testing, so it will be 70% live." (wrong) Precision moves with the base rate. (right) "I will recompute precision at the production base rate."
  • "I will report F1." (wrong) It hides which side is weak and assumes equal costs. (right) "I report precision and recall at the operating point, and F1 only as a summary."

Follow-up questions

How do you pick the threshold?

Estimate the cost of a false positive and a false negative, sweep thresholds on held-out data and choose the one with the lowest expected cost. scikit-learn warns against tuning it on the training data because of overfitting.

What do you report instead of one number?

Precision and recall at the chosen operating point, per class, with the base rate and a confidence interval. A precision-recall curve is a useful supporting view when classes are imbalanced.

What if the held-out metric improves but the business metric does not?

The metric was a proxy. Check whether the held-out data matches production traffic, whether the threshold changed behavior, and whether the business outcome responds to the predicted action at all. The scikit-learn guidance is to begin from the application's goal.

Do the same limits apply to ranking metrics?

The same questions apply: what cut-off, what data and what cost does the number assume. Precision@k and normalized discounted cumulative gain (NDCG) depend on the cut-off k and on the relevance labels, and they ignore everything ranked below k. A funnel such as retrieval, ranking and re-ranking needs a metric per stage, and no single score covers all of them.

Key takeaways
  • Every metric is a function of scores, a threshold and a dataset; state all three.
  • Accuracy can be high with zero recall when positives are rare.
  • Precision falls when the base rate falls, with the model unchanged.
  • F1 assumes a miss and a false alarm cost the same; choose the threshold from real costs.
  • An offline metric is a proxy; confirm it with an online experiment.
  • End the answer on the decision and the business outcome, not the formulas.

Sources

  1. Precision-Recall (scikit-learn 1.9.1 documentation) — scikit-learn (documentation, accessed 2026-10-26), 26 Oct 2026
  2. 3.3 Tuning the decision threshold for class prediction (scikit-learn 1.9.1) — scikit-learn (documentation, accessed 2026-10-26), 26 Oct 2026
  3. 3.4 Metrics and scoring (scikit-learn 1.9.1) — scikit-learn (documentation, accessed 2026-10-26), 26 Oct 2026