Lesson 3.4

Measuring retrieval with recall@k

Recall at k asks whether the passage containing the answer appears in the top k results.

7mAdvanced4.3k students

Overview

Score the retriever on its own

Recall at k asks whether the passage containing the answer appears in the top k results. If it does not, no amount of prompt engineering downstream can produce a correct answer.

Building the labelled set is the real work: real queries paired with the passages that genuinely answer them. A few dozen carefully labelled queries are enough to make pipeline changes measurable.

Keep this metric separate from end-to-end answer quality. Combining them means a retrieval regression can be masked by a generation improvement, and you will not see it until users do.

In this lesson you will:

  • Build a labelled query set
  • Compute recall and precision at k
  • Track retrieval separately from answer quality

Resources

Previous Lesson
Next Lesson
Measuring retrieval with recall@k — Retrieval-Augmented Generation in Practice — Vertex