# Recommender systems: retrieval, ranking and cold start

> What interviewers check on Recommender systems, and what to study, in order.

Canonical: https://saadho.arushk.tech/topics/recommender-systems
Last updated: 2026-10-26

System design. Asked often. About 3 h 10 min to learn. 3 vetted resources.

## What this topic covers

How a large recommender narrows millions of items to a short, ordered list within one request’s latency budget. This topic goes past the general ML design walk into the models: collaborative filtering and matrix factorisation, content features, two-tower retrieval over an approximate nearest-neighbour index, then a heavier ranking model and a re-ranking pass for diversity, freshness and business rules. Cold start for new users and items, feedback loops, and the gap between offline metrics such as recall@k or NDCG and online ones such as watch time or retention come up in almost every loop. Interviewers check that you can explain why the funnel has stages, what each stage optimises, where negatives for training come from, and how you would tell whether a better offline model actually helped users.

### Builds on

- [Classic ML system design: recsys, search ranking, feature pipelines](https://saadho.arushk.tech/topics/classic-ml-system-design)
- [Embeddings basics: word2vec, contrastive learning, what embeddings capture](https://saadho.arushk.tech/topics/embeddings-basics)

## You’re ready when you can

- Explain content-based versus collaborative filtering and give one weakness of each
- Write the matrix factorisation objective and say why unobserved entries need weighting or negative sampling
- Describe how to give a new user or item an embedding without retraining the whole model
- Walk through retrieval, scoring and re-ranking and say what each stage optimises
- Explain why a softmax DNN can use side features that plain matrix factorisation struggles with
- Draw the offline–online, retrieval–ranking diagram and say what runs in each box
- Explain why item embeddings and the ANN index are built offline while the user or query embedding is computed per request
- Retell one of the published designs, naming its retrieval method, ranking model and one serving trick
- Argue when a single embedding-plus-ANN stage is enough and when you need a separate ranker
- Explain how candidate generation is framed as extreme multiclass classification and served with nearest-neighbour search

## Recommender systems interview questions

**How would you build the retrieval stage of a recommender with a two-tower model, and why not use the ranking model for everything?**

- A two-tower model encodes users and items separately into one embedding space, trained so a user’s embedding scores highly against items they engaged with, often using in-batch negatives.
- Item embeddings are computed offline and loaded into an approximate nearest-neighbour index, so at request time only the user tower runs and retrieval becomes a fast vector lookup.
- The ranker uses rich user–item cross features and scores only a few hundred candidates; applying it to every item in a catalogue of millions would blow the latency budget.

**How do you handle cold start for new users and new items?**

- A new item has no interaction history, so pure collaborative filtering has no embedding for it; content features such as text, category or creator give it a starting representation.
- For a new user, fall back on popularity and context such as location, device and onboarding choices, then shift to personalised results as interactions build up within the session.
- Reserve some exposure for fresh items through exploration, such as a bandit or a boosted slot, otherwise they never collect the feedback they need to be ranked fairly.

## What to study, in order

### 1. Recommendation Systems

Start here. Google Recommendation Systems course, Google for Developers. Course, about 1 h 30 min. Free. Last checked 2026-10-26. [Open](https://developers.google.com/machine-learning/recommendation)

- **Why:** Most recommender questions open with “how do you generate candidates?”, and this course gives the standard vocabulary for the answer: content-based versus collaborative filtering, matrix factorisation, softmax retrieval and the retrieval, scoring and re-ranking funnel.
- **Read:** Read “Background” (“Terminology” and “Recommendation systems overview”), “Candidate generation overview”, both “Content-based filtering” pages, the three “Collaborative filtering and matrix factorization” pages (“Basics”, “Matrix factorization”, and “Advantages & disadvantages”, which covers cold start and WALS projection), “Softmax model” and “Softmax training”, then “Retrieval”, “Scoring” and “Re-ranking”.
- **Skip:** The Colab programming exercises and the “Check your understanding” quizzes on a first pass; the course assumes Machine Learning Crash Course, so go back there only if inner products feel rusty.

### 2. System Design for Recommendations and Search

Free alternative. eugeneyan.com, Eugene Yan. Article, about 40 min. Free. Last checked 2026-10-26. [Open](https://eugeneyan.com/writing/system-design-for-discovery/)

- **Why:** Interviewers want the offline–online and retrieval–ranking split drawn without hesitation, and this post shows that same shape in published systems from Alibaba, Facebook, JD, DoorDash and LinkedIn.
- **Read:** Read the untitled opening that sets up the two-by-two of offline versus online and candidate retrieval versus ranking, then in “Examples from Alibaba, Facebook, JD, Doordash, etc.” read the Alibaba item-embedding, Facebook embedding-based retrieval and JD semantic retrieval write-ups closely, and finish with “Conclusion”.
- **Skip:** The Alibaba knowledge-graph ranking model (ATBRN), the DoorDash query-expansion details, and the reference list beyond the one paper you choose to open.

### 3. Deep Neural Networks for YouTube Recommendations

Go deeper. RecSys 2016 (Google Research), Paul Covington, Jay Adams, Emre Sargin. Paper, about 60 min. Free. Last checked 2026-10-26. [Open](https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/45530.pdf)

- **Why:** It is the paper behind the two-stage candidate generation and ranking design interviewers expect, and its practical choices (how labels are picked, the example-age feature, weighting by watch time) are favourite follow-up questions.
- **Read:** Read “2. System Overview”, “3. Candidate Generation” from “3.1 Recommendation as Classification” to “3.4 Label and Context Selection” (read 3.1 and 3.4 closely), then “4. Ranking” through “4.2 Modeling Expected Watch Time”, and “5. Conclusions”.
- **Skip:** The depth and width tables in “3.5 Experiments with Features and Depth” and “4.3 Experiments with Hidden Layers” beyond their headline finding, and the feature-normalisation detail in “4.1 Feature Representation” on a first read.

## Companies that test this area most

- [Meta](https://saadho.arushk.tech/companies/meta)
- [Netflix](https://saadho.arushk.tech/companies/netflix)
- [Discord](https://saadho.arushk.tech/companies/discord)
- [OpenAI](https://saadho.arushk.tech/companies/openai)
- [Anthropic](https://saadho.arushk.tech/companies/anthropic)
- [Databricks](https://saadho.arushk.tech/companies/databricks)

## Related

- [All topics](https://saadho.arushk.tech/library)
- [Build a plan that includes this](https://saadho.arushk.tech/start)
