Why retrieval comes first
What it is
A good ranking model is too slow to run on every item. So large systems work in stages:
- retrieval (candidate generation): a fast, rough method picks a few hundred likely items from the whole catalogue;
- ranking: the accurate, slower model scores only those.
Retrieval is judged by whether the good items make it into the shortlist (recall); ranking by whether they end up at the top.
Why it matters
The arithmetic forces it.
- Scoring a whole catalogue with the ranking model takes seconds per request.
- Scoring a shortlist takes milliseconds.
- The two stages trade a little accuracy (retrieval can miss things) for a thousandfold saving.
In the real world: YouTube, Pinterest, Amazon and Spotify all describe two-stage (or more) systems: retrieval narrows millions of items to hundreds, ranking orders them.
Visual example
ComputedThe ranking model costs about 0.08 ms per item (module 4: 40 ms for 500). Only a shortlist fits in the budget.
Four seconds per home-screen open is out of the question; forty milliseconds fits.
Spending all the design effort on the ranker. If retrieval's shortlist does not contain what the user wants, a perfect ranker only orders the wrong items well.