Skip to content
SeeItFlow
System Design · Interview Guide · ~30 min read

Recommendation System — Interview Perspective

How to carry this design into an actual interview — what to clarify up front, which numbers matter, how to structure the conversation, and a comprehensive question bank across scope, estimation, event pipeline, profiles, candidate generation, ranking, feature store, cold start, caching, real-time updates, feedback/exploration, model and index rollout, pagination, reliability, quality failures, and Netflix/YouTube/Amazon/Instagram-style prompt variants.

Mangesh MandlikLast updated:
Before You Start

Requirements to Clarify

Spend the first few minutes narrowing scope out loud — it signals judgment, and it prevents you from designing the wrong system.

Ask: Which surface is this for — home feed, next-item, related products, search-adjacent? Is a personalized system the goal, or is a trending/popularity baseline an acceptable starting point? How many candidate sources are expected — is embedding/ANN retrieval in scope, or is one retrieval technique enough for this conversation? Is a feature store and its online/offline split in scope, or just "some database"? Does the design need to cover safe model/index rollout and experimentation, or only the request path? Is multi-region serving in scope? What's the target latency and scale?

Estimation

Scale Estimates Worth Having Ready

You don't need precise numbers — you need the formulas and the ratio that drives the architecture.

Be ready to reason through: recommendation QPS = DAU × requests/user/day ÷ 86,400 × peak factor; ranking scores/sec = request QPS × candidates scored/request; event ingest/sec = DAU × events/user/day ÷ 86,400 × burst factor; feature reads/sec ≈ ranking QPS × feature bundles/request, served as batched multi-gets; retrieval fan-out = recommendation QPS × candidate sources/request; impression volume = recommendation responses × items exposed/response. State any specific number as an illustrative assumption you're choosing, not a memorized fact — and be ready to note that impression volume is usually far larger than click/action volume, since most exposures are never acted on at all.

Framing

Candidate Generation vs. Ranking

Present these as two distinct stages from the start — it's the cleanest way to organize the whole design.

Candidate generation: cheap, broad, multi-source, approximate — narrows an enormous catalog down to a bounded, plausible set. Ranking: expensive, narrow, precise, feature-rich — spends real scoring effort only on that bounded set, possibly in more than one stage. Naming this split explicitly early gives you a structure to hang every later decision on: retrieval sources and their contracts, eligibility filtering, feature hydration, multi-stage ranking, post-ranking and exploration.

Pitfalls

Common Mistakes

Patterns that read as template application rather than reasoning from requirements — and a few correctness gaps that are easy to miss under interview time pressure.

Jumping straight to a full production diagram instead of evolving from trending. Saying "just rank everything" without a bounded candidate funnel, or implying one ranking model searches the entire catalog directly. Treating a click as unambiguous positive feedback without impression/exposure context to show what else was — or wasn't — shown. Calling the feature store a single universal "source of truth" instead of naming its three separate concerns: definitions, offline data, online data. Skipping point-in-time correctness when discussing how training data gets built. Assuming a cached or precomputed list can skip the final eligibility recheck. Presenting exploration and diversity as only a product concern rather than a deliberate architecture decision. Deploying a new model straight to full traffic without a shadow or canary stage. Assuming a multi-region deployment automatically means safe regional failover, without ownership and fencing. Naming a specific real-world company's internal algorithm or infrastructure as fact rather than an illustrative, "-like" adaptation.

Question Bank 01

Scope & Estimation Questions

Questions that test whether you scope the problem correctly before designing anything.

Q

How would you scope this problem in the first five minutes?

Strong answer angle

Strong answer direction: confirm the surface, confirm whether personalization or a trending baseline is the immediate goal, clarify how many candidate sources and whether embedding/ANN retrieval are expected, and explicitly set model-training internals, specific ANN libraries, and named third-party systems as out of scope. What interviewer tests: whether you can bound an intentionally huge problem instead of trying to design everything. Read deeper: Scope.

Q

Walk me through your capacity estimate and how it shapes the architecture.

Strong answer angle

Strong answer direction: state the formulas — recommendation QPS, ranking scores/sec, event ingest/sec, feature reads/sec, retrieval fan-out, impression volume — rather than memorized figures, and use the fact that impression volume usually dwarfs click volume to justify why exposure logging is its own subsystem. What interviewer tests: whether your numbers actually inform your design choices. Read deeper: Capacity Estimation.

Q

Why can't ranking just score the entire catalog directly?

Strong answer angle

