How to evaluate RAG retrieval: hits, recall, and no-answer cases
Use labeled questions to distinguish hit rate from Recall@K and diagnose missing evidence and no-answer cases.
Fix the questions and evidence first
Choose a public document with a fixed version and assign each chunk an ID. Prepare at least ten realistic questions: direct lookups, paraphrases, questions requiring two chunks, and questions the document cannot answer. For answerable questions, manually label the chunk IDs needed to support an answer. Record the source version, chunking method, and labeling rationale. Ten cases are a starting exercise, not evidence of production performance.
Calculate a hit and recall for one question
Teaching example: a question needs chunks A and B, and the top three returned are A, C, and D. Its hit value is 1 because at least one relevant chunk appears in the top three. Recall@3 is 1/2 because only one of the two needed chunks was retrieved. A hit does not mean all evidence is present. Calculate recall only for questions with labeled relevant chunks; evaluate no-answer cases separately.
Record results, then diagnose failures
For each case, record the question, expected chunks, top K results, hit value, recall, and notes. For answerable questions, hit rate is the number with a hit divided by the number of questions; mean Recall@K averages per-question recall. Check ingestion, lost conditions at chunk boundaries, query wording, and ranking. Separately review whether the generated answer follows and cites the evidence; retrieval metrics alone do not prove an answer is correct.
Make comparisons reproducible
Keep the document version, question set, labels, and K fixed. Change one setting at a time and save per-question results before and after. For unanswerable questions, check separately whether the system states that evidence is insufficient rather than assigning recall to an empty label set. Review regressions for wrong citations or unauthorized material before adopting a new configuration.
Reference:Elasticsearch: Ranking evaluation