The Two-Stage Funnel
Retrieve Hundreds, Rank Dozens
10 min+100 XPStep 1/11
You can't rank what you can't afford to score
Your catalog has 50 million items. Your feed budget is 200 milliseconds, end to end. A rich ranking model that costs even 1ms per item would need ~14 GPU-hours per request. This is not an optimization problem — it's a physics problem, and every production recommender solves it the same way: a funnel.
- Candidate generation — cheap, index-driven, tuned for recall: millions of items → a few hundred candidates
- Ranking — expensive, feature-rich, tuned for precision: hundreds of candidates → a scored top ~20
- Re-ranking — slate-level rules and constraints applied to the final list
Each stage gets its own model, its own metric, and its own failure modes. Conflating them is how teams end up debugging 'the recommender' when the problem lives entirely in one stage.
insight
The funnel exists because latency and relevance pull in opposite directions. Generation buys speed with shallow models; ranking buys precision with deep ones. The pipeline is the peace treaty.