Design a restaurant recommendation system
UberMachine Learning Engineer · OnsiteLast updated
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.
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:
- Define the objective(s) and the offline/online success and guardrail metrics.
- Frame the problem as a multi-stage funnel: eligibility filtering, candidate generation (retrieval), ranking, and re-ranking.
- Candidate generation approaches (heuristics, collaborative filtering, two-tower/embedding retrieval, trending, sponsored) and how you merge multiple sources.
- Ranking model choices (GBDT vs deep vs multi-task) and what target(s) to predict.
- Feature design across user, restaurant, context/geo/time, and cross/interaction features, including real-time signals.
- Training data and labels, position bias, and feedback-loop mitigation.
- Cold start for new users and new restaurants, and exploration vs. exploitation.
- Re-ranking / post-processing: diversity, fairness/exposure, quality, and business rules (promotions, sponsored placements).
- Online serving architecture: latency budget, feature store, caching, freshness.
- Experimentation, monitoring, debugging, and failure modes, with mitigations.
- A reasonable MVP / phased rollout plan.
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.