Recommend a Home Feed for Users Arriving From Paid Ads
Last updated: November 29, 2026
Quick Overview
Design the recommendation system for the app home feed when most new users arrive from a social or search ad with no purchase history, so the first session must convert and later sessions must keep users returning.
Temu
November 29, 20260
0
0 solved
Design the recommendation system for the app home feed when most new users arrive from a social or search ad with no purchase history, so the first session must convert and later sessions must keep users returning.
Temu grew with very large paid acquisition, so a big share of sessions start cold, often from an ad featuring a specific product. The interviewer checks that you use every early signal (ad creative, landing item, locale, device), design a multi-stage retrieval and ranking stack, and choose objectives beyond click-through.
What the Interviewer Expects
- Use the ad and landing context as the first cold-start signal
- Design candidate generation, ranking and re-ranking stages
- Pick multi-task objectives (click, add to cart, purchase, return risk)
- Update the user representation within the session in real time
- Plan exploration, diversity and business constraints
- Define offline and online evaluation
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 avoid the feed collapsing into the single category of the ad the user clicked?
- How would you incorporate post-purchase signals like returns or bad reviews into ranking?
- How do you measure whether the feed adds value beyond the ad itself?
- What latency budget would you give each stage?
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
Serve a scrollable feed of items within about 150 ms at p99 for tens of millions of daily users. Optimize long-term value: purchases and repeat visits, not just clicks, while limiting returns and low-...
High-Level Design
Context features at session start: ad campaign and creative id, the landing item, query (for search ads), country, language, device price tier, time of day. Retrieval (about 1,000 candidates): item-to...