Code Room
System designHardsd-g335
Subject RecommendationLevel Senior–Staff~50 minCommon in ML systems interviewsIndustries Technology

Question

Design the full candidate-generation → re-ranking pipeline for a recommendation feed over a corpus of 1B items for 300M users, returning a feed of 50 items in under 150ms. You can't score 1B items per request, so describe the funnel: how each stage narrows the corpus, what model/index each stage uses, and how you keep the stages from fighting each other (e.g. the re-ranker can only re-rank what generation surfaced). Where does business logic / diversity / freshness get injected?

What a strong answer looks like

Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts — data model, bottlenecks, consistency, failure modes — and name the trade-offs you are making.

Narrate your design
Loading whiteboard…
Run or narrate your approach, then ask the coach.