When is top-k accuracy a more appropriate evaluation criterion than top-1 accuracy?

Quick Overview

Asks when top-k accuracy is a better evaluation metric than top-1 accuracy for a classifier. Tests whether a candidate can match the metric to how predictions are used in a product or pipeline, reason about ambiguous labels, and explain the metric's limits.

When is top-k accuracy a more appropriate evaluation criterion than top-1 accuracy?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

Top-1 accuracy counts a prediction as correct only when the highest-scored class is the true label. Top-k accuracy counts it as correct when the true label is anywhere among the k highest-scored classes. When is top-k accuracy a more appropriate evaluation criterion than top-1 accuracy? ```hint Look at what happens downstream Ask what the system does with the model's output: does it act on one prediction, or does it show or pass on several? ``` ### What a Strong Answer Covers - A precise definition of top-k accuracy and how it relates to top-1 - Product and pipeline settings where a short list is the real output - How label ambiguity, label noise and a large number of classes affect the choice - When top-1 remains the right metric - The limits of top-k: order within the list, the effect of k, and how to pick k ### Follow-up Questions - How would you choose k for a given product? - Top-k accuracy ignores where in the list the right answer appears. Which metrics would you use if the order matters? - How does top-k accuracy relate to recall@k in retrieval? - What is the top-k accuracy of random guessing with C classes, and why does it matter when you report the metric?

Overview: Asks when top-k accuracy is a better evaluation metric than top-1 accuracy for a classifier. Tests whether a candidate can match the metric to how predictions are used in a product or pipeline, reason about ambiguous labels, and explain the metric's limits.

General logo
General
Nov 25, 2026
easyMachine Learning EngineerOtherMachine Learning
0
0

Top-1 accuracy counts a prediction as correct only when the highest-scored class is the true label. Top-k accuracy counts it as correct when the true label is anywhere among the k highest-scored classes.

When is top-k accuracy a more appropriate evaluation criterion than top-1 accuracy?

What a Strong Answer Covers Guidance

  • A precise definition of top-k accuracy and how it relates to top-1
  • Product and pipeline settings where a short list is the real output
  • How label ambiguity, label noise and a large number of classes affect the choice
  • When top-1 remains the right metric
  • The limits of top-k: order within the list, the effect of k, and how to pick k

Follow-up Questions Guidance

  • How would you choose k for a given product?
  • Top-k accuracy ignores where in the list the right answer appears. Which metrics would you use if the order matters?
  • How does top-k accuracy relate to recall@k in retrieval?
  • What is the top-k accuracy of random guessing with C classes, and why does it matter when you report the metric?