KatInterview

End-to-End Design of a Food Delivery Recommendation Engine

Machine LearningModel answer
HardModel answerMachine Learningrecommendation systemstwo-tower modelcold start

Last updated

Design a personalized restaurant ranking system for a food-ordering app, covering retrieval, ranking, cold start, implicit feedback, and offline/online evaluation.

Scenario

You are a machine learning engineer at a large food-ordering platform. The product team wants to improve the home feed by surfacing restaurants each user is most likely to order from, rather than showing a generic popularity-sorted list.

Your Task

Walk through the full design of a restaurant recommendation system, from raw data to a served feed. Your answer should address:

  1. Problem framing — What is the right objective to optimize? How does it differ from a pure content-discovery product like a social feed?
  2. Data and features — What signals are available? How do you handle implicit feedback (impressions, clicks, orders) and noisy labels?
  3. Model architecture — Compare and contrast collaborative filtering, content-based approaches, and hybrid retrieval-plus-ranking funnels. Which would you recommend and why?
  4. Cold start — How do you handle a brand-new restaurant with no order history? A brand-new user with no activity?
  5. Offline evaluation — Which metrics matter, and what are the common mistakes when setting up the evaluation protocol?
  6. Online evaluation — How do you run an A/B test for this system? What guardrails would you put in place given the two-sided marketplace dynamic?

You are expected to discuss trade-offs, give rough numbers where relevant, and flag common failure modes at each stage.

Hints

Hint 1

The objective matters more than the model. A food app cares about completed orders and long-term retention, not raw clicks — start by anchoring every design decision to that north star, and explain why CTR alone is a misleading proxy.

Hint 2

A multi-stage funnel (eligibility filter → candidate retrieval → ranking → re-ranking) is standard here. For retrieval, think about why a two-tower model trained on in-radius negatives outperforms one trained on random global negatives — the hardness of the negative examples is critical.

Hint 3

Cold start has two distinct sub-problems that need different solutions: new restaurants benefit from content features and exploration budgets with a bandit policy, while new users benefit from context-only signals and rapid in-session adaptation via a sequence model over real-time clicks.