Choose Between NDCG and MRR for Evaluating Google Search Results
Last updated: November 29, 2026
Quick Overview
Given graded human relevance ratings for the top results of Google Search queries, decide whether NDCG@k or MRR is the better offline metric, compute both on an example, and explain when each one misleads.
0
0
0 solved
Given graded human relevance ratings for the top results of Google Search queries, decide whether NDCG@k or MRR is the better offline metric, compute both on an example, and explain when each one misleads.
Search quality teams at Google score ranking changes offline with graded rater labels before any live experiment. The interviewer checks that you understand what each metric rewards, can compute them by hand, and can tie the choice to query intent (navigational versus informational).
What the Interviewer Expects
- Defines DCG, NDCG@k and MRR precisely, including the ideal-ranking normalization
- Computes both metrics correctly on a small example
- Links MRR to navigational queries with one right answer and NDCG to informational queries with many useful results
- Explains why graded gains matter and how the gain function changes emphasis
- Mentions query-level averaging, ties, and queries with no relevant results
Key Topics to Cover
How to Approach This
- Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
- Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
- Feature engineering is often more impactful than model selection.
- Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
- Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
- How would you weight queries so head queries do not dominate the average?
- What changes if raters use a 5-point scale instead of binary labels?
- How would you measure whether an NDCG gain is statistically significant?
- Why might NDCG improve while user satisfaction does not?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Explore ML Interview PrepSample Answer
Clarify
Ask what the labels look like (binary or graded, which positions are rated), how many results are shown (top 10 on desktop, fewer above the fold on mobile), and what mix of query intents the eval set ...
Approach
MRR looks only at the rank of the first relevant result: . It is a good fit for navigational queries such as "gmail login", where one result s...