Design a Restaurant Recommendation System for Food Apps

Quick Overview

Meta machine learning system-design prompt on restaurant recommendations for food apps, covering retrieval and ranking models, features, cold start, implicit feedback, offline metrics, A/B testing, and marketplace guardrails.

Design a Restaurant Recommendation System for Food Apps

Company: Meta

Role: Data Scientist

Category: Machine Learning

Difficulty: hard

Interview Round: Onsite

##### Scenario Building a restaurant recommendation feature for a food-ordering app. ##### Question Describe end-to-end how you would design a restaurant recommendation system. Which machine-learning models are suitable, and how would you handle cold-start restaurants or users? How would you evaluate the quality of your recommendations both offline and online? ##### Hints Cover data requirements, collaborative filtering vs. content-based models, implicit feedback, A/B testing metrics like CTR and conversion.

Quick Answer: Meta machine learning system-design prompt on restaurant recommendations for food apps, covering retrieval and ranking models, features, cold start, implicit feedback, offline metrics, A/B testing, and marketplace guardrails.

|Home/Machine Learning/Meta
Meta logo
Meta
Jul 12, 2025, 6:59 PM
hardData ScientistOnsiteMachine Learning
34
0

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 Guidance

  • 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 Guidance

  • 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 Guidance

  • 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?
Loading comments...