Strong answer direction: at any real catalog size, scoring every item with an expensive model on every request cannot fit a request-time latency budget — candidate generation exists specifically to shrink the search space first, cheaply, before ranking spends its budget on a bounded set. What interviewer tests: whether you understand candidate generation and ranking as genuinely distinct stages, not a formality. Read deeper: Candidate Generation.

Question Bank 02

Event Pipeline & Impression Logging Questions

Questions probing whether feedback is actually interpretable, not just collected.

Q

Why do you need an impression/exposure log at all — isn't logging clicks enough?

Strong answer angle

Strong answer direction: a click alone can't distinguish 'the user saw this and ignored it' from 'the user never had a chance to see this.' Logging generated, returned, rendered/exposed, and consumed states separately is what makes later analysis and exploration trustworthy. What interviewer tests: whether you understand selection bias as a first-class correctness concern, not an analytics nice-to-have. Read deeper: Impression & Exposure Logging.

Likely follow-ups
  • What if the client never reports a rendered impression for an item the server returned? — Treat 'returned' as lower-confidence than 'rendered' until the client confirms it or a timeout passes — see Missing Impression Events.
Q

How do you handle events that arrive late or out of order?

Strong answer angle

Strong answer direction: key aggregation on event-time, not processing-time; define an explicit grace window for late arrivals; and don't assume an event collector's sequence IDs establish any order beyond a narrow per-connection or per-session scope. What interviewer tests: whether you conflate 'when the pipeline saw it' with 'when it happened.' Read deeper: Event-Time vs. Processing-Time.

Q

How do you make event consumers safe against duplicate delivery?

Strong answer angle

Strong answer direction: every event carries a stable ID, and every consumer (profile builder, popularity aggregator) is idempotent by construction, keying off that ID rather than trusting exactly-once delivery from the transport. What interviewer tests: whether your replay/recovery story is actually safe to use, not just theoretically available. Read deeper: Event Replay & Idempotency.

Question Bank 03

User Profile Questions

Questions about what belongs in a profile, and what doesn't.

Q

What actually goes into a user profile, and what doesn't?

Strong answer angle

Strong answer direction: a durable long-term profile (interests, category affinity), a bounded recent-history window (not the full lifetime log), a short-lived session overlay, and policy/eligibility context — but not every ranking feature; context and item features are fetched separately at request time. What interviewer tests: whether you'll let the profile object grow unboundedly instead of keeping it a fast, predictable lookup. Read deeper: Profile State Model.

Q

Why not just fetch the full profile object for every ranking feature you might need?

Strong answer angle

Strong answer direction: a profile record that keeps absorbing every feature anyone might someday want stops being a fast, predictable lookup and starts becoming a second, poorly-versioned feature store — broader feature needs go through explicit, batched Feature Store reads instead. What interviewer tests: whether you can draw a clean boundary between profile state and feature-store state. Read deeper: Full Profile vs Targeted Feature Fetching.

Question Bank 04

Candidate Generation Questions

Questions about how retrieval actually works underneath the word "candidate generation."

Q

Walk me through what happens when a recommendation request hits candidate generation.

Strong answer angle

Strong answer direction: the request fans out in parallel to several sources, each honoring a shared contract (input, index version, timeout, quota, provenance); results are merged, deduplicated, and eligibility-filtered before handoff to ranking — no single source's raw score is trusted at face value against another source's. What interviewer tests: whether you can describe the mechanics, not just the word 'retrieval.' Read deeper: Candidate Source Contract and Candidate Merge & Deduplication.

Q

How does embedding/ANN retrieval fit into this, and is it the whole retrieval system?

Strong answer angle

Strong answer direction: it's one candidate source among several — embeddings are built or refreshed periodically, an approximate nearest-neighbor index is published from them, and at request time a query embedding retrieves nearest candidate IDs that flow into the same merge step as every other source. A new item has no embedding until the next index build, which is why cold-start-item handling exists separately. What interviewer tests: whether you'll overstate what one retrieval technique can do on its own. Read deeper: Embedding / ANN Retrieval.

Likely follow-ups
  • Exact or approximate nearest-neighbor search? — Approximate once catalog size makes exact search latency-prohibitive — see Exact vs Approximate Vector Retrieval.
Q

Why run multiple candidate sources instead of just the best one?

Strong answer angle

Strong answer direction: no single retrieval technique covers cold-start users, cold-start items, and steady-state relevance equally well; independent sources also give a natural fallback when one degrades or times out. What interviewer tests: whether you see multi-source retrieval as a resilience decision, not just a relevance one. Read deeper: Single-Source vs Multi-Source Retrieval.

