Product Context
ShopNow is a large e-commerce marketplace with a personalized home feed and search result page. The team is debating whether to introduce a two-tower retrieval model or continue scaling a more traditional learning-to-rank stack built on hand-engineered candidate generation and a pointwise ranker.
Scale
| Signal | Value |
|---|
| DAU | 45M |
| Peak recommendation/search QPS | 180K |
| Active catalog | 120M SKUs |
| New or updated items/day | 4M |
| Candidates scored today | ~3K per request |
| End-to-end p99 latency budget | 150ms |
Task
Design the end-to-end recommendation/ranking system and explain when you would choose a two-tower model vs a traditional ranking approach for this product.
- Clarify the product objective and define success metrics for home feed and search-like surfaces.
- Propose a multi-stage architecture, including candidate generation, ranking, and optional re-ranking, and explain where a two-tower model fits.
- Compare at least two design options: (a) traditional retrieval + ranker and (b) learned two-tower retrieval + downstream ranker. State the tradeoffs in recall, latency, freshness, cost, and maintainability.
- Design the training and serving stack, including online vs batch features, feature store usage, index refresh, and fallback behavior.
- Define offline and online evaluation, including how you would detect if retrieval improves recall but hurts business metrics downstream.
- Identify key failure modes such as feature drift, training-serving skew, cold start, and stale embeddings, with mitigations.
Constraints
- New items must become eligible for recommendation within 10 minutes of catalog ingestion.
- 35% of traffic comes from anonymous or weak-history users.
- Serving cost must stay under $0.001 per request at peak.
- Some seller and pricing features are restricted and can only be used in aggregated form for compliance reasons.
- The system must support both personalized browsing and high-intent query sessions without maintaining separate infrastructure unless clearly justified.