ml system design
eBay
Amazon
Etsy

eBay ML System Design: Post-Checkout Recommendations

Topics:
Recommender Systems
Click Prediction
Conversion Prediction
Roles:
Machine Learning Engineer
Data Scientist
Recommender Systems Engineer
Experience:
Mid Level
Senior
Staff

Question Description

You are asked to design a post-checkout recommendation system for an e-commerce platform (eBay) that must surface exactly six product recommendations immediately after a user completes checkout. The primary goal is to maximize revenue: a recommendation only pays when a user clicks and purchases the recommended item, so you must optimize for both click-through and conversion rates while meeting strict latency and scale requirements.

Start by describing a two-stage architecture: a fast candidate retrieval stage (ANN, category filters, popularity & recency heuristics) that reduces millions of items to a few hundred candidates, followed by a latency-aware ranking model that scores and returns exactly six items. Explain feature engineering choices: user embeddings from purchase history, item embeddings (ID embeddings + TF-IDF for titles/descriptions), contextual features (time of day, device), price and margin features, and user-item interaction features (recent co-purchases, time-decayed counts). Discuss handling high-cardinality categorical features and sparse vectors to remain cost-effective (hashing, compressed embeddings, quantization).

Cover model training and labels: label clicks and purchases separately (multi-task or cascade), use pairwise or listwise ranking loss, and evaluate offline with NDCG/AUC and online with CTR, conversion rate, and revenue-per-session via A/B tests. Address low-latency serving (100 ms budget) with precomputed embeddings, feature store lookups, efficient ANN indexes, caching, and fallback rules. Finally, explain data ingestion (transaction logs, catalog updates, user profiles), labeling pipelines, retraining cadence, observability (metrics, drift detection), and how your design supports maintainability and incremental updates.

Common Follow-up Questions

  • How would you design an online experiment (A/B test) to measure the revenue uplift from the post-checkout recommendations, and what metrics and guardrails would you include?
  • How do you handle cold-start users and new products in both candidate retrieval and ranking while still returning six items within a 100 ms budget?
  • Explain how you would architect and tune the ANN index for low-latency retrieval at peak scale, including index type, sharding, and consistency considerations.
  • If offline metrics (NDCG/AUC) disagree with online results (CTR/conversion), what debugging steps and data checks would you run to reconcile them?
  • Describe trade-offs between a single multi-task ranking model (predict click and purchase) versus a cascade of click model then conversion model, and how that affects serving latency and maintainability.

Related Questions

1Design a scalable candidate retrieval system for product recommendations using ANN and filtering
2How to build a CTR model for product recommendations and evaluate it offline and online
3Design a personalization engine for cross-sell and up-sell recommendations after checkout
4How to handle feature engineering and storage for high-cardinality item and user features in a recommender system
5Approaches to balance exploration and exploitation (multi-armed bandits) in e-commerce recommendations

Explore More Questions

Practice This Question with AI

Get real-time hints, detailed requirements, and insightful analysis of the question.

Post-Checkout Recommendation System - eBay ML Design | Voker