Design Product Search Ranking for Douyin E-Commerce
Last updated: November 29, 2026
Quick Overview
Design the search ranking system that orders products when a user types a query in Douyin's shopping search, balancing relevance, purchase likelihood, and merchant fairness.
ByteDance
November 29, 20260
0
0 solved
Design the search ranking system that orders products when a user types a query in Douyin's shopping search, balancing relevance, purchase likelihood, and merchant fairness.
Douyin's e-commerce business (the Chinese counterpart of TikTok Shop) sells through live streams, short videos, and search. This ML system design question checks whether you can combine query understanding, relevance, and conversion modeling, and whether you understand marketplace effects such as merchant concentration and price-sensitive users.
What the Interviewer Expects
- Cover query understanding: segmentation, intent, category prediction, and rewriting
- Separate relevance from conversion and explain how they combine
- Design multi-stage retrieval and ranking with latency budgets
- Choose labels and handle position bias in purchase data
- Address marketplace constraints and evaluation with online metrics like GMV per search
Key Topics to Cover
How to Approach This
- Start by mapping the business objective to a concrete ML objective and metric.
- Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
- Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
- Address the serving latency budget and whether batch or real-time inference is needed.
- Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
- How would you rank a product being sold right now in a live stream?
- How do you protect new merchants from never getting impressions?
- How would you handle a query with very few relevant products?
- What offline metric would you trust most?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice ML System Design ProblemsSample Answer
Requirements
- Hundreds of millions of products, mostly Chinese-language titles with noisy attributes.
- p99 latency under 300 ms for the first page.
- Primary metric GMV per search session; guardrails on relevanc...
High-Level Design
Query understanding produces segmented terms, a predicted category distribution, attribute slots (brand, color, size), and rewrites or synonyms. Retrieval runs in parallel: an inverted index with BM25...
Submit Your Answer
ByteDance Machine Learning Engineer Interview Guide
Interview process, tips, and preparation timeline