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
| Signal | Value |
|---|
| DAU | 45M |
| Peak QPS (suggestion + recommendation requests) | 180K |
| Active product catalog | 120M SKUs |
| New/updated items per day | 4M |
| Search sessions per day | 220M |
| Per-request latency budget (p99) | 120ms end-to-end |
Task
Design the end-to-end ML system for this new feature. Address the following:
- Clarify the product objective, target users, and success metrics for personalized suggestions and recommendations.
- Propose a multi-stage architecture for candidate generation, ranking, and optional re-ranking, including how it integrates with the existing product.
- Define the training and data pipeline: data sources, labels, feature engineering, retraining cadence, and how to avoid training-serving skew.
- Design the online serving path, including online vs batch features, caching, fallbacks, and capacity planning at peak traffic.
- Explain how you would evaluate the system offline and online, including experimentation strategy and guardrail metrics.
- 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.