2/31
Part 1 of 6 · DCGLearn and do

A ranking system has two stages, and each needs its own number

NDCG grades the ranker. Before you build it, see where it sits: a search system ranks in two stages, and each stage needs its own number.

Two stages, and the number for eachInteractive
retrieval = millions → a few hundred. Did the good ones survive the cut? recall@k.

Retrieval cuts millions of listings to a few hundred. The question there is whether the good ones survived the cut. The ranker orders those few hundred. The question there is whether the best ones sit at the top.

Then comes the catch. The labels you'd grade with come from clicks and bookings on what the old ranker showed. And people click what's on top.

Search and recommendation design rounds keep coming back to this. The reports:

  • In one Airbnb senior MLE loop, reported in August 2026, the design prompt was a user embedding plus a two-stage semantic retrieval and ranking system (1 report).
  • In that same loop, the interviewer pushed hard on position bias (1 report).
  • One OpenAI MLE candidate reported a recommendation and search design question in the phone screen (1 report).
  • A prep site lists a Netflix data science onsite question on planning a ranking A/B test (1 source).

Airbnb has written about this exact shape. Its embedding-based retrieval builds a pool of candidates that heavier models score later in the search ranking (1 source). Its 2018 KDD paper describes the listing and user embeddings it deployed for real-time personalization in search ranking.

In the editor, write recall_at_cut(retrieved, relevant): the share of the relevant listings that made it into retrieval's cut. retrieved holds the 300 listing ids retrieval kept out of a million, and relevant holds the four listings judged good for this search.