Design The Discovery Feed Ranking For A Recommendation First Marketplace
Last updated: November 29, 2026
Quick Overview
Design the system that ranks the personalized product feed on the Pinduoduo home screen for hundreds of millions of users, from candidate retrieval through multi-objective ranking, with fresh signals from the current session.
Pinduoduo
November 29, 20260
0
0 solved
Design the system that ranks the personalized product feed on the Pinduoduo home screen for hundreds of millions of users, from candidate retrieval through multi-objective ranking, with fresh signals from the current session.
Pinduoduo is built around discovery rather than search: much of the traffic is an endless feed of recommended products, so recommendation quality drives GMV and ad revenue directly. The interviewer wants a staged funnel with latency budgets, a clear objective that balances clicks, orders and platform health, and a plan for cold-start items from new merchants and farms.
What the Interviewer Expects
- Lays out retrieval, pre-ranking, ranking and re-ranking stages with candidate counts and latency budgets
- Chooses multi-task objectives (click, add to cart, order, GMV) and explains how they combine
- Uses real-time session features through a streaming pipeline
- Addresses cold start and exploration for new items
- Defines offline metrics and online A/B metrics, including guardrails such as refunds and complaints
- Discusses position bias and feedback loops
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 do you blend ads into the organic feed without hurting long-term engagement?
- How would you prevent the feed from collapsing onto a few cheap viral items?
- Training data is two days stale after a pipeline failure. What degrades and how do you detect it?
- How would you serve a 1 GB embedding table across many ranking servers?
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
Return about 20 products per page, with infinite scroll, in under 150 ms server time. Optimize long-term value: orders and GMV without degrading satisfaction (refunds, low ratings, complaints). Catalo...
High-Level Design
Funnel: (1) Retrieval, 10k candidates from several sources in parallel: a two-tower embedding model with ANN search, item-to-item co-purchase from recent clicks, trending in the user's region, and a c...
Submit Your Answer
Pinduoduo Machine Learning Engineer Interview Guide
Interview process, tips, and preparation timeline