Retrieval and Ranking Architectures
Retrieval-and-ranking architectures split recommendation into fast broad recall and slower precise ordering. This is the recommender analogue of dense retrieval followed by reranking: retrieve thousands, rank hundreds, display a few.
The two-stage system
A two-stage system can be written as
where is a cheap retrieval score and is a richer ranking model. Candidate generation may combine multiple retrieval sources before ranking.
Worked example
A cheap retrieval score can select candidates before the ranker adds richer features:
| Item | Retrieval score | Retrieved? | Ranker margin | Final rank score |
|---|---|---|---|---|
| 0 | 0.74 | yes | 0.00 | 0.74 |
| 1 | 0.24 | no | 0.20 | not ranked |
| 2 | 0.60 | yes | 0.10 | 0.70 |
| 3 | 0.44 | yes | 0.30 | 0.74 |
The retrieval stage recalls items 0, 2, and 3; item 1 is never seen by the ranker. The ranker then promotes item 3 above item 2 using the margin feature. Hybrid recommenders often feed several such scores into the ranker.
Caveats
Retrieval and ranking must be evaluated separately. A ranker with excellent NDCG cannot fix low candidate recall, and a high-recall generator can still overload serving latency. Keep eligibility, freshness, deduplication, and exploration decisions visible in logs.
References
- Li et al., 2010, A Contextual-Bandit Approach to Personalized News Article Recommendation
- scikit-learn documentation: cosine_similarity
Nav