NDCG Versus Recall at K for Evaluating a Feed Ranker
Last updated: November 29, 2026
Quick Overview
You are comparing two Facebook Feed ranking models offline using logged engagement labels. Explain when you would use NDCG at K versus recall at K, and compute NDCG for a small ranked list.
Meta
November 29, 20260
0
0 solved
You are comparing two Facebook Feed ranking models offline using logged engagement labels. Explain when you would use NDCG at K versus recall at K, and compute NDCG for a small ranked list.
Ranking metrics come up early in Meta ML screens because Feed, Reels and Search are ranking problems. The interviewer checks that you know what each metric rewards, can compute NDCG by hand, and pick the right one for the stage of the system.
What the Interviewer Expects
- Define recall at K and NDCG at K precisely
- Explain position discount and graded relevance in NDCG
- Map recall to retrieval and NDCG to final ranking
- Compute NDCG for a short example correctly
- Note limits of offline ranking metrics on logged data
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 define graded relevance from likes, comments and shares?
- Why might NDCG improve offline but engagement not improve online?
- What is the difference between NDCG and MRR?
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
I would confirm whether we evaluate a candidate retrieval stage or the final ranker, how many items a user sees in a session (the natural K), and whether labels are binary (clicked) or graded (like be...
Approach
Recall at K is the fraction of all relevant items that appear in the top K; it ignores order inside the top K. That fits retrieval, where the job is to get good candidates into a pool of a few hundred...