Question Bank 05

Ranking Questions

Questions about how a bounded candidate set becomes a final ordered list.

Q

Why split ranking into a pre-ranker and a main ranker instead of one model?

Strong answer angle

Strong answer direction: once candidate volume is large enough that the expensive main model's cost becomes the binding latency constraint, a cheaper pre-ranker trims the set first so the main model only spends its budget on already-promising candidates. At smaller scale, single-stage ranking is a perfectly reasonable starting point. What interviewer tests: whether you add complexity because it solves a real budget problem, not preemptively. Read deeper: Multi-Stage Ranking.

Q

Are the ranking scores probabilities of a user liking the item?

Strong answer angle

Strong answer direction: no — they're relative signals useful for ordering candidates within one request, not calibrated probabilities, and comparing raw scores across requests or model versions isn't meaningful without explicit calibration work. What interviewer tests: whether you'll overclaim what a ranking score actually means. Read deeper: Post-Ranking & Re-ranking.

Q

What happens if the ranking model and the feature schema get out of sync?

Strong answer angle

Strong answer direction: the model, the feature schema, and the candidate index all version independently, and the serving path checks compatibility before trusting a response — on a mismatch, fall back to a known-compatible combination rather than scoring with mismatched assumptions, since a mismatch can still return 200 while quietly degrading quality. What interviewer tests: whether you've thought about version drift as a real production failure mode. Read deeper: Ranking Model & Index Version Compatibility.

Question Bank 06

Feature Store Questions

Questions that test whether "feature store" means something specific to you, not just a buzzword.

Q

Is the feature store a single source of truth?

Strong answer angle

Strong answer direction: better framed as three related concerns — feature definitions/metadata (the semantic contract), offline feature data (training/backfill), and online feature data (low-latency serving) — that share a contract rather than one monolithic store. This reduces, but does not fully eliminate, train/serve skew. What interviewer tests: whether you understand the feature store as an architectural contract rather than a single component. Read deeper: Feature Online/Offline Consistency.

Q

What is point-in-time correctness, and why does it matter?

Strong answer angle

Strong answer direction: a training example for time T is only valid if every feature it uses was actually available at or before T — joining current feature values against historical labels instead leaks future information into training, which often makes offline metrics look better while live performance quietly underperforms. What interviewer tests: whether you can name a real training-data-correctness failure mode, not just 'skew' vaguely. Read deeper: Feature Point-in-Time Correctness.

Question Bank 07

Cold Start Questions

Questions about missing history — on both sides of the marketplace.

Q

How do you handle a brand-new user with no history?

Strong answer angle

Strong answer direction: shift the candidate-source mix toward popularity retrieval, content/metadata-based retrieval, and any onboarding signals, rather than sources that need interaction history — ranking still runs, just with weaker personalized features. What interviewer tests: whether cold start is a first-class branch of the same pipeline, not a bolted-on exception. Read deeper: Cold Start: New Users.

Q

What about a brand-new item nobody has interacted with yet?

Strong answer angle

Strong answer direction: metadata/content-based retrieval and reserved exploration slots give it a path into candidate pools before it accumulates interaction history or embedding-index presence; without a deliberate mechanism, popularity- and interaction-based sources will structurally never surface it. What interviewer tests: whether you remember item-side cold start, which is easy to forget after covering new users. Read deeper: Cold Start: New Items.

Question Bank 08

Caching Questions

Questions about what's safe to reuse, and what a cache must never bypass.

Q

What do you cache, and what must a cache never bypass?

Strong answer angle

Strong answer direction: cache whole responses for hot, reusable combinations plus feature/item-metadata lookups, with TTLs scoped by user/surface/locale — but a cached response still has to pass the final eligibility recheck (availability, policy, privacy) before shipping, since caches and the indexes behind them can go stale. What interviewer tests: whether you'll let caching quietly become a correctness shortcut. Read deeper: Recommendation Cache.

Q

How do you avoid a cache stampede on a hot recommendation key?

Strong answer angle

Strong answer direction: request coalescing so only one request recomputes while others wait, plus soft TTLs with background refresh, applied by design rather than as a reactive fix after an incident. What interviewer tests: whether you've thought about the failure mode before being asked about it directly. Read deeper: Recommendation Cache Stampede.

Question Bank 09

Real-Time Updates Questions

