Define recall@k in the embedding-retrieval context
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Recall@k is the fraction of queries where at least one relevant document appears in the top-k retrieved results.
Picture asking a librarian for any book about World War II and watching them grab the top 10 from the shelf. Recall@10 asks one question: did at least one actual WW2 book make it into those 10? If yes, the librarian got credit for the query. Recall@10 across many queries is the fraction of times the librarian got credit. The blind spot: the metric doesn't care whether the WW2 book was the first one handed over or buried at position 10, only that it showed up somewhere in the pile.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
5 min: define recall@k, walk through the calculation on a concrete 100-query example, distinguish from precision@k, name the two main limitations (rank blindness, index confound), and recommend companion metrics.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Confusing recall@k with precision@k. Recall@k asks 'did at least one relevant doc make it in?' Precision@k asks 'how many of the top-k are relevant?' They measure different things and can move in opposite directions.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.