Interview Questions/System Design/Design a Recommendation Service
AdvancedSystem-Design
45 min

Design a Recommendation Service

MLRankingDataCaching
Advertisement
Interview Question

Design a recommendations system (e.g., “people you may know” or product recs) with offline training, nearline updates, and real-time ranking.

Key Points to Cover
  • Feature pipeline: batch (offline) and nearline (stream) updates
  • Candidate generation vs ranking stages; embeddings/ANN search
  • Personalization, exploration vs exploitation (bandits, epsilon-greedy)
  • Cold start strategies and diversity/novelty constraints
  • Feedback loops, counterfactual evaluation, A/B experimentation
  • Latency budgets; caching and precompute for top-K
Evaluation Rubric
Cohesive feature & model pipeline25% weight
Sound candidate + ranker design25% weight
Experimentation & feedback loops25% weight
Meets tight serving SLAs25% weight
Hints
  • 💡Approximate nearest neighbors keep latency low.
Potential Follow-up Questions
  • How do you prevent filter bubbles?
  • How do you fight rec spam?
Advertisement