Module 3 · Lesson 5 of 7

Measuring search quality

Did search find the right chunk?

Mark the chunk that answers each saved question, then count how often search puts it in the top k.

Scene 1 of 5 · Mark the right chunk

Each of 8 saved questions is marked with the one chunk that holds its answer.

Saved questionsSaved questions8 marked questionsSearchSearchRight chunk in top k?Right chunk in top k?
  • Saved questions — healthy — 8 marked questions
  • Search — healthy
  • Right chunk in top k? — healthy
8 saved questions and where search ranked the chunk that answers each
Saved questionRight chunk rankedIn top k
Refund window for shoes?1st–
Store credit after 45 days?2nd–
Refunds on sale items?1st–
Return with no receipt?4th–
Swap for another size?1st–
Send returns from Canada?Not in top 10–
Who pays return postage?3rd–
Refund to a gift card?1st–
  1. Mark the right chunk. Each of 8 saved questions is marked with the one chunk that holds its answer.
  2. Note each rank. For every question, record where the search placed its marked chunk in the results.
  3. Recall at 1. Only 4 of 8 questions have their chunk in first place.
  4. Recall at 4. Taking the top 4 finds 7 of 8, at the price of a longer prompt.
  5. Never found at all. "Send returns from Canada?" is never found, whatever k is, so the search itself needs fixing.
  6. Now you try. Set k, the number of chunks kept, and count the questions whose right chunk is among them. For example: Recall at 2: 5 of 8 questions. A bigger k finds more right chunks, but each one adds tokens to every prompt.

Scene 1 of 5: Mark the right chunk. Each of 8 saved questions is marked with the one chunk that holds its answer.

Key points

  1. Each saved question names the one chunk that holds its answer.
  2. Recall at k counts how often that chunk lands in the top k.
  3. A bigger k finds more, but every extra chunk lengthens the prompt.
  4. A chunk that is never found needs better chunking, not a bigger k.

A wrong answer has two possible causes: the search missed the right text, or the model misused it. Measure the search on its own, so you know which part to fix.

Take saved questions and mark, for each one, the that holds its answer. Run the search, and note where that chunk ranks.

is the share of questions whose right chunk lands in the top k results. A higher k finds more, but every extra chunk makes the longer and costlier.

A question whose chunk is never found needs a different fix: better chunking, a missing page, or word search for an exact term.

Example. In the panel above, recall at 1 is 4 of 8 questions, and recall at 4 is 7 of 8. The Canada question misses at every k, so its fix lies in chunking or the .

In system design: Track recall at k beside answer quality, and measure both again whenever chunking, the model or the index settings change.

Check yourself

Recall at 5 is 7 of 8, and one question's right chunk is never found. What is the best next step?