PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Machine Learning/Meta

Design a restaurant recommender under constraints

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a candidate's competency in designing scalable machine learning recommender systems, covering retrieval and ranking architectures, cold-start strategies, evaluation metrics and hygiene, and latency/freshness engineering.

  • hard
  • Meta
  • Machine Learning
  • Data Scientist

Design a restaurant recommender under constraints

Company: Meta

Role: Data Scientist

Category: Machine Learning

Difficulty: hard

Interview Round: Onsite

Build a restaurant recommendation system for a food delivery app. Constraints: return top-20 within 5 miles in <100 ms p99; most users have only implicit feedback (clicks, orders, dwell); strong cold-start for new restaurants. (a) Propose a two-stage architecture (candidate generation + ranking). Specify model families for each stage (e.g., matrix factorization or two-tower for retrieval; gradient-boosted trees or deep ranking for scoring), key features (user cuisine/price preferences, time-of-day, location distance, popularity priors, recency decay), and how to incorporate textual/menu embeddings. (b) Detail cold-start strategies for new restaurants and new users (content-based embeddings, hierarchical priors by cuisine/price/chain, exploration via contextual bandits or Thompson sampling) while controlling business constraints like diversity, fairness, and budget caps. (c) Describe offline metrics (NDCG@K, MAP@K, coverage, diversity) and online metrics (CTR, order conversion, AOV), and how you would calibrate scores and prevent leakage (e.g., using time-based splits and delayed labels). (d) Explain how you’d implement approximate nearest neighbor search for retrieval (index type, embedding dimension, refresh cadence), caching strategies by geo/time-of-day, and feature stores to meet latency and freshness requirements. (e) Provide a brief pseudocode sketch for re-ranking that enforces distance and diversity constraints while maximizing predicted utility.

Quick Answer: This question evaluates a candidate's competency in designing scalable machine learning recommender systems, covering retrieval and ranking architectures, cold-start strategies, evaluation metrics and hygiene, and latency/freshness engineering.

Related Interview Questions

  • Implement 1NN Embeddings and Forward Pass - Meta (hard)
  • Design and evaluate an ads ranking algorithm - Meta (easy)
  • How would you design a Shop Ads ranking algorithm? - Meta (easy)
  • Derive Linear Regression Solution - Meta (medium)
  • Explain key ML metrics and techniques - Meta (medium)
Meta logo
Meta
Oct 13, 2025, 9:49 PM
Data Scientist
Onsite
Machine Learning
1
0
Loading...

Design a Restaurant Recommendation System (Food Delivery App)

Context

  • Goal: Return the top-20 restaurant recommendations within 5 miles in under 100 ms p99 latency.
  • Data: Mostly implicit feedback (clicks, adds-to-cart, orders, dwell time).
  • Challenge: Strong cold-start pressure for new restaurants and many new users.

Tasks (a) Two-stage architecture

  • Propose a candidate generation (retrieval) + ranking setup.
  • Specify model families for each stage (e.g., matrix factorization or two-tower for retrieval; gradient-boosted trees or deep ranking for scoring).
  • List key features (e.g., user cuisine/price preferences, time-of-day, location distance, popularity priors, recency decay).
  • Explain how to incorporate textual/menu embeddings.

(b) Cold-start strategies

  • Detail approaches for new restaurants and new users (e.g., content-based embeddings, hierarchical priors by cuisine/price/chain, exploration via contextual bandits or Thompson sampling).
  • Explain how to control business constraints such as diversity, fairness, and budget caps during exploration.

(c) Metrics and evaluation hygiene

  • Describe offline metrics (e.g., Recall@K, NDCG@K, MAP@K, coverage, diversity) and online metrics (e.g., CTR, order conversion, AOV).
  • Explain score calibration and how to prevent leakage (e.g., time-based splits, point-in-time joins, delayed labels).

(d) Systems for latency and freshness

  • Explain approximate nearest neighbor (ANN) search for retrieval (index type, embedding dimension, refresh cadence).
  • Propose caching strategies by geo/time-of-day and a feature store plan to meet p99 <100 ms and freshness needs.

(e) Re-ranking with constraints

  • Provide brief pseudocode for a re-ranking step that enforces distance and diversity constraints while maximizing predicted utility.

Solution

Show

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More Machine Learning•More Meta•More Data Scientist•Meta Data Scientist•Meta Machine Learning•Data Scientist Machine Learning
PracHub

Master your tech interviews with 8,000+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.