Decisions and ranking
Recommenders
Like a librarian learning your tastes from past choices, a recommender estimates which items you may want next. It can learn from item features, patterns across users, or both. Large systems usually retrieve a small candidate set before ranking it more carefully.
How it works
- Define the user outcome and construct training examples from timestamped interactions and available features.
- Retrieve candidates with methods such as matrix factorization, two-tower embeddings, or content similarity.
- Rank candidates using user, item, and context features to predict the chosen objective.
- Rerank for constraints such as diversity, availability, and repeated exposure.
- Evaluate on time-based holdouts and then measure user outcomes in a controlled online experiment.
$$\hat r_{ui}=p_u^\top q_i$$
The knobs that matter
- embedding dimension
- controls capacity and retrieval storage
- negative sampling
- changes which unobserved items the model learns to distinguish
- candidate count
- trades retrieval coverage against ranking cost
- reranking weights
- balance relevance with diversity and other product objectives
What interviewers ask
- When would you use collaborative filtering instead of content-based recommendations?
- How would you train and serve a two-tower retrieval model?
- How do you recommend items for a new user or a newly added item?
- How would you evaluate a recommender without leaking future interactions?
Common mistakes
- Treating every missing interaction as a confirmed dislike.
- Using future interactions or future item features when building training examples.
- Optimizing click prediction alone without checking satisfaction and exposure effects.
When to use it
Use recommenders when users face many items and past interactions or item features provide useful signals. Start with simple content or popularity rules when there is little data to support personalized learning.