Scenario
You are designing a DoorDash-like personalized restaurant recommendation system.
A user types a free-text query (e.g., “spicy ramen under $20”, “healthy vegetarian lunch”, “best burgers near me”). The system should return a ranked list of restaurants (optionally with dishes) personalized to the user.
What to design
-
End-to-end architecture
for query → ranked restaurants.
-
How you would incorporate
LLMs
into the system (where they help, where they shouldn’t be in the critical path).
-
Key
APIs / services
, main
data stores
, and
online vs offline
components.
-
Ranking approach
(candidate generation + re-ranking), personalization signals, and dealing with constraints (delivery radius, store hours, availability, price, dietary needs).
-
Latency & reliability
targets and strategies (caching, fallbacks, degradation).
-
Evaluation
: offline metrics, online A/B metrics, and guardrails.
Assumptions to clarify
-
You have restaurant metadata (location, cuisine, menu items, prices), user history, and real-time availability.
-
Traffic is large (e.g., millions of daily users). Typical p95 latency target for search/recs is ~200–500ms.