Questions about session responsiveness versus durable state.

Q

How does the system react to a user's actions within the same session?

Strong answer angle

Strong answer direction: a real-time signal processor captures fresh events into a short-lived session overlay, which the serving path merges with the durable profile at request time — bounded in influence and lifetime so one accidental click can't rewrite long-term preferences. What interviewer tests: whether the fast path complements the durable profile instead of replacing it. Read deeper: Real-Time Session Overlay.

Q

Why not just run everything in real time?

Strong answer angle

Strong answer direction: most durable-profile fields don't need per-event freshness, and continuous streaming infrastructure for all of them costs far more than reserving it for the narrow session-overlay case that genuinely needs it. What interviewer tests: whether you can justify a freshness decision by cost and benefit, not just by what sounds more impressive. Read deeper: Precompute vs Real-Time.

Question Bank 10

Feedback Loop & Exploration Questions

Questions about bias, echo chambers, and why the fix is architectural, not just a product tweak.

Q

How do you prevent the system from spiraling into an echo chamber?

Strong answer angle

Strong answer direction: reserve a bounded, measured slice of exposure for exploration, cap category/creator concentration in post-ranking, and track coverage metrics — treated as a deliberate architecture decision with a measurable near-term relevance cost, not just a warning to keep in mind. What interviewer tests: whether you can name concrete mechanisms instead of saying 'add some diversity.' Read deeper: Exploration vs. Exploitation.

Q

Why does exploration depend on impression logging to work at all?

Strong answer angle

Strong answer direction: without knowing what the system chose to expose, it can't tell whether an item's low engagement means genuine disinterest or simply a lack of exposure — impression logging and exploration are two halves of the same selection-bias problem. What interviewer tests: whether you connect these two concepts instead of treating them as unrelated bullet points. Read deeper: Impression & Exposure Logging.

Question Bank 11

Model & Index Rollout, Experimentation Questions

Questions about changing a live system without silently breaking it.

Q

How would you safely roll out a new ranking model?

Strong answer angle

Strong answer direction: train/build, offline validation, register with an explicit version, shadow against live traffic without affecting the response, canary/A-B on a small real-traffic slice, then expand — with a rollback path retained at every stage, since offline metrics don't always predict live behavior. What interviewer tests: whether you have a concrete lifecycle, not just 'deploy the new model.' Read deeper: Model Deployment & Rollout.

Q

How do you safely refresh a candidate index without breaking live traffic?

Strong answer angle

Strong answer direction: build the new version alongside the old one, validate it against size/coverage/quality checks, switch reads over with a single atomic pointer update, and retain the old version briefly for instant rollback — never mutate a live index in place. What interviewer tests: whether you recognize a bad index publication as a full-catalog-quality incident. Read deeper: Candidate Index Publication.

Q

How do you know an A/B test result is actually trustworthy?

Strong answer angle

Strong answer direction: assignment must be a deterministic, sticky function of stable identifiers so the same user stays in the same variant, and the variant must propagate into the impression log on every logged event — otherwise treatment and control data mix silently, or outcomes can't be attributed at all. What interviewer tests: whether you see experiment infrastructure as part of the architecture, not just a data-science afterthought. Read deeper: Experiment Assignment & Logging.

Question Bank 12

Pagination & Session Consistency Questions

A question that surprises candidates who haven't thought past the first page of results.

Q

Why might a user see the same recommended item twice across two pages of a feed?

Strong answer angle

Strong answer direction: each page can trigger an independent candidate-generation-and-ranking cycle, and if anything upstream shifted between requests (a cache refresh, an index update), the same item can resurface or reorder. A pagination cursor that pins the candidate or seen-item set for the session's life prevents it. What interviewer tests: whether you've considered multi-page consistency at all, since most candidates only design for a single response. Read deeper: Recommendation Pagination & Session Consistency.

Question Bank 13

Reliability & Degradation Questions

Questions about what the system does when a dependency is unhealthy.

Q

The Ranking Service is overloaded — what happens?

Strong answer angle

Strong answer direction: shed load by reducing candidate count or switching to a cheaper fallback model/pre-ranker, and scale the fleet horizontally — the cause could be feature-hydration latency, model-server saturation, GC pauses, or candidate-count growth, so detection needs to distinguish which. What interviewer tests: whether your degraded mode preserves a useful response instead of timing out the page. Read deeper: Ranking Service Latency.

Q

The Feature Store is degraded — what's the safe behavior?

Strong answer angle

