Why is precision@k not monotonic as k increases?

Quick Overview

Explain why precision@k can go up or down as the ranking cutoff k grows. Tests understanding of ranking metrics, how precision@k differs from recall@k, and how the choice of k affects comparisons between retrieval or recommendation models.

Why is precision@k not monotonic as k increases?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

Why is `precision@k` not monotonic as `k` increases? Explain what happens to the value when the cutoff moves from k to k+1. ```hint Write out the ratio Write precision@k as a fraction and compare what changes in the numerator and in the denominator when k grows by one. ``` ### What a Strong Answer Covers - The definition of precision@k as a ratio, and how its numerator and denominator change from k to k+1 - When the value rises, falls or stays the same, shown on a small ranking - The contrast with recall@k and why that metric cannot decrease as k grows - Practical effects on comparing models and on queries that have fewer than k relevant items ### Follow-up Questions - How does average precision use the P@k values, and why does it only take them at relevant positions? - What is R-precision, and which problem with precision@k does it address? - Why are precision-recall curves usually interpolated, and what does interpolation hide? - If two models swap order between P@5 and P@20, how would you decide which one to ship?

Overview: Explain why precision@k can go up or down as the ranking cutoff k grows. Tests understanding of ranking metrics, how precision@k differs from recall@k, and how the choice of k affects comparisons between retrieval or recommendation models.

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

Why is precision@k not monotonic as k increases? Explain what happens to the value when the cutoff moves from k to k+1.

What a Strong Answer Covers Guidance

  • The definition of precision@k as a ratio, and how its numerator and denominator change from k to k+1
  • When the value rises, falls or stays the same, shown on a small ranking
  • The contrast with recall@k and why that metric cannot decrease as k grows
  • Practical effects on comparing models and on queries that have fewer than k relevant items

Follow-up Questions Guidance

  • How does average precision use the P@k values, and why does it only take them at relevant positions?
  • What is R-precision, and which problem with precision@k does it address?
  • Why are precision-recall curves usually interpolated, and what does interpolation hide?
  • If two models swap order between P@5 and P@20, how would you decide which one to ship?