search_ads_recsys / 32 · industry case studies lesson 32 / 39

Industry case studies — reading production recommenders

This capstone is not about memorizing YouTube, Airbnb, Alibaba, or Meta by name. It is about learning how to read any production recommender with the same disciplined chain: product surface → objective → retrieval → ranking → feedback loop → serving system → evaluation → failure modes. Once you can do that, every case study becomes a reusable design pattern instead of a trivia card.

The capstone method
For every case, force yourself through the same nine questions. What is being ranked? Who is the user and what context is available? What is the business objective? How are candidates generated? What features can the ranker use at serving time? What feedback is logged, biased, delayed, or missing? What freshness and latency budget binds the design? How is the model evaluated? How does the system degrade when it is wrong or overloaded? This is the linearized thinking that turns the previous 31 lessons into one interview answer.

The worksheet — one shape for every case

Before looking at any famous system, write the blank worksheet. This prevents the common interview failure: name-dropping architectures before naming the product constraints. A recommender is a decision system under constraints; the model is only one box inside it.

StepQuestionLessons it pulls from
1 · SurfaceFeed, search, marketplace, ads slot, notification, or creator tool?01, 11
2 · ObjectiveClick, watch-time, conversion, long-term retention, revenue, fairness, or some blend?05, 12
3 · InventoryMillions of videos, available homes, products, ads, creators, or generated items?02, 03
4 · RetrievalCollaborative filtering, two-tower, graph, semantic ID, rules, or multi-source recall?02, 24, 26
5 · RankingWhat dense/sparse features, sequence features, and task heads score each candidate?04, 13, 28
6 · ExplorationHow do new users, new items, long-tail items, and uncertain segments get exposure?15, 16, 31
7 · Data loopWhat events are logged, what is biased by the old policy, and how do features stay fresh?07, 17, 29
8 · EvaluationOffline metrics, replay, simulator, A/B test, interleaving, segment slices, or causal read?08, 27, 31
9 · OperationsLatency, train-serve skew, rollback, index refresh, failover, and graceful degradation?18, 19, 30

Case 1 · YouTube-style video recommendation

Surface. The home feed and watch-next surfaces rank videos for a user in a session. The inventory is huge, the user intent changes quickly, and the system is judged less by a single click than by whether the session is satisfying enough for the user to keep watching and return later.

YouTube-style feed ───────────────────────────────────────────────────────────── user/session context ──► multi-source retrieval ──► ranker ──► rerank │ │ │ │ │ │ │ ├─ diversity, freshness, policy │ │ └─ watch-time / satisfaction heads │ └─ subscriptions, similar videos, two-tower, trends └─ long-term profile + short-term session intent

Linear read. Start with objective: raw CTR is a trap because thumbnails can win clicks while producing short, unhappy sessions. That pushes you toward watch-time, completion, explicit feedback, return probability, and safety/quality guardrails. Then read retrieval: no single source covers the catalog, so candidate generation is multi-source — subscriptions, similar-video co-watch, embedding retrieval, fresh/trending content, and exploration buckets. Then read ranking: sequence features matter because the last few watches often dominate the current intent; a user's durable profile and session profile should be fused rather than collapsed.

Design pressureGood answerBad answer
ClickbaitOptimize a multi-objective score with watch quality, retention, and guardrails, not naked CTR."Use CTR as the label because clicks are easy."
Fresh videosGive new items exploration traffic and content-side retrieval until collaborative signal appears."Wait until the video has enough clicks."
Session intentUse recent behavior and target attention; keep a fast session vector separate from the slow profile."Use the user's average category distribution."
Feedback loopSlice by creator, topic, new/returning users; monitor diversity and long-tail exposure."If watch-time goes up globally, ship."
Worked numbers — a YouTube-style home feed budget
Putting numbers on the cascade is what turns a hand-wave into a design. Say ~10⁹ candidate videos, a 150 ms server budget, ~25 slots shown per session.
StageIn → outPer-item costLatency
Multi-source retrieval (ANN)10⁹ → ~2,000~1 µs (sub-linear index)~20 ms
Ranking (multi-task DLRM)2,000 → ~200~150 µs/item~80 ms (parallelized)
Re-rank (diversity, freshness, ads)200 → 25listwise~30 ms
net + render~20 ms
Now the answer has bite: the ranker scoring 2,000 items at 150 µs is 300 ms serial — so you parallelize across replicas to fit 80 ms, and that is why K₁ is ~2,000 and not 20,000 (lesson 1's arithmetic, lesson 11's K-trade-off). The offline metric is NDCG / per-head AUC; the online decision is watch-time + 28-day retention with a clickbait guardrail (lesson 8). Failure modes to name unprompted: feedback-loop narrowing (top creators capture exposure → add an exploration slot), and novelty effects masking a week-1 A/B lift.

