Design a video recommendation system
Company: Snapchat
Role: Machine Learning Engineer
Category: ML System Design
Difficulty: medium
Interview Round: Onsite
## Scenario
Design an end-to-end **video recommendation** system for a short-video or spotlight-style feed.
## Requirements
1. **Product goals**
- Personalized ranked feed for each user.
- Support both **"For You"** (personalized) and **"Following"** (simpler) feeds.
2. **Core interactions / signals**
- Impressions, clicks/plays, watch time, completion rate, likes, comments, shares, hides, follows.
3. **System constraints**
- Low latency for feed generation (e.g., p95 < 200 ms for ranking service; end-to-end may be higher with caching).
- Handle cold-start users and new videos.
- Avoid spam/low-quality content; respect safety/policy constraints.
4. **Scale (assume)**
- Tens of millions of DAU, millions of new videos/day, heavy read traffic.
## What to cover
- Candidate generation vs ranking vs re-ranking.
- Feature store and training data generation.
- Online serving architecture and caching.
- Evaluation: offline metrics, online A/B, guardrails.
- Feedback loops, bias, exploration, and debiasing.
Quick Answer: This question evaluates competency in building scalable, low-latency personalized recommendation systems, covering candidate generation and ranking, feature store and training-data design, online serving and caching, evaluation and A/B testing, and handling feedback loops, bias, cold-starts, and safety constraints.