Strong answer direction: distinguish unavailable, stale, partially missing, and version-mismatched — the response differs for each, and a stale snapshot is not automatically safe if the affected features are eligibility- or privacy-related, since those still need a current-state recheck regardless of feature-store health. What interviewer tests: whether you'll wave away 'feature store is down' as one failure mode instead of several with different risk profiles. Read deeper: Feature Store Failure.

Question Bank 14

Silent Quality Failure Questions

The questions that separate candidates who've only thought about uptime from candidates who've thought about correctness.

Q

How would quality regress without any service returning an error?

Strong answer angle

Strong answer direction: a bad model rollout, a version mismatch, a candidate source silently dominating the pool, or a stale index can all degrade relevance while every service keeps returning 200 — which is exactly why recommendation-quality observability (engagement relative to impressions, exposure concentration, new-item coverage, experiment health) has to exist as its own monitoring category, separate from system-health metrics. What interviewer tests: whether you understand that 'everything is green' is not sufficient evidence the product is working well. Read deeper: Quality Regression With No Errors.

Q

Give me a realistic way a stale index or cache leaks something it shouldn't.

Strong answer angle

Strong answer direction: a deleted item or an out-of-stock product can remain in a candidate index or cache after the catalog changes; if the mandatory post-filter eligibility recheck is skipped, or itself reads stale data, the item reaches the response. Availability and existence are hard eligibility constraints, not ranking features to be downweighted. What interviewer tests: whether you treat the final recheck as mandatory rather than optional. Read deeper: Eligibility Filtering and Deleted Item Still Recommended.

Question Bank 15

Prompt Variant Questions

"Design Netflix / YouTube / Amazon / Instagram recommendations" are siblings of this same architecture — each just shifts emphasis. Treat all of the following as illustrative, "-like" adaptations, not claims about any real company's actual internal systems.

Q

How would this change for a Netflix-like design?

Strong answer angle

Strong answer direction: same core — profiles, multi-source candidate generation, multi-stage ranking, feature store, real-time overlay — with more emphasis on continue-watching state, session recency, household viewing skew, and catalog freshness around new releases; watch-completion signals matter a lot for the feedback loop. What interviewer tests: whether you can adapt emphasis without redesigning the architecture from scratch.

Q

How would this change for a YouTube-like design?

Strong answer angle

Strong answer direction: same core stack, with heavier emphasis on very large item/creator scale, fast-moving trends, short-session intent shifts, and stronger diversity/anti-feedback-loop guardrails — candidate generation and ranking are still the story, just under stronger scale and freshness pressure.

Q

How would this change for an Amazon-like product recommendation design?

Strong answer angle

Strong answer direction: same architecture, but the serving constraints shift toward catalog availability, inventory, region, price, and purchase intent — the eligibility/policy layer and out-of-stock handling matter more heavily on the hot path than in a pure content-consumption feed.

Q

How would this change for an Instagram-like feed ranking design?

Strong answer angle

Strong answer direction: same fundamentals again — event collection, profiles, multi-source retrieval, ranking, feature-store consistency, real-time session updates — with stronger freshness needs, creator-consumer graph effects, and a careful balance between close-connection relevance, discovery, and trend amplification via exploration and diversity controls.

Section 16

Quick Reference Card

Everything you want in working memory before you walk into the room.

Key takeaways
  1. 01A recommendation system is a pipeline of narrowing decisions: turn behavior into usable state, shrink the catalog into a bounded candidate set, then spend expensive ranking work only where it matters.
  2. 02Candidate generation and ranking are distinct stages — no single ranking model searches the whole catalog directly.
  3. 03A click alone is not reliable feedback; impression/exposure logging is what makes it interpretable.
  4. 04Multiple independently versioned candidate sources, merged and deduplicated, beat any single retrieval technique.
  5. 05The feature store is three concerns — definitions, offline data, online data — not one universal source of truth; point-in-time correctness is what keeps training itself honest.
  6. 06Eligibility is checked twice: a pre-filter for efficiency, and a mandatory post-filter recheck for correctness that no cache or stale index may bypass.
  7. 07Exploration vs. exploitation, model/index rollout, and experiment assignment are deliberate architecture decisions, not afterthoughts.
  8. 08The most dangerous production failures are silent quality regressions that return 200 the whole time — recommendation-quality observability exists specifically to catch what system-health dashboards cannot.
  9. 09Tell the design as an evolution story: trending → events → profiles → candidate generation → ranking → feature store → real-time → production scale.