Local RAG quality is measurable when labeled evidence, retrieval metrics, and claim-level citation checks are evaluated separately on a representative query set.
A fluent answer can hide a missed source, while a strong retriever can hand correct passages to a generator that cites them poorly. Start with queries whose relevant chunks are known, then score the top-k list before generating answers. Citation coverage belongs to the answer layer and must not be used as a substitute for retrieval recall.
Create Ground Truth Before Calculating Any Metric
For each test query, identify all acceptable evidence chunks or at least a defensible judged pool. Include direct lookups, synthesis questions, recency cases, abbreviations, languages, and permission boundaries. Split questions used for tuning from a held-out set.
A practical overview of RAG evaluation recommends evaluating retriever and generator components separately because end-to-end scores cannot localize failure.
Ground truth can be incomplete in a large library. Pool results from several retrievers, judge the union, and mark uncertain cases rather than calling every unjudged chunk irrelevant. Weak labels create precise-looking but misleading metrics.
Recall and Precision Answer Different Retrieval Questions
Recall@k is relevant chunks retrieved in the top k divided by all known relevant chunks. Precision@k is relevant chunks in the top k divided by k. Higher k usually improves recall while admitting more noise, so the two metrics should be read together.
The classic definitions of precision and recall establish this tradeoff in information retrieval. They do not account for rank position, so add MRR or nDCG when early evidence matters.
A query with one relevant passage has Recall@5 of 1.0 if that passage appears anywhere in five results, but Precision@5 is only 0.2. That may be acceptable for a reranker yet noisy for a small-context generator. Metric targets depend on the downstream evidence budget.
Citation Coverage Tests Claims, Not Links
Break the generated answer into checkable claims. Citation coverage is supported claims divided by claims that require evidence; citation correctness asks whether each cited passage actually supports its attached claim. A response can contain many links yet have poor coverage.
Recent work on citation-aware retrieval evaluates query coverage and atomic claim verifiability because one aggregate relevance score cannot expose unsupported answer fragments.
Citation coverage stops being meaningful when claims are not consistently segmented or when general knowledge and source-required claims are mixed without a policy. It also cannot prove the answer is complete. More citations do not automatically mean better grounding.
Use a Decision Rule That Preserves Diagnostic Separation
Run retrieval first and save ranked chunk IDs, scores, and versions. Calculate Recall@k, Precision@k, MRR or nDCG, then generate from the frozen results and score faithfulness, answer relevance, citation coverage, and citation correctness.
A controlled RAG evaluation metrics reports contextual precision, contextual recall, faithfulness, and answer relevance together, illustrating why no single score is sufficient.
Pass a release only when retrieval recall meets its floor, precision stays within the context budget, and every material answer claim is supported or explicitly qualified. If recall fails, repair indexing or retrieval; if citations fail with correct evidence present, repair generation and attribution.
Apply One Release Gate to Retrieval and Citations
Build at least 50 representative queries for a small household system, expanding to 100–200 as document types and languages grow. Judge top-5 and top-10 evidence, freeze the result set, then audit generated claims. Report macro averages plus worst-performing query strata.
Keep the test beside the RAG format evaluation content so table-heavy and narrative sources are represented rather than averaged together. Version every chunk ID and relevance judgment.
Use initial floors such as Recall@5 of 0.85 and citation correctness of 0.95 only as local starting gates, not universal standards. Tighten them according to risk. Never trade permission correctness or unsupported high-impact claims for a higher aggregate score.
Tech & AI HUB
More to Read

Why Does Smart Home Feature Computation Matter More as Sensor Count Increases at the Same Sampling Rate?
Trace per-sensor and cross-sensor compute as device count rises, identify nonlinear fusion costs, and benchmark the feature pipeline before automations lag.

Why Does RAG Evaluation Cost Matter More as the Document Library Grows at the Same Query Volume?
Understand why corpus growth raises RAG evaluation effort without more user queries and how stratified tests keep cost tied to risk.

Why Does Agent Tool Overhead Matter More as Workflow Steps Increase at the Same Model Size?
Trace how serial waits, context growth, retries, and reliability compound across agent steps, then measure the execution tax separately from model inference.

