When would you frame an application as a ranking task rather than a classification task?

Quick Overview

Asks when an ML application should be set up as a ranking problem and when as classification. Tests whether you can read the product decision, label type and need for calibration, and know how losses, metrics such as NDCG, and training data change under each framing.

When would you frame an application as a ranking task rather than a classification task?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

Many ML applications can be set up either as classification (predict a label or probability for each item) or as ranking (order a set of items). When would you frame an application as a ranking task instead of a classification task? ```hint Follow the output Look at what the product does with the model's scores once they are computed. ``` ```hint Check labels and calibration Consider what kind of labels you can collect and whether anything downstream needs the score to be an accurate probability. ``` ### What a Strong Answer Covers - The product and label signals that point toward a ranking framing. - The signals that point toward per-item classification instead. - What changes in the loss, the metrics and the training data when you choose ranking. - How the two framings combine in real systems. ### Follow-up Questions - An ad system sorts candidates by bid times predicted click-through rate. What does that imply about the scores the model must produce? - How would you correct for position bias when training a ranker from click logs? - When would you pick a pairwise loss over a listwise one? - Offline NDCG@10 improves but online click-through rate does not move. What would you check?

Overview: Asks when an ML application should be set up as a ranking problem and when as classification. Tests whether you can read the product decision, label type and need for calibration, and know how losses, metrics such as NDCG, and training data change under each framing.

PracHub logo
General
Nov 25, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

Many ML applications can be set up either as classification (predict a label or probability for each item) or as ranking (order a set of items). When would you frame an application as a ranking task instead of a classification task?

What a Strong Answer Covers Guidance

  • The product and label signals that point toward a ranking framing.
  • The signals that point toward per-item classification instead.
  • What changes in the loss, the metrics and the training data when you choose ranking.
  • How the two framings combine in real systems.

Follow-up Questions Guidance

  • An ad system sorts candidates by bid times predicted click-through rate. What does that imply about the scores the model must produce?
  • How would you correct for position bias when training a ranker from click logs?
  • When would you pick a pairwise loss over a listwise one?
  • Offline NDCG@10 improves but online click-through rate does not move. What would you check?