Design Diversity and Freshness Re-Ranking for the Google Discover Feed

Last updated: November 29, 2026

Quick Overview

The Discover feed ranker scores each card independently, and the result often shows five cards on the same topic or stale content. Design a re-ranking layer that produces a diverse, fresh, still relevant final feed.

Google
ML System Design
Machine Learning Engineer
Google
November 29, 2026
Machine Learning Engineer
Onsite
ML System Design
Medium

0

0

0 solved


The Discover feed ranker scores each card independently, and the result often shows five cards on the same topic or stale content. Design a re-ranking layer that produces a diverse, fresh, still relevant final feed.

Discover teams care about whole-feed quality rather than item scores, so this question isolates the slate-level layer after the main ranker. Interviewers check that you can formalize diversity, choose an algorithm that fits latency, and evaluate slate quality properly.

What the Interviewer Expects
  • Explain why pointwise ranking produces redundant slates
  • Formalize relevance versus redundancy with a clear objective
  • Pick an algorithm such as MMR or DPP and discuss its cost
  • Handle freshness with decay or quotas
  • Evaluate with slate-level and long-term metrics
Key Topics to Cover
Slate optimization
Maximal marginal relevance
Determinantal point processes
Freshness decay
Slate evaluation
How to Approach This
  1. Start by mapping the business objective to a concrete ML objective and metric.
  2. Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
  3. Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
  4. Address the serving latency budget and whether batch or real-time inference is needed.
  5. Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
  • How do you tune the diversity weight per user?
  • When does a determinantal point process beat MMR in practice?
  • How would you learn the re-ranker end to end instead of hand rules?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice ML System Design Problems
Sample Answer
Requirements

Input: top 200 cards with relevance scores rir_i and embeddings eie_i, publish times and source IDs. Output: an ordered feed of 30 cards. Constraints: under 20 ms added latency, at most 2 cards from o...

High-Level Design
  1. Score adjustment: apply freshness ri′=ri⋅exp⁡(−λtopic⋅agei)r_i' = r_i \cdot \exp(-\lambda_{topic} \cdot age_i), with faster decay for news than for evergreen interests like recipes.
  2. Greedy slate builder: pick ...

Submit Your Answer
Markdown supported