Interview move. Say the words "home feed is not a one-label classification problem." Then draw retrieve → rank → rerank, name the multi-objective score, and explicitly call out the feedback loop: a model that only exploits past watch-time will narrow the catalog and starve new creators. That single sentence connects multi-task learning, cold start, exploration, and diversity.

Case 2 · Airbnb-style marketplace search and recommendation

Surface. Marketplace ranking is not a pure taste feed. The item must be available, geographically plausible, priced within range, and acceptable to both sides of the market. Search intent is explicit: location, dates, guests, filters. The recommender cannot rank a beautiful but unavailable home.

Airbnb-style marketplace ranking ───────────────────────────────────────────────────────────── query dates/location/guests ──► hard filters ──► retrieval ──► rank │ │ │ │ │ │ │ ├─ booking probability, host quality, │ │ │ │ price/value, trust, diversity │ │ └─ embedding search over listings / past trips └─ intent is explicit; constraints are not optional

Linear read. Start with constraints. Availability, location, capacity, policy filters, and price range are hard gates; retrieval happens inside the feasible set. Next read objective: booking is delayed and sparse, so you need proxy labels such as clicks, saves, contact/checkout starts, and calibrated conversion probability. Then read two-sided marketplace effects: the platform is optimizing guest satisfaction and host marketplace health, so ranking by expected booking alone can over-concentrate demand on already-popular listings.

Design pressureImplication
Hard feasibilityFilters and business constraints precede ranking. ANN recall is useless if candidates cannot be booked.
Sparse conversionUse multi-stage labels and calibration; booking probability is a probability, not merely an ordering score.
Two-sided marketAdd fairness/exposure guardrails for hosts and geography; monitor marketplace concentration.
Intent clarityQuery features and short-session behavior often dominate long-term taste.

Interview move. Do not lead with "two-tower embeddings." Lead with "this is constrained search plus ranking." Then explain where embeddings help: similar listings, personalized retrieval within a city, cold-start listing representation from text/images/amenities, and candidate expansion when exact filters are too narrow. That is the educational order: constraints first, model second.

Case 3 · Alibaba-style e-commerce ranking

Surface. E-commerce ranking blends recommendation, search, and ads-like conversion economics. The user may browse, search, add to cart, buy later, return, or churn. Labels are hierarchical and delayed: impression → click → detail page → cart → purchase → repeat purchase.

e-commerce ranking ───────────────────────────────────────────────────────────── exposure ─► click ─► detail view ─► cart ─► purchase ─► repeat │ │ │ │ │ │ └─────────┴──────────┴─────────────┴─────────┴──────────┘ each stage is a label, each label has selection bias

Linear read. Start with label structure. CVR is only observed after click, so training a conversion model on clicked examples introduces sample-selection bias. This is where ESMM-style "entire space" thinking matters: model click and conversion jointly over the impression space rather than pretending clicked traffic is the whole world. Next read behavior sequences: recent category views, search terms, cart events, and target-item attention are strong signals; DIN/DIEN-like target attention is not a decorative architecture choice, it answers "which prior behaviors are relevant to this candidate?" Finally read feature and system scale: huge sparse IDs, price/discount features, seller features, and real-time events demand careful feature engineering and train-serve parity.

ProblemConceptual fixWhere covered
CVR label only exists after clickEntire-space multi-task modeling; model CTR and post-click conversion together.12
Past behavior is long and noisyTarget attention over user history; separate short-term and long-term interests.13
Feature crosses are many and sparseEmbedding tables, crosses, DCN/DLRM-style rankers, leakage checks.04, 28
Revenue decisions need probabilitiesCalibrated pCTR/pCVR and business-aware score fusion.05
Worked numbers — why nested labels force ESMM
Walk the funnel with concrete rates. Out of 1,000,000 impressions: ~20,000 clicks (2% CTR) → ~10,000 detail views → ~2,500 carts → ~500 purchases. So the post-click conversion rate is 500 / 20,000 = 2.5%, but the impression-to-purchase rate is 500 / 1,000,000 = 0.05%. Two problems fall out of these numbers. (1) Sparsity: a CVR model trained only on clicked rows has 500 positives against 20,000 — and worse, those 20,000 clicked rows are not a random sample of impressions, they're the ones the old ranker chose to surface (sample-selection bias). (2) The fix: ESMM models p(\text{purchase}) = p(\text{click}) × p(\text{purchase} | \text{click}) over the entire million-impression space, so the conversion tower borrows signal from the abundant click labels and is trained on the full distribution rather than the biased clicked slice. The arithmetic is the argument for the architecture.

Interview move. If asked to design an e-commerce ranker, say "the funnel labels are nested and biased." That phrase earns its keep: it explains why naive CVR training fails, why multi-task learning is natural, why calibration matters, and why offline metrics can lie when the old ranker chose which products got seen.

Case 4 · Generative recommendation and semantic IDs

Surface. The LLM/AIGC era changes two pieces of the stack, not all of it. Models can generate richer content representations, semantic item IDs, explanations, synthetic user sessions, and candidate sets. But the hot path is still bound by latency, cost, freshness, and evaluation. The educational mistake is to say "use an LLM for recommendation" without naming the layer.

LayerReasonable generative roleWhy it is not magic
Item representationGenerate text/image/video embeddings, tags, summaries, semantic IDs.Needs freshness, cost control, and consistency across model versions.
RetrievalSemantic-ID retrieval, query expansion, generative candidate proposal.Must still hit recall/latency budgets and avoid hallucinated or unavailable items.
Ranking/rerankingReason over a small candidate set, personalize explanations, enforce constraints.Usually too expensive for the full candidate set; distillation may be required.
EvaluationUser simulators, LLM-as-judge for qualitative dimensions, synthetic edge cases.Simulator agreement is not user utility; still validate online.
Content generationAIGC creatives, thumbnails, descriptions, personalized copy.Creates new feedback loops and homogenization risks.

Linear read. Place the generative model at a layer, then run the same constraints. If it creates item embeddings, ask how often they refresh. If it proposes candidates, ask how recall is measured. If it reranks, ask how many candidates it can afford. If it judges quality, ask how it is calibrated against humans and online metrics. If it generates content, ask how the platform avoids flooding itself with optimized sameness.

The cost-wall rule
In production recsys, the LLM usually belongs off the broad hot path unless the candidate set is tiny or the value per decision is high. The common pattern is offline/nearline representation, small-set reranking, distillation, or simulator/evaluation support. If you cannot state the latency and cost budget, you have not designed the system.

Case 5 · SparrowRecSys-style teaching and prototyping stack

Surface. A small open or teaching recommender is valuable for a different reason: it makes the full loop visible. You can implement recall, ranking, feature generation, model training, and serving without hiding behind a large-company platform. The goal is not to match YouTube scale; it is to make the abstractions concrete.

Linear read. Treat a toy stack as a microscope. Implement matrix factorization or two-tower retrieval, ANN lookup, ranking features, a small MTL head, offline metrics, and a simple serving endpoint. Then deliberately add one production hazard at a time: cold-start items, stale features, biased logs, delayed labels, train-serve skew, bad calibration, and a fallback path. This is the fastest way to convert syllabus knowledge into engineering taste.

Prototype milestoneWhat it teaches
MF / two-tower retrievalWhy retrieval optimizes recall under latency, not final utility.
ANN index with refreshWhy embeddings become infrastructure once the catalog is large.
Ranker with dense + sparse featuresWhy feature parity and leakage matter more than fancy architecture in practice.
Offline metrics plus replayWhy top-K metrics are useful but not causal.
Fallback recommenderWhy graceful degradation is part of the recommender, not an ops afterthought.

Interactive · the conversion-funnel label explorer

Every case in this lesson hinges on one shared fact: the label you actually care about (purchase, booking, retention) sits at the bottom of a funnel, where it is sparse and selection-biased. Drag the per-stage rates and watch how fast the deep label vanishes — and read the verdict on whether a naive deep-funnel model is even trainable, or whether you need entire-space / multi-task modeling. The numbers are illustrative; the collapse is real.

How sparse is your bottom-funnel label?
Set the daily impression volume and the conversion rate at each funnel stage. The panels show how many deep-funnel labels you actually get per day, the class imbalance a clicked-only CVR model would face, and what that implies for the modeling choice.
purchases / day
impression→purchase rate
CVR positives : negatives (clicked only)
verdict
Reading

Putting the cases side by side

CaseDominant constraintModeling emphasisSystems emphasisEvaluation hazard
Video feedSession satisfaction and freshnessSequence modeling, multi-objective ranking, explorationRealtime features, fast retrieval, creator/content freshnessClickbait, novelty, feedback-loop narrowing
Marketplace searchHard feasibility and two-sided healthQuery/listing embeddings, calibrated conversion, constrained rerankingAvailability filters, feature hydration, reliable fallbacksDelayed booking labels, host exposure concentration
E-commerceNested funnel labels and revenueESMM/MMoE/PLE, target attention, pCTR/pCVR calibrationLarge sparse features, realtime behavior, train-serve paritySample-selection bias, delayed conversion, offline-online gap
Generative recsysCost wall and semantic generalizationSemantic IDs, content embeddings, small-set generative rerankingOffline/nearline generation, distillation, model-version freshnessSimulator mismatch, homogenization, hallucinated candidates
Teaching stackEnd-to-end visibilitySimple models that expose each failure modeIndex refresh, serving API, fallbacks, monitoringOverfitting to toy metrics, missing production bias

How to answer a case-study interview

  1. Name the surface and the decision. "We rank videos for a home feed" is different from "we rank available homes for a dated search query."
  2. Choose the objective and critique it immediately. Say why CTR, watch-time, booking, or revenue is biased, delayed, gameable, or incomplete.
  3. Draw the cascade. Retrieval, ranking, reranking, business rules, serving and fallback. Put latency budgets next to each stage.
  4. Explain the feature clocks. Static, batch, nearline, online/session features. Name how train-serve skew can enter.
  5. Handle cold start and exploration explicitly. New users and new items are not edge cases; they are daily traffic.
  6. Close with evaluation and operations. Offline metrics, counterfactual caveats, A/B tests, segment slices, monitoring, rollback, degradation.
Final synthesis
A recommender is a learning system wrapped around a product decision. The mature answer is not "use DLRM" or "add an LLM." The mature answer walks the chain: product surface, objective, inventory, retrieval, ranking, exploration, data loop, evaluation, and operations. The famous industry systems differ because their constraints differ. YouTube is session satisfaction at huge video scale; Airbnb is constrained marketplace search; Alibaba-style e-commerce is nested delayed conversion; generative recommendation is a new representation and reranking tool under a cost wall. Same skeleton, different pressures.

Interview prompts you should be ready for

  1. "Design YouTube Home." Start with multi-objective session satisfaction, not CTR. Draw multi-source retrieval → sequence-aware ranking → diversity/freshness rerank → A/B and segment-sliced evaluation.
  2. "Design Airbnb search ranking." Lead with constraints: availability, location, dates, guests. Then retrieval/ranking inside feasible inventory, calibrated booking probability, and two-sided marketplace guardrails.
  3. "Why does e-commerce CVR modeling need special care?" Because conversion is only observed after click, so clicked data is selected by the old ranker. Use entire-space multi-task thinking and calibrate pCTR/pCVR.
  4. "Where would you put an LLM in a recommender?" Name the layer: item representation, semantic retrieval, small-set reranking, evaluation simulator, or content generation. Then state the cost/freshness/evaluation constraint.
  5. "What separates a production recommender from a model demo?" Fresh features, unbiased logging strategy, index refresh, monitoring, rollback, graceful degradation, and evaluation that survives the offline-online gap.