New Tool Radar

AI Concepts

How to Measure RAG Retrieval Precision and Recall on a Small Test Set

Score a RAG pipeline's retrieval with precision and recall on ten questions you wrote yourself.

Schematic with three numbered boxes: write ten questions, record the chunks, score precision and recall.

RAGAS splits RAG failures into retrieval problems and generation problems, and context precision and context recall are the two retrieval metrics. Context precision asks whether the retrieved chunks were useful and ranked well, and context recall asks whether anything needed was missed. You can measure both by hand on ten questions before you trust a bigger automatic run.

Checked on 2026-11-29. We did not run any tool for this guide. Every result below is an expected result, marked UNTESTED, for you to confirm on your own files.

Prerequisites

  • A RAG pipeline with a small document set
  • Ten questions with known answers in those documents
  • A notebook to record which chunks came back for each question

Steps

1. Write ten questions with known answers

Pick ten questions whose answers sit in specific passages. Write down the passage each answer comes from.

Expected result: Ten questions exist, each tied to one named passage.

2. Run each question and record the chunks

Send each question to the pipeline and write down the top five chunks returned, in order.

Expected result: Fifty chunk slots are recorded, five per question.

3. Score precision by hand

For each question, count how many of the five chunks actually help answer it. Divide by five for that question, then average across the ten.

Expected result: A precision number between 0 and 1 exists for the set, for example 0.72.

4. Score recall by hand

For each question, check whether the passage with the answer was retrieved at all. Divide the questions found by ten.

Expected result: A recall number between 0 and 1 exists, for example 0.80, and the missed questions are listed.

Worked example

A practice set has ten questions about a staff handbook. Eight answers were retrieved and six of ten top chunks were useful on average.

Question Answer chunk found? Useful chunks of 5
Holiday carry-over Yes 4
Sick pay start Yes 3
Remote work days No 1
Expenses deadline Yes 4
Questions shown 12

Expected result: Recall is 3 of 4 shown questions, and the average useful chunk count is 3 of 5, so retrieval misses one question and returns noise (UNTESTED – confirm it yourself.)

Verdict table

Check Expected result Pass?
Write ten questions with known answers Ten questions exist, each tied to one named passage. –
Run each question and record the chunks Fifty chunk slots are recorded, five per question. –
Score precision by hand A precision number between 0 and 1 exists for the set, for example 0.72. –
Score recall by hand A recall number between 0 and 1 exists, for example 0.80, and the missed questions are listed. –

Limits

  • Ten questions is a small sample; a score can swing by one or two questions, so treat it as a smoke test, not a benchmark.
  • Hand scoring depends on your judgement of what counts as useful; write the rule down first and apply it the same way each time.

Sources

See all