Design a Restaurant Recommendation System for a Food-Ordering App
You are designing an end-to-end recommendation system that suggests restaurants to users in a food-ordering app. The system must support personalized ranking, real-time context, delivery constraints, and cold-start handling.
Constraints & Assumptions
-
The app has user interaction logs, restaurant metadata, menu data, location data, and delivery outcome data.
-
Recommendations should include only eligible restaurants, such as open restaurants within delivery range and capacity constraints.
-
The system should optimize business and user value while protecting delivery quality and marketplace fairness.
-
Explain both offline model quality and online product impact.
Clarifying Questions to Ask
-
What is the primary goal: order conversion, retention, revenue, exploration, or delivery reliability?
-
Which surface is being ranked: homepage, search, cuisine page, reorder module, or push notification?
-
What feedback signals are logged: impressions, clicks, add-to-cart, orders, ratings, cancellations, refunds?
-
Are there fairness or exposure constraints for new restaurants, small restaurants, or cuisine diversity?
What a Strong Answer Covers
-
Problem framing as candidate retrieval, ranking, and re-ranking under eligibility constraints.
-
Data and features: user history, restaurant metadata, menu text, cuisine, price, ratings, location, distance, delivery time, fees, promotions, time of day, and inventory/capacity.
-
Model choices such as collaborative filtering, matrix factorization, two-tower retrieval, gradient-boosted ranking, neural ranking, content-based methods, and contextual bandits for exploration.
-
Handling implicit feedback, exposure bias, position bias, and delayed labels.
-
Cold-start strategies for new users and restaurants using content features, popularity priors, onboarding preferences, exploration buckets, and uncertainty-aware ranking.
-
Offline evaluation with recall@K, NDCG, MAP, calibration, coverage, diversity, and counterfactual/off-policy caveats.
-
Online A/B metrics such as CTR, add-to-cart, orders, conversion, revenue, retention, delivery quality, cancellation, refunds, latency, and fairness guardrails.
Follow-up Questions
-
How would you prevent the system from only recommending already popular restaurants?
-
How would you handle restaurants that are temporarily overloaded?
-
What would you do if offline NDCG improves but online conversion falls?
-
How would you introduce exploration safely?