Design a restaurant recommendation system
Company: Uber
Role: Machine Learning Engineer
Category: ML System Design
Difficulty: medium
Interview Round: Onsite
## ML System Design: Restaurant Recommendations (Delivery App)
You are designing a **restaurant recommendation system** for a food delivery marketplace (e.g., a home feed that ranks restaurants for a user).
### Goal
Rank candidate restaurants for each user session to maximize long-term business and user value.
### Requirements
- **Use cases**:
- Home feed ranking (personalized).
- Cold-start support for new users and new restaurants.
- **Constraints / realities**:
- Users have location and delivery radius; restaurant availability changes (hours, busy/closed, delivery coverage).
- Items/restaurants can be out of stock; ETA and fees matter.
- Must handle **bias/fairness** concerns (e.g., exposure for new/small restaurants) and **fraud/quality** issues.
- **Outputs**:
- A ranked list of restaurants with optional explanations (“Because you liked X”).
### What to cover
1. Define **objective(s)** and offline/online **success metrics**.
2. Candidate generation vs. ranking (two-stage or multi-stage).
3. Feature design (user, restaurant, context, geography, time).
4. Model choices (e.g., retrieval model + ranking model) and why.
5. Training data, labels, and handling position bias.
6. Online serving architecture (latency budget, caching, feature store).
7. Exploration/exploitation, cold start, and business rules.
8. Experimentation (A/B testing), monitoring, and debugging.
9. Failure modes and how you would mitigate them.
Quick Answer: This question evaluates competency in ML system design for recommendation systems, covering ranking and candidate generation, feature engineering, model selection, evaluation metrics, and operational concerns like serving latency, caching, fairness, and exploration/exploitation.