Product Context
ShopLoop, a mobile commerce app, wants to launch a new personalized Home Feed that recommends products, collections, and promotions to returning and new users. The feed is the first screen after app open and is expected to drive product discovery, CTR, and downstream purchases.
Scale
| Signal | Value |
|---|
| DAU | 35M |
| Peak feed request QPS | 180K |
| Active product catalog | 120M items |
| New/updated items per day | 4M |
| Avg session length | 9 minutes |
| Feed requests per session | 6 |
| End-to-end p99 latency budget | 250ms |
Task
Design an end-to-end ML system for this new Home Feed feature. Your design should address:
- Requirements and success criteria: define the core user and business goals, plus functional and non-functional requirements.
- System sizing: estimate serving throughput, candidate set sizes, feature-store load, and training data volume.
- Architecture: propose a multi-stage system for candidate generation, ranking, and re-ranking, including what runs online vs batch.
- Modeling choices: select models for each stage and explain why they fit the latency, scale, and freshness constraints.
- Evaluation and launch: define offline metrics, online experiments, guardrails, and rollout strategy.
- Reliability and failure modes: discuss cold start, feature drift, training-serving skew, stale inventory, and monitoring.
Constraints
- Inventory and price change frequently; recommendations must avoid out-of-stock or stale-price items.
- 25% of daily users are low-history or anonymous users.
- The team has a moderate serving budget: heavy GPU inference is allowed only for a small re-ranking stage, not full-catalog scoring.
- User-level data must comply with privacy requirements; some features may only be retained for 30 days.
- The product team wants fresh trends and promotions reflected within 15 minutes, not just daily retrains.