Recommender System (RecSys)
- RecSys picks a few items to show from a huge catalog (millions to billions), with no explicit query.
- Search is the same pipeline, just triggered by a query instead of a user profile.
- Too many items to score with a good model, so a cascade spends compute where it matters.
This note is a map. Read the pieces in order:
Pipeline
- Retrieval Ranking Funnel — the 3-stage cascade (retrieve → rank → re-rank) and why it exists.
How candidates are generated (stage 1)
- Two-Tower Model — user tower + item tower, dot-product score, why it scales.
- Approximate Nearest Neighbor (ANN) — how to find nearest item vectors fast over billions.
- Collaborative Filtering — the classic "users who agreed before agree again" idea.
- Cold Start Problem — what breaks for a brand-new user or item, and the fix.
How candidates are ranked (stage 2)
- Learning to Rank — training a model to order items (the ranking stage in depth).