ML System Design: Restaurant Recommendations (Delivery App)
You are designing a restaurant recommendation system for a food delivery marketplace (e.g., a home feed that ranks restaurants for a user).
Goal
Rank candidate restaurants for each user session to maximize long-term business and user value.
Requirements
-
Use cases
:
-
Home feed ranking (personalized).
-
Cold-start support for new users and new restaurants.
-
Constraints / realities
:
-
Users have location and delivery radius; restaurant availability changes (hours, busy/closed, delivery coverage).
-
Items/restaurants can be out of stock; ETA and fees matter.
-
Must handle
bias/fairness
concerns (e.g., exposure for new/small restaurants) and
fraud/quality
issues.
-
Outputs
:
-
A ranked list of restaurants with optional explanations (“Because you liked X”).
What to cover
-
Define
objective(s)
and offline/online
success metrics
.
-
Candidate generation vs. ranking (two-stage or multi-stage).
-
Feature design (user, restaurant, context, geography, time).
-
Model choices (e.g., retrieval model + ranking model) and why.
-
Training data, labels, and handling position bias.
-
Online serving architecture (latency budget, caching, feature store).
-
Exploration/exploitation, cold start, and business rules.
-
Experimentation (A/B testing), monitoring, and debugging.
-
Failure modes and how you would mitigate them.