| Recall@k | Whether the relevant passage appears in the top k retrieved results. |
| Faithfulness | Whether every claim in the answer is supported by retrieved content. |
| Answer relevance | Whether the answer actually addresses the question. |
- Users report confident but wrong answers.
- You are changing chunking, embeddings or prompts.
- Before a model or index migration.
- 01Build a labelled set of queries with known source passages.
- 02Measure retrieval recall@k before touching the prompt.
- 03Score answers for faithfulness and relevance with judges plus spot checks.
- 04Track regressions per change with the same evaluation set.
Policy migration without regressions
- Context
- A knowledge base is re-indexed with new chunking rules.
- Problem
- Answer quality appears to drop but the cause is unclear.
- Approach
- Measure recall at 10 against labelled chunk IDs, then score faithfulness separately.
- Outcome
- The team knows whether to fix ingestion or the generation prompt.
Out-of-scope questions
- Context
- Users ask the assistant questions the documents cannot answer.
- Problem
- The model produces confident answers from thin air.
- Approach
- Include no-answer cases in the eval set and measure abstention.
- Outcome
- Fewer confident wrong answers and a measurable refusal rate.
A labelled evaluation case
{
"query": "What is the return window for a leased device?",
"expected_chunk_ids": ["policy-returns-v3-2"],
"must_cite": true,
"answer_contains": ["14 days"],
"no_answer_expected": false
}Version the eval set with the index and include no-answer cases so abstention is measured too.
Report the two halves separately
recall@10: 0.92 # evidence was retrieved
faithfulness: 0.61 # answer supported by that evidence
-> fix the generation prompt, not the indexIf recall is low, fix ingestion and retrieval first; a better prompt cannot cite a passage that was never found.
Human evaluation
Up: Highest trust
Down: Slow and expensive
LLM-as-judge
Up: Scalable and fast
Down: Needs calibration against human ratings
Exact-match metrics
Up: Cheap
Down: Poor fit for open-ended answers
| Option | Upside | Cost |
|---|---|---|
| Human evaluation | Highest trust | Slow and expensive |
| LLM-as-judge | Scalable and fast | Needs calibration against human ratings |
| Exact-match metrics | Cheap | Poor fit for open-ended answers |
- Keep retrieval and generation metrics separate.
- Include adversarial and no-answer queries.
- Version the evaluation set with the index.
- Sample judge results for human review.
| Key | Typical value | Note |
|---|---|---|
| eval_set_size | 50–200 | Cover common and edge queries. |
| recall_at | 5 / 10 | Report both. |
| judge_model | pinned | Calibrate against human labels. |
| Symptom | Cause | Fix |
|---|---|---|
| Answers wrong but sources right | Generation or prompt issue | Fix instructions and grounding, not retrieval. |
| Metrics improve, users disagree | Evaluation set not representative | Add real queries and re-label. |
What metric matters most?
Retrieval recall first: if the evidence is not retrieved, generation cannot be correct.
Can an LLM grade answers?
Yes, as a scaled approximation. Calibrate it against human judgements and review samples regularly.
More in RAG & knowledge
RAG pipeline end to end
The six stages of retrieval-augmented generation and where each one most often fails.
Chunking and metadata design
How to split documents so retrieved passages remain useful, and which metadata to keep.
Hybrid search and reranking
Combine lexical and semantic retrieval, then use a reranker to improve precision before generation.