Design a Short-Video Recommendation System
MetaMachine Learning Engineer · Technical ScreenLast updated
This question tests your ability to design a multi-stage recommendation pipeline for a high-traffic short-video platform, focusing on candidate retrieval, ranking models, and system scalability.
Problem Statement
You are tasked with designing the backend recommendation engine for a new short-video platform similar to Instagram Reels or TikTok. The system needs to serve personalized content to millions of daily active users with sub-100ms latency.
Functional Requirements
- Provide a personalized feed of videos to users.
- Support real-time feedback loops (likes, watch time, skips).
- Handle both "hot" viral content and niche interest-based discovery.
Non-Functional Requirements
- Extremely low latency (e.g., <100ms for retrieval and ranking).
- High throughput: millions of requests per second.
- Scalability: System must handle both new creators (cold start) and viral spikes.
Design Deliverables
- High-level architecture: Describe the stages of the recommendation funnel (Candidate Generation, Ranking, Re-ranking).
- Model Selection: What models would you use for each stage and why?
- Data Strategy: How do you handle user/video features and real-time streaming data?
- Trade-offs: Address the exploration-exploitation dilemma and latency versus accuracy.
- Evaluation: How do you measure the success of the system both offline and online?
Hints
Hint 1
Consider a funnel approach: start with a large candidate pool and apply increasingly sophisticated models to smaller subsets.
Hint 2
Think about how to balance 'exploit' (what the user likes) with 'explore' (what the user might discover) to prevent filter bubbles.
Hint 3
Address the cold-start problem for new videos: how can you gather signals without relying solely on historical engagement?
Follow-up questions
- How would you modify your ranking architecture to incorporate cross-modal signals, such as audio content or video frames?
- If a specific creator suddenly goes viral, how does your system ensure the database and cache layers remain performant?
- What specific metrics would you monitor to detect if the recommendation quality is degrading over time due to model drift?
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.