Retrieval, Ranking & Recommendation.
A hands-on series covering the full stack of modern recommender systems — from objectives and features to training, retrieval, ranking, serving, and closing the feedback loop. Each post is self-contained, with runnable code, math, diagrams, public datasets, and production design notes.
How to read · Beginners: 01 → 04 → 06 → 21 · Practitioners: jump to your problem · System designers: start with 24, then drill in.
The end-to-end mental model
flowchart LR
A[User Request] --> B[Candidate Generation<br/>Retrieval]
B --> C[Filtering<br/>Business Rules]
C --> D[Ranking<br/>Heavy Model]
D --> E[Re-Ranking<br/>Diversity / MMR]
E --> F[Serve Top-K]
F --> G[Logs + Feedback]
G --> H[Feature Store]
H --> I[Offline Training]
I --> B
I --> D
G --> J[A/B Test Metrics]
All 24 posts
01Evaluation Metrics for Retrieval, Ranking, and RecommendationOffline & online evaluation — Recall@K, NDCG, MAP, MRR, AUC, calibration, and the online KPIs they should (but don't always) predict.02Feature Types in Recommender SystemsFeatures — User, item, context, and cross features — sparse vs dense, and how to engineer them for recommenders.03Target Variables: Explicit vs Implicit FeedbackLabels — Explicit ratings vs implicit signals: how the choice of target variable shapes everything downstream.04Traditional Recommendation AlgorithmsClassical models — Collaborative filtering, content-based methods, and matrix factorization — the foundations that still ship.05Embeddings: From Word2Vec to item2vec and BeyondRepresentations — From Word2Vec and GloVe to item2vec and prod2vec — learning dense representations of items.06Neural Network–Based Recommender AlgorithmsDeep models — Neural collaborative filtering, Wide & Deep, and DeepFM — where deep learning enters ranking.07Advanced Recommender Algorithms: DIN, DIEN, DCN, xDeepFM, AutoIntSOTA ranking — DIN, DIEN, DCN, xDeepFM, AutoInt — modern feature-interaction and attention-based rankers.08Sequential & Session-Based Recommendation: GRU4Rec, SASRec, BERT4RecSequence models — GRU4Rec, SASRec, and BERT4Rec — modeling user behavior as a sequence.09Two-Tower Retrieval: The Workhorse of Modern Candidate GenerationCandidate generation — The two-tower architecture: the workhorse of modern large-scale retrieval.10Graph-Based Recommendation: GNNs, GraphSAGE, PinSage, LightGCNGraphs — GNNs for recommendation — GraphSAGE, PinSage, and LightGCN.11Learning-to-Rank: LambdaRank, LightGBM, XGBoost, ListNetRanking losses — Learning-to-rank with LambdaRank, LightGBM, XGBoost, and ListNet.12Multi-Task Recommendation: MMoE, PLE, ESMMMulti-objective — Multi-task heads — MMoE, PLE, and ESMM — for optimizing several objectives at once.13Multi-Armed Bandits in RecommendationExploration — Multi-armed bandits for exploration vs exploitation in recommendation.14Reinforcement Learning in Recommender SystemsLong-term reward — Reinforcement learning in RecSys: optimizing for long-term user value.15Generative AI in Recommendation: LLMs, Semantic IDs, and TIGERNew paradigm — Generative recommendation — LLMs, semantic IDs, and TIGER.16Vector Search & Indexing: HNSW, FAISS, ScaNN, AnnoyRetrieval infra — Approximate nearest-neighbor search: HNSW, FAISS, ScaNN, and Annoy.17Position Bias, Click Models & Counterfactual EvaluationDebiasing — Position bias, click models, and counterfactual evaluation.18The Cold Start ProblemNew users/items — The cold-start problem: serving useful recommendations with little or no interaction history.19Diversity, Fairness, and SerendipityBeyond accuracy — Diversity, fairness, and serendipity — optimizing for more than relevance.20A/B Testing and Online Experimentation for RecSysExperimentation — A/B testing and online experimentation done right for recommender systems.21Serving Architectures: Batch, Real-Time, and StreamingProduction — Serving architectures — batch, real-time, and streaming inference.22Feature Stores & ML Infrastructure for RecSysData infra — Feature stores and the ML infrastructure that keeps recommenders fed.23Closing the Loop: Feedback, Drift, and Continual LearningFeedback loops — Closing the loop: feedback, drift, and continual learning in production.24System Design Capstone: An End-to-End Modern RecommenderEnd-to-end blueprint — A system-design capstone: assembling an end-to-end modern recommender.
Recurring public datasets
| Dataset | Domain | Scale | Link |
|---|---|---|---|
| MovieLens (100K–25M) | Movies | up to ~25M ratings | grouplens.org |
| Amazon Reviews 2018 | E-commerce | ~233M reviews | nijianmo.github.io |
| Yelp Open Dataset | Local business | ~7M reviews | yelp.com/dataset |
| H&M Personalized Fashion | Fashion | 31M transactions | kaggle.com |
| RetailRocket | E-commerce | ~2.7M events | kaggle.com |
| Criteo 1TB Click Logs | Ads CTR | 4B examples | ailab.criteo.com |
| Spotify MPD | Playlists | 1M playlists | aicrowd.com |
| GoodReads | Books | ~228M interactions | mengtingwan.github.io |
| MIND News | News | high item churn | msnews.github.io |