Design a restaurant recommendation system
Company: Uber
Role: Machine Learning Engineer
Category: ML System Design
Difficulty: medium
Interview Round: Onsite
##### Question
Design a **restaurant recommendation system** for a food delivery marketplace such as Uber Eats. When a user opens the home page, the system should rank restaurants (and optionally dishes) that the user is most likely to order. Personalize results using factors such as past orders, cuisine preferences, time of day, delivery address, restaurant availability, estimated delivery time (ETA), fees, and live marketplace conditions.
**Goal:** Rank candidate restaurants for each user session to maximize long-term business and user value, while respecting marketplace realities.
**Requirements / realities**
- **Use cases:** personalized home-feed ranking; cold-start support for new users and new restaurants.
- **Constraints:** users have a location and delivery radius; restaurant availability changes (hours, busy/closed, delivery coverage); items can be out of stock; ETA and fees matter; surge / courier supply affects feasibility.
- **Cross-cutting concerns:** bias/fairness (e.g., exposure for new or small restaurants), fraud/quality, and feedback loops.
- **Output:** a ranked list of restaurants (and optionally dishes), with optional explanations ("Because you liked X").
Walk through the following:
1. Define the **objective(s)** and the offline/online **success and guardrail metrics**.
2. Frame the problem as a **multi-stage funnel**: eligibility filtering, candidate generation (retrieval), ranking, and re-ranking.
3. **Candidate generation** approaches (heuristics, collaborative filtering, two-tower/embedding retrieval, trending, sponsored) and how you merge multiple sources.
4. **Ranking** model choices (GBDT vs deep vs multi-task) and what target(s) to predict.
5. **Feature design** across user, restaurant, context/geo/time, and cross/interaction features, including real-time signals.
6. **Training data and labels**, position bias, and feedback-loop mitigation.
7. **Cold start** for new users and new restaurants, and **exploration vs. exploitation**.
8. **Re-ranking / post-processing**: diversity, fairness/exposure, quality, and business rules (promotions, sponsored placements).
9. **Online serving architecture**: latency budget, feature store, caching, freshness.
10. **Experimentation, monitoring, debugging, and failure modes**, with mitigations.
11. A reasonable **MVP / phased rollout** plan.
Quick Answer: An Uber MLE onsite ML system design question: design a personalized restaurant recommendation system for a food delivery marketplace's home feed. It tests candidate generation and ranking, feature engineering and training data, cold-start and exploration, low-latency serving, and offline/online evaluation, plus marketplace concerns like availability, ETA, diversity, fairness, and business rules.