Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Design Personalized Search Suggestions

HardSystem Design00:00
Practice interviewer
In session
5 left
00:00

Your question is Design Personalized Search Suggestions. Take a moment with it on the right.

Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).

You need to log in / sign up to chat or submit.

Problem

Product Context

ShopNow is a large e-commerce marketplace with an existing search product. The team wants to launch a new ML-powered feature that personalizes search suggestions and product recommendations shown on the home page and in the search bar, with the goal of improving product discovery and conversion for logged-in and anonymous users.

Scale

SignalValue
DAU45M
Peak QPS (suggestion + recommendation requests)180K
Active product catalog120M SKUs
New/updated items per day4M
Search sessions per day220M
Per-request latency budget (p99)120ms end-to-end

Task

Design the end-to-end ML system for this new feature. Address the following:

  1. Clarify the product objective, target users, and success metrics for personalized suggestions and recommendations.
  2. Propose a multi-stage architecture for candidate generation, ranking, and optional re-ranking, including how it integrates with the existing product.
  3. Define the training and data pipeline: data sources, labels, feature engineering, retraining cadence, and how to avoid training-serving skew.
  4. Design the online serving path, including online vs batch features, caching, fallbacks, and capacity planning at peak traffic.
  5. Explain how you would evaluate the system offline and online, including experimentation strategy and guardrail metrics.
  6. Identify key failure modes such as cold start, feature drift, stale inventory, and model degradation, and explain detection and mitigation.

Constraints

  • p99 latency must stay under 120ms without materially increasing search infrastructure cost.
  • Anonymous users account for 35% of traffic, so the system must work with limited history.
  • Inventory and price change frequently; stale recommendations are a bad user experience.
  • Some features (e.g. purchase labels) are delayed by hours to days, so the design must handle delayed feedback.
  • The feature must respect policy filters such as out-of-stock items, restricted products, and blocked sellers.