RECOMMENDATION SYSTEMS · INTERVIEW QUESTION
What is a recommendation system and how does it work?
🟢 beginner · Collaborative Filtering
Hint: Think about the basic approaches: collaborative filtering, content-based, and hybrid.
Answer
A recommendation system predicts items a user might like based on past behavior and item properties.
Interview reasoning
Three main approaches:
-
Collaborative Filtering: 'users who liked X also liked Y' — uses user-item interaction patterns. User-based (find similar users) or item-based (find similar items).
-
Content-Based: recommends items similar to what user liked before, based on item features (genre, description, metadata).
-
Hybrid: combines both for better coverage.
Modern systems use deep learning: two-tower models for candidate retrieval, neural ranking models for scoring.
Production systems typically have: candidate generation (fast, broad) → ranking (accurate, narrow) → re-ranking (diversity, business rules) pipeline.
Recommendation predicts useful choices from behavior, content and context, typically through retrieval, ranking and a constrained slate. Neighborhood collaborative filtering compares users or items rather than learning arbitrary latent factors. Choose similarity and feedback handling carefully, because missing interactions often mean absent exposure rather than dislike.
Worked example. A hybrid store recommender retrieves content-similar and behavior-similar items, ranks them with fresh inventory, then removes near-duplicates.
Validation
Compare temporal recall/ranking with popularity baselines, new-entity cohorts, latency and randomized user outcomes; audit exposure and inventory constraints.
Common pitfalls
Similarity can be dominated by popularity or sparse overlap. Recommending what users already would choose is not necessarily incremental value.
Related questions
- Explain matrix factorization for collaborative filtering. How does it handle the cold start problem?
- Explain the difference between user-based and item-based collaborative filtering.
- How do you evaluate a recommendation system in production? What are the key offline and online metrics?
- Explain two-tower models for recommendation. How are they used in production?
- What is the cold start problem in recommendation systems? How do you solve it?