RecSys · textbook
Trainer Widgets About All chapters

Revision mode

Interview questions

All 202 questions of the textbook in a row. First you answer yourself, then you reveal the answer and mark it «known» or «repeat» — the marks are saved in your browser.

all Part I · 6 Part I · 6 Part I · 6 Part I · 6 Part II · 5 Part II · 7 Part II · 7 Part II · 6 Part II · 6 Part III · 8 Part III · 9 Part III · 8 Part III · 8 Part IV · 8 Part IV · 8 Part IV · 9 Part V · 8 Part V · 8 Part VI · 9 Supplement · 6 Supplement · 5 Supplement · 5 Supplement · 7 Supplement · 7 Supplement · 7 Supplement · 5 Supplement · 5 Supplement · 4 Supplement · 4 Supplement · 9
Part I · The problem: why recommenders are built this way
What is the long tail and how do you measure how long it is?
to the chapter
Part I · The problem: why recommenders are built this way
Why does the long tail make cold start inevitable?
to the chapter
Part I · The problem: why recommenders are built this way
How does the business model affect the objective of a recommender?
to the chapter
Part I · The problem: why recommenders are built this way
Why does optimising a proxy metric spoil the product over time?
to the chapter
Part I · The problem: why recommenders are built this way
Why is a recommender multi-stage rather than one big model?
to the chapter
Part I · The problem: why recommenders are built this way
Which metric measures candidate generation, and why not precision?
to the chapter
Part I · Data and biases
Why does production train on implicit feedback rather than ratings?
to the chapter
Part I · Data and biases
What does a model trained on logs actually predict?
to the chapter
Part I · Data and biases
Why can't random catalogue items be used as negatives for the ranker?
to the chapter
Part I · Data and biases
List the main biases and how they differ by mechanism.
to the chapter
Part I · Data and biases
Why can't positional bias be cured by the model?
to the chapter
Part I · Data and biases
How fast does the feedback loop close, and how do you notice it?
to the chapter
Part I · Metrics: what measures candidate generation and ranking
Why is candidate generation measured by recall while ranking is not?
to the chapter
Part I · Metrics: what measures candidate generation and ranking
Why can't Recall@K be compared at a fixed K?
to the chapter
Part I · Metrics: what measures candidate generation and ranking
What makes NDCG better than MAP and Precision@k?
to the chapter
Part I · Metrics: what measures candidate generation and ranking
Why is one inversion not equal to another inversion?
to the chapter
Part I · Metrics: what measures candidate generation and ranking
What does AUC not show, and when is that critical?
to the chapter
Part I · Metrics: what measures candidate generation and ranking
Micro or macro: what should a metric be averaged over?
to the chapter
Part I · Validation and experiment
Why can't you use a random split?
to the chapter
Part I · Validation and experiment
What do you do with cold users and items in the test set?
to the chapter
Part I · Validation and experiment
Why do you need a popularity baseline if it is obviously worse?
to the chapter
Part I · Validation and experiment
How much traffic is needed to catch a 1% lift?
to the chapter
Part I · Validation and experiment
Why can't you peek at A/B results as they come in?
to the chapter
Part I · Validation and experiment
When does randomising by user give a biased estimate?
to the chapter
Part II · Collaborative filtering and similarity measures
How do Jaccard, cosine and PMI differ?
to the chapter
Part II · Collaborative filtering and similarity measures
Why can't PMI be used as it is?
to the chapter
Part II · Collaborative filtering and similarity measures
Is it true that NPMI cleans similarity of popularity?
to the chapter
Part II · Collaborative filtering and similarity measures
Why is a learned item-item matrix better than a computed one?
to the chapter
Part II · Collaborative filtering and similarity measures
EASE or SLIM: what is the difference and which to choose?
to the chapter
Part II · Matrix factorisation, ALS and fold-in
How does matrix factorisation differ from collaborative filtering?
to the chapter
Part II · Matrix factorisation, ALS and fold-in
Why is «SVD» in recommenders not SVD?
to the chapter
Part II · Matrix factorisation, ALS and fold-in
Why is ALS preferred to SGD in production?
to the chapter
Part II · Matrix factorisation, ALS and fold-in
What is rank and how do you choose it?
to the chapter
Part II · Matrix factorisation, ALS and fold-in
Why is regularisation needed in ALS — name both roles.
to the chapter
Part II · Matrix factorisation, ALS and fold-in
How does iALS work with implicit feedback?
to the chapter
Part II · Matrix factorisation, ALS and fold-in
How do you serve recommendations to a user who was not in training?
to the chapter
Part II · Two-tower models: folding, negatives and LogQ
What is folding and why is it fatal for a candidate generator?
to the chapter
Part II · Two-tower models: folding, negatives and LogQ
Why does a folded model work better inside its own group?
to the chapter
Part II · Two-tower models: folding, negatives and LogQ
Do in-batch negatives solve the folding problem?
to the chapter
Part II · Two-tower models: folding, negatives and LogQ
Why does a negative's contribution to the gradient depend on how the model scored it?
to the chapter
Part II · Two-tower models: folding, negatives and LogQ
Derive the LogQ correction and explain what it does.
to the chapter
Part II · Two-tower models: folding, negatives and LogQ
How do you estimate Q on a stream with no fixed vocabulary?
to the chapter
Part II · Two-tower models: folding, negatives and LogQ
Why normalise the embeddings, and why is temperature then needed?
to the chapter
Part II · Encoding objects: learned embeddings against content
Why are ID embeddings called the most powerful model of an object?
to the chapter
Part II · Encoding objects: learned embeddings against content
Why do free embeddings work badly on the tail?
to the chapter
Part II · Encoding objects: learned embeddings against content
What is the one-epoch phenomenon, and why can't you just reduce the sparsity?
to the chapter
Part II · Encoding objects: learned embeddings against content
Why does content encoding pull the tail up?
to the chapter
Part II · Encoding objects: learned embeddings against content
What is paid for moving to content features?
to the chapter
Part II · Encoding objects: learned embeddings against content
What does the hashing trick give besides saving memory?
to the chapter
Part II · ANN, quantisation and semantic IDs
Why can't you simply scan all the vectors?
to the chapter
Part II · ANN, quantisation and semantic IDs
How does MIPS differ from nearest-neighbour search?
to the chapter
Part II · ANN, quantisation and semantic IDs
How is HNSW built and what is efSearch?
to the chapter
Part II · ANN, quantisation and semantic IDs
What does product quantization give and what is paid for it?
to the chapter
Part II · ANN, quantisation and semantic IDs
What are semantic IDs and what are they for?
to the chapter
Part II · ANN, quantisation and semantic IDs
What is generative retrieval and what is its risk?
to the chapter
Part III · Learning to rank
How do pointwise, pairwise and listwise differ in meaning?
to the chapter
Part III · Learning to rank
Derive BPR.
to the chapter
Part III · Learning to rank
Why do AUC and NDCG not see calibration, and when does that hurt?
to the chapter
Part III · Learning to rank
What is LambdaRank and why is it considered a listwise loss?
to the chapter
Part III · Learning to rank
How is YetiRank built and how does it differ from LambdaRank?
to the chapter
Part III · Learning to rank
When should YetiRank not be applied?
to the chapter
Part III · Learning to rank
How does a listwise softmax differ from sampled softmax in candidate generation?
to the chapter
Part III · Learning to rank
What limitation do all three families share?
to the chapter
Part III · Features
Why is gradient boosting not enough in recommendations?
to the chapter
Part III · Features
And when is boosting better instead?
to the chapter
Part III · Features
Show that an embedding is a linear layer.
to the chapter
Part III · Features
How do you choose the size of an embedding?
to the chapter
Part III · Features
What optimisations of an embedding layer do you know?
to the chapter
Part III · Features
Why transform real-valued features, and how?
to the chapter
Part III · Features
Why can't the hour be fed as a number from 0 to 23?
to the chapter
Part III · Features
What is PLE and why is it better than binning?
to the chapter
Part III · Features
Why does a discretised semantic ID work better than a dense content vector?
to the chapter
Part III · Feature interactions
Tell the chain of feature-interaction models.
to the chapter
Part III · Feature interactions
What is wrong with explicit cross features?
to the chapter
Part III · Feature interactions
How does FM solve both problems?
to the chapter
Part III · Feature interactions
Why not just put an MLP there and hope it learns the products?
to the chapter
Part III · Feature interactions
How is the cross layer of DCN-v2 built?
to the chapter
Part III · Feature interactions
How do you combine a cross network with an MLP?
to the chapter
Part III · Feature interactions
Why is an ordinary transformer poorly suited to features?
to the chapter
Part III · Feature interactions
Why does adding layers to an MLP degrade quality, and what is done about it?
to the chapter
Part III · Multi-task, debiasing and distillation
Why does a ranking model need several tasks, and what is the trouble with shared bottom?
to the chapter
Part III · Multi-task, debiasing and distillation
What is MMoE and how does it differ from MoE?
to the chapter
Part III · Multi-task, debiasing and distillation
What is ESMM and what problem does it solve?
to the chapter
Part III · Multi-task, debiasing and distillation
Why is CTR higher at the first positions and what is done about it?
to the chapter
Part III · Multi-task, debiasing and distillation
How is a bias tower built?
to the chapter
Part III · Multi-task, debiasing and distillation
Why learn from a teacher's predictions if there are real labels?
to the chapter
Part III · Multi-task, debiasing and distillation
Why is a student given two heads?
to the chapter
Part III · Multi-task, debiasing and distillation
Where does distillation break in production?
to the chapter
Part IV · Transformers over history
How does target attention differ from averaging the history?
to the chapter
Part IV · Transformers over history
Why does DIN not normalise the attention weights with a softmax?
to the chapter
Part IV · Transformers over history
What does the temperature of attention do?
to the chapter
Part IV · Transformers over history
Tell us about SASRec, BERT4Rec and how their story ended.
to the chapter
Part IV · Transformers over history
Why did advertising move away from early fusion?
to the chapter
Part IV · Transformers over history
Why does the history take clicks rather than impressions?
to the chapter
Part IV · Transformers over history
How do you work with a very long history?
to the chapter
Part IV · Transformers over history
How is time spent on a document measured?
to the chapter
Part IV · Re-ranking and diversity
Why is a separate re-ranking layer needed if the ranker has already sorted everything?
to the chapter
Part IV · Re-ranking and diversity
How does diversity differ from exploration?
to the chapter
Part IV · Re-ranking and diversity
How do you measure diversity?
to the chapter
Part IV · Re-ranking and diversity
What is MMR?
to the chapter
Part IV · Re-ranking and diversity
How do you choose λ?
to the chapter
Part IV · Re-ranking and diversity
What is a DPP and why does a determinant mean diversity?
to the chapter
Part IV · Re-ranking and diversity
Why is a greedy algorithm acceptable here?
to the chapter
Part IV · Re-ranking and diversity
Can you do without a separate diversity layer?
to the chapter
Part IV · Exploration and bandits
What is the feedback loop and how do you get out of it?
to the chapter
Part IV · Exploration and bandits
Derive the UCB bonus.
to the chapter
Part IV · Exploration and bandits
How does Thompson differ from UCB?
to the chapter
Part IV · Exploration and bandits
Why does production more often take Thompson if UCB gives more reward?
to the chapter
Part IV · Exploration and bandits
What do you take as an arm in recommendations?
to the chapter
Part IV · Exploration and bandits
Why is the bandit layer placed at re-ranking?
to the chapter
Part IV · Exploration and bandits
Where do you get σ from and which σ do you need?
to the chapter
Part IV · Exploration and bandits
How do you tune the strength of the bonus?
to the chapter
Part IV · Exploration and bandits
When is a bandit layer not needed?
to the chapter
Part V · Data and logging
Why are two loops of feature computation needed?
to the chapter
Part V · Data and logging
What is feature skew and why does it matter?
to the chapter
Part V · Data and logging
Log the features or restore them later?
to the chapter
Part V · Data and logging
What is the minimal set of logs needed?
to the chapter
Part V · Data and logging
What is an ID Graph and what is it for?
to the chapter
Part V · Data and logging
What is feature coverage and why is it watched?
to the chapter
Part V · Data and logging
What kinds of drift are there and how are they detected?
to the chapter
Part V · Data and logging
How is retraining arranged and what does online fine-tuning risk?
to the chapter
Part V · Runtime
Why are candidate generation and features split into separate services?
to the chapter
Part V · Runtime
Where do you put the filters and why?
to the chapter
Part V · Runtime
What is dangerous about a mass cache invalidation?
to the chapter
Part V · Runtime
How does a Bloom filter work and why is it in recommendations?
to the chapter
Part V · Runtime
Why is there a PID controller in blending?
to the chapter
Part V · Runtime
What do you do when part of the system is unavailable?
to the chapter
Part V · Runtime
What is a pumpkin and how do you work with it?
to the chapter
Part V · Runtime
What do you monitor in a recommender service?
to the chapter
Part VI · System design
Design a recommender system for X. Where do you start?
to the chapter
Part VI · System design
Why can goal setting not be skipped?
to the chapter
Part VI · System design
How do you tell whether candidate generation is needed?
to the chapter
Part VI · System design
The business needs subscriptions. Why can subscriptions not be measured?
to the chapter
Part VI · System design
How do you generate feature ideas quickly?
to the chapter
Part VI · System design
What is surface cannibalisation and what do you do about it?
to the chapter
Part VI · System design
How do you onboard a cold user?
to the chapter
Part VI · System design
What changes when authors appear in the system?
to the chapter
Part VI · System design
How do you lay the response budget out over the stages?
to the chapter
Supplement · The open-sourced «For You» feed: what it is and how to read it
Why separate ranking and visibility filtering? Why not just lower the score?
to the chapter
Supplement · The open-sourced «For You» feed: what it is and how to read it
Why does visibility filtering come after ranking rather than before?
to the chapter
Supplement · The open-sourced «For You» feed: what it is and how to read it
What does predicting separate actions give instead of one relevance score?
to the chapter
Supplement · The open-sourced «For You» feed: what it is and how to read it
Why are candidates forbidden to look at each other in the transformer?
to the chapter
Supplement · The open-sourced «For You» feed: what it is and how to read it
Why hash embeddings, if a vocabulary of identifiers can be kept?
to the chapter
Supplement · The open-sourced «For You» feed: what it is and how to read it
What matters more for understanding the system: the pipeline code or the model weights?
to the chapter
Supplement · The pipeline: how the feed is assembled from standard stages
Design the pipeline of a recommender service. Which stages and in what order?
to the chapter
Supplement · The pipeline: how the feed is assembled from standard stages
What should happen if one of the candidate sources is unavailable?
to the chapter
Supplement · The pipeline: how the feed is assembled from standard stages
What is the «is it on» method of every stage for?
to the chapter
Supplement · The pipeline: how the feed is assembled from standard stages
Why is query hydration split into two rounds?
to the chapter
Supplement · The pipeline: how the feed is assembled from standard stages
How do you measure where the pipeline loses time?
to the chapter
Supplement · Sources: where the posts come from at all
Why does a system need several candidate generators if one of them is a trained model?
to the chapter
Supplement · Sources: where the posts come from at all
How do you return posts from follows in single-digit milliseconds?
to the chapter
Supplement · Sources: where the posts come from at all
What is SimClusters and how does it differ from matrix factorisation?
to the chapter
Supplement · Sources: where the posts come from at all
Why keep a source in the system that is recomputed once a week?
to the chapter
Supplement · Sources: where the posts come from at all
Can a computed score be reused on the next request?
to the chapter
Supplement · Retrieval: two towers, hashes and semantic IDs
Why was the learnable user embedding given up in the two-tower model?
to the chapter
Supplement · Retrieval: two towers, hashes and semantic IDs
What is a semantic ID and why is it better than a hash of the identifier?
to the chapter
Supplement · Retrieval: two towers, hashes and semantic IDs
Why are both in-batch and global negatives needed, if in-batch ones are free?
to the chapter
Supplement · Retrieval: two towers, hashes and semantic IDs
Why the LogQ correction, and why is its scale equal to two?
to the chapter
Supplement · Retrieval: two towers, hashes and semantic IDs
Why is a positive for retrieval only a like rather than any interaction?
to the chapter
Supplement · Retrieval: two towers, hashes and semantic IDs
Why store the candidate index inside the model checkpoint?
to the chapter
Supplement · Retrieval: two towers, hashes and semantic IDs
The vectors of both towers are normalised. What does that change?
to the chapter
Supplement · Ranking: the transformer that forbids candidates to look at each other
How is the isolation of candidates implemented and what does it give?
to the chapter
Supplement · Ranking: the transformer that forbids candidates to look at each other
Why are the conversion heads trained only on clicked posts?
to the chapter
Supplement · Ranking: the transformer that forbids candidates to look at each other
Why different optimisers for dense layers and embeddings?
to the chapter
Supplement · Ranking: the transformer that forbids candidates to look at each other
What is predicted by regression rather than classification, and why?
to the chapter
Supplement · Ranking: the transformer that forbids candidates to look at each other
Why add noise to the «hour of the day» feature?
to the chapter
Supplement · Ranking: the transformer that forbids candidates to look at each other
The ranker is twice as wide as the retriever. Why not the other way round?
to the chapter
Supplement · Ranking: the transformer that forbids candidates to look at each other
The history in the model is bidirectional, with no causal mask. Is that not a leak?
to the chapter
Supplement · Scoring: from action probabilities to one number
Why can one not say that a report cancels out 468 likes?
to the chapter
Supplement · Scoring: from action probabilities to one number
Why is the final score driven into the non-negative range?
to the chapter
Supplement · Scoring: from action probabilities to one number
How is diversity by author implemented and why is that better than a quota?
to the chapter
Supplement · Scoring: from action probabilities to one number
Why do replies and reposts from people you follow get a discount?
to the chapter
Supplement · Scoring: from action probabilities to one number
What happens to the posts of new authors, and what do bandits have to do with it?
to the chapter
Supplement · Scoring: from action probabilities to one number
Why is a DPP needed if diversity is already brought in by the decay on the author?
to the chapter
Supplement · Scoring: from action probabilities to one number
How will you know that a weight has been chosen correctly?
to the chapter
Supplement · Filtering: twenty-nine reasons not to show a post
In what order do you put filters in a recommender pipeline?
to the chapter
Supplement · Filtering: twenty-nine reasons not to show a post
Why are more posts selected than are shown?
to the chapter
Supplement · Filtering: twenty-nine reasons not to show a post
How do you guarantee that a user will not see the same post twice?
to the chapter
Supplement · Filtering: twenty-nine reasons not to show a post
How do you measure how much value a particular type of content brings to a feed?
to the chapter
Supplement · Filtering: twenty-nine reasons not to show a post
The age filter throws out everything older than 48 hours. Are we not losing good things?
to the chapter
Supplement · Labelling and visibility: may this post be shown
Why does a moderation system have three possible answers rather than two?
to the chapter
Supplement · Labelling and visibility: may this post be shown
How do you use two detectors of the same thing at once — a high-precision one and a high-recall one?
to the chapter
Supplement · Labelling and visibility: may this post be shown
How do you judge an account's reputation, and why are several ways needed?
to the chapter
Supplement · Labelling and visibility: may this post be shown
How is a bot detector similar to a recommender model?
to the chapter
Supplement · Labelling and visibility: may this post be shown
Why is the visibility decision not built into the ranking model?
to the chapter
Supplement · Blending: a feed is not made of posts alone
How do you build ads into a ranked feed?
to the chapter
Supplement · Blending: a feed is not made of posts alone
Why limit ads by a share of the «safe» posts?
to the chapter
Supplement · Blending: a feed is not made of posts alone
How often should a block of account recommendations be shown?
to the chapter
Supplement · Blending: a feed is not made of posts alone
What should happen after the answer has been sent to the user?
to the chapter
Supplement · Configuration: how the system changes without changing
How do you organise the configuration of a recommender system so that experimenting is possible?
to the chapter
Supplement · Configuration: how the system changes without changing
If the values live in an external configuration, what is the point of open code?
to the chapter
Supplement · Configuration: how the system changes without changing
Tell us about a case where good metrics hid a problem.
to the chapter
Supplement · Configuration: how the system changes without changing
How do you tell whether a parameter sitting at zero is switched off or broken?
to the chapter
Supplement · What this code teaches about the theory
Design the feed of a social network. Where do you start?
to the chapter
Supplement · What this code teaches about the theory
How do you represent a user and an item if content lives for hours?
to the chapter
Supplement · What this code teaches about the theory
The model predicts a dozen different actions. How do you combine them into one score?
to the chapter
Supplement · What this code teaches about the theory
How do you keep one author from taking over the whole feed?
to the chapter
Supplement · What this code teaches about the theory
How do you support new authors without breaking the feed?
to the chapter
Supplement · What this code teaches about the theory
A user complains that they see the same post twice. Where do you look?
to the chapter
Supplement · What this code teaches about the theory
How do you measure how much value a particular type of content brings?
to the chapter
Supplement · What this code teaches about the theory
The metrics went up but users are complaining. What do you do?
to the chapter
Supplement · What this code teaches about the theory
What would you do differently from the way it is done in X?
to the chapter