Overview
This checklist evaluates Retrieval-Augmented Generation (RAG) systems across the dimensions that actually fail in production: retrieval quality, generation faithfulness, citation accuracy, end-to-end behavior, and operational cost. Each section pairs a concrete metric with a pass/fail threshold and a checkbox list, so the result is a sign-off decision rather than a vague feeling that the system “seems fine.”
Run it before the first production deployment and after any significant change to the retrieval index, embedding model, chunking strategy, or generation prompt. For broader context on how these pieces fit together in a live system, see the production RAG guide.
When to Use This Checklist
Use it when any of these applies:
- You’re about to ship a RAG feature to real users for the first time.
- You changed the embedding model, vector index settings, or chunking logic — anything that alters what retrieval returns.
- You edited the system prompt or swapped the generation model — anything that alters how answers are written.
- Users report wrong, uncited, or slow answers and you need to isolate which layer is failing.
- You want a repeatable regression gate before each release, not an ad-hoc smoke test.
It does not apply when:
- You don’t have a corpus or retrieval index yet — build the data preparation checklist first; evaluating retrieval against an empty index tells you nothing.
- You need unit tests for application code — this evaluates output quality, not whether your code compiles or your API responds 200.
- The system isn’t RAG at all (fine-tuned model with no retrieval step) — use an LLM evaluation approach instead.
How to Run This Checklist
A checklist only works if someone owns each pass. A typical run looks like this:
- Freeze a golden test set. 50-100 queries with verified answers, covering every query type in section 4. Store it under version control next to the code.
- Run retrieval metrics (section 1). Pure retrieval, no generation. A retrieval failure here invalidates everything downstream — fix it before scoring generation.
- Run generation metrics (sections 2-3). Score faithfulness, relevance, correctness, and citation accuracy against the frozen set.
- Run end-to-end and operational checks (sections 4-5). Latency, cost, throughput, and edge cases under realistic load.
- Compare against thresholds (section 7). Every metric is either above its bar or it isn’t — no averaging away a failing dimension.
- Record the result. Keep the scores, the dataset version, and the system version together so the next run can diff against them.
One person can run the full pass in a day once the test set exists. The expensive part is building the ground truth set the first time; budget a few hours of domain-expert time for it.
1. Retrieval Quality
Retrieval is the foundation: if the right chunks never reach the prompt, no prompt engineering will save the answer. Measure it in isolation before touching the generation layer.
1.1 Context Precision
Context precision asks a simple question: of the chunks retrieval returned, how many actually help answer the query? Low precision means the LLM is wading through noise — it costs tokens, adds latency, and gives the model opportunities to pick up irrelevant facts.
Metric: Context Precision
Definition: Of the top-k retrieved chunks, what fraction contains
information that contributes to answering the query?
Formula: (relevant chunks retrieved) / (total chunks retrieved)
Target: > 0.75 for top-5 retrieval
- Define what counts as “relevant” for your domain
- Create a test set of 100+ query-relevant-chunk pairs
- Measure precision at k=3, k=5, k=10
- Identify queries with precision below threshold
- Investigate low-precision queries: chunk size, embedding model, or query reformulation
When precision is low at k=10 but fine at k=5, the retriever is pulling in marginal results — lowering k or adding a reranker usually beats re-embedding the corpus.
1.2 Context Recall
Recall is the mirror metric: of everything relevant in the corpus, what fraction did retrieval actually surface? A system can have perfect precision and still fail users if it consistently misses the one document that contains the answer.
Metric: Context Recall
Definition: Of all chunks relevant to a query, what fraction was retrieved?
Formula: (relevant chunks retrieved) / (total relevant chunks in corpus)
Target: > 0.80
- Identify all relevant chunks for each test query
- Measure recall at k=5, k=10, k=20
- Check if relevant chunks are missing from the index
- Verify chunk overlap settings don’t split critical information
Missing chunks in the index — not bad ranking — are the most common cause of low recall. Check ingestion before tuning search parameters.
1.3 Retrieval Latency
Metric: p50, p95, p99 retrieval latency
Target: p95 < 200ms for vector search
Target: p95 < 500ms for hybrid (vector + keyword) search
- Measure retrieval latency under load (100 concurrent queries)
- Check vector index configuration (HNSW ef_search, IVF nprobe)
- Verify embedding generation time is acceptable
- Test with maximum expected corpus size
Latency measured on a warm laptop with 10 documents is meaningless. Test at production corpus size, with the index cold, under concurrent load — HNSW parameters that look fine at 10k vectors can double p95 at 1M.
1.4 Chunking Strategy
- Chunk size is appropriate for your content (512-1024 tokens typical)
- Chunk overlap preserves context across boundaries (50-100 tokens)
- Document structure is respected (chunks don’t cross section boundaries)
- Tables and code blocks aren’t split across chunks
- Metadata is attached to each chunk (source, page, section)
Chunking bugs masquerade as retrieval bugs: a table split across two chunks makes both halves unanswerable, and neither precision nor recall metrics will tell you why. The data preparation checklist covers ingestion-side verification of the same assumptions.
2. Generation Quality
Once retrieval is trustworthy, evaluate what the model does with the context it receives.
2.1 Faithfulness
Faithfulness measures grounding: of the claims in the generated answer, what fraction can be directly supported by the retrieved context? It’s the metric that catches confident invention.
Metric: Faithfulness
Definition: Of the claims in the generated answer, what fraction can be
directly supported by the retrieved context?
Formula: (supported claims) / (total claims in answer)
Target: > 0.90
- Decompose each answer into individual claims
- Verify each claim against the retrieved context
- Flag answers with unsupported claims
- Adjust generation prompt to emphasize grounding
- Consider adding a verification step (second LLM call to check faithfulness)
Don’t let the model that wrote the answer grade its own faithfulness — it will rationalize its claims. Use a different model, or a deterministic claim-checking step, as the judge.
2.2 Answer Relevance
A faithful answer can still dodge the question. Relevance measures whether the response actually answers what the user asked, at the level of detail they needed.
Metric: Answer Relevance
Definition: How directly does the answer address the user's question?
Scale: 1 (irrelevant) to 5 (directly answers the question)
Target: Average > 4.0
- Create a test set of diverse query types (factual, comparative, procedural)
- Score each answer on the 1-5 scale
- Identify query types with low relevance scores
- Check if the generation prompt includes the query prominently
Low relevance with high faithfulness usually means the prompt over-constrains the model — it repeats retrieved text instead of synthesizing an answer.
2.3 Answer Correctness
Correctness checks the answer against verified ground truth — not just whether it sounds plausible, but whether it’s right.
Metric: Answer Correctness
Definition: Does the answer match the ground truth?
Methods:
1. Human evaluation — compare answer to verified ground truth
2. LLM-as-judge — use a stronger model to evaluate correctness
3. Automated — compare against a known-correct answer set
Target: > 0.85 agreement with ground truth
- Create a ground truth answer set (50+ questions with verified answers)
- Run automated comparison against ground truth
- Sample 10% of answers for human review
- Track correctness over time as the corpus changes
2.4 Hallucination Detection
- Check for entities not present in the retrieved context
- Check for specific numbers, dates, or statistics not in the source
- Check for causal claims not supported by the context
- Flag answers that assert information beyond the retrieved chunks
- Test with adversarial queries designed to trigger hallucinations
Numbers are the cheapest hallucination test: a system that invents a “30-day refund window” when the source says 14 fails instantly, and this class of error erodes user trust faster than almost anything else.
3. Citation and Source Attribution
Cited answers earn user trust — right up until someone clicks a citation and finds it doesn’t back the claim it was attached to.
3.1 Citation Accuracy
- Every factual claim in the answer has a citation
- Citations reference the correct source chunk
- Citation format is consistent (e.g., [1], [Source: document.pdf, p.5])
- Citations are clickable or traceable to the source document
3.2 Source Verification
- Verify that cited chunks actually contain the claimed information
- Check for citation hallucinations (citing a chunk that doesn’t support the claim)
- Test with queries where the correct answer requires synthesizing several chunks
- Ensure the system says “I don’t know” when retrieval returns no relevant context
Citation hallucination is subtle: the chunk exists, it was retrieved, but it doesn’t contain the fact attributed to it. Spot-check at least a sample — fully automated checks miss it.
4. End-to-End Testing
Per-metric scores can look healthy while the system still fails real users. End-to-end testing exercises the full pipeline with the queries people actually send — including the awkward ones.
4.1 Query Coverage
Each query type probes a different failure mode: factual queries test extraction, comparative queries test synthesis across chunks, procedural queries test whether steps arrive in the right order, and multi-hop queries stress the retrieval pipeline hardest because missing a single chunk breaks the chain. Negative queries check that the system knows when to stay silent, and ambiguous queries check that it asks or picks a reasonable interpretation instead of guessing.
- Test factual queries (“What is X?”)
- Test comparative queries (“What is the difference between X and Y?”)
- Test procedural queries (“How do I do X?”)
- Test analytical queries (“Why does X happen?”)
- Test multi-hop queries (require chaining information from several chunks)
- Test negative queries (questions the system shouldn’t answer)
- Test ambiguous queries (queries with several valid interpretations)
4.2 Edge Cases
- Empty query — system handles gracefully
- Very long query — system processes without truncation
- Query in different language — system responds appropriately
- Query with no relevant context — system says “I don’t know”
- Query with conflicting sources — system acknowledges conflict
- Query requiring real-time data — system indicates limitation
The “no relevant context” case deserves special attention: a graceful refusal is a feature, and teams routinely ship systems that hallucinate rather than admit an empty result set.
4.3 Regression Testing
- Maintain a golden test set of 50+ query-answer pairs
- Run golden test set after every change to: embeddings, chunking, prompts, model
- Track score trends over time
- Alert on score drops greater than 5%
A golden set that never changes drifts away from reality as the corpus grows. Refresh a slice of it every month, and retire queries that no longer represent real user behavior.
5. Operational Metrics
None of the scores above matter if the system is too slow or too expensive to run.
5.1 End-to-End Latency
Component | p50 Target | p95 Target
───────────────────┼────────────┼───────────
Embedding generation| 50ms | 150ms
Vector search | 100ms | 200ms
Context preparation | 20ms | 50ms
LLM generation | 1000ms | 3000ms
Total | 1200ms | 3500ms
- Measure each component separately
- Identify the bottleneck
- Test under expected production load
- Set up latency monitoring and alerting
LLM generation dominates the budget — typically 80%+ of total latency. Streaming the response makes the wait tolerable for users, but p95 still belongs in your monitoring.
5.2 Cost per Query
Cost components:
- Embedding API call: $0.0001 per query (typical)
- Vector search: $0.0001 per query (self-hosted) or $0.001 (managed)
- LLM API call: $0.01-0.05 per query (depends on model and context length)
Total: $0.01-0.06 per query (typical RAG system)
- Track cost per query over time
- Monitor for cost spikes (longer context, more retrieved chunks)
- Set cost budgets and alerts
- Consider caching for frequent queries
Cost spikes usually come from context growth, not volume: someone raised k from 5 to 20, or a prompt template started injecting full documents. Alert on cost per query, not just total spend.
5.3 Throughput
- Measure queries per second under load
- Identify rate limits (embedding API, vector DB, LLM API)
- Test with concurrent users
- Implement queueing for burst traffic
6. Evaluation Framework
Three layers of tooling cover most needs. RAGAS gives you standardized metrics out of the box — the fastest way to get numbers comparable across runs. A custom LLM-as-judge script like the one below handles criteria RAGAS doesn’t cover or domain-specific scoring rubrics. Human review remains the calibration layer: sample a fixed percentage of judged answers and check whether the judge agrees with a person, or the automated scores quietly drift.
Start with RAGAS for the standard four metrics, add a custom judge only for what it can’t express (e.g., citation format compliance), and keep the human sample as ground truth for the judges themselves.
RAGAS Metrics
# Using RAGAS (Retrieval Augmented Generation Assessment)
from ragas import evaluate
from ragas.metrics import (
faithfulness,
answer_relevancy,
context_precision,
context_recall,
)
from datasets import Dataset
# Prepare evaluation dataset
eval_data = Dataset.from_dict({
"question": ["What is the refund policy?", "How do I reset my password?"],
"answer": ["Customers can request refunds within 30 days...", ...],
"contexts": [["Refunds are available within 30 days of purchase..."], ...],
"ground_truth": ["Refunds are available within 30 days.", ...],
})
# Run evaluation
results = evaluate(
eval_data,
metrics=[faithfulness, answer_relevancy, context_precision, context_recall],
)
print(results)
# {'faithfulness': 0.92, 'answer_relevancy': 4.2,
# 'context_precision': 0.85, 'context_recall': 0.88}
The RAGAS metrics recipe walks through a runnable version of this with real data.
Custom Evaluation Script
import json
from openai import OpenAI
client = OpenAI()
def evaluate_rag_response(query, retrieved_chunks, answer, ground_truth):
eval_prompt = f"""
Evaluate this RAG response on three criteria. Score each 1-5.
Query: {query}
Retrieved context: {retrieved_chunks}
Generated answer: {answer}
Ground truth: {ground_truth}
Criteria:
1. Faithfulness: Is every claim in the answer supported by the context?
2. Relevance: Does the answer directly address the query?
3. Correctness: Does the answer match the ground truth?
Return JSON: {{"faithfulness": N, "relevance": N, "correctness": N}}
"""
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": eval_prompt}],
temperature=0,
)
return json.loads(response.choices[0].message.content)
# Run on test set
results = []
for item in test_set:
score = evaluate_rag_response(
item["query"],
item["chunks"],
item["answer"],
item["ground_truth"],
)
results.append(score)
# Aggregate
avg_faithfulness = sum(r["faithfulness"] for r in results) / len(results)
avg_relevance = sum(r["relevance"] for r in results) / len(results)
avg_correctness = sum(r["correctness"] for r in results) / len(results)
print(f"Faithfulness: {avg_faithfulness:.2f}")
print(f"Relevance: {avg_relevance:.2f}")
print(f"Correctness: {avg_correctness:.2f}")
Two details worth keeping in the prompt: temperature=0 makes the judge deterministic enough for regression comparison, and asking for JSON keeps parsing simple. A judge prompt written in five minutes will still catch the big failures — refine it once you see where its scores diverge from human review.
Companion files: the ai-rag-evaluation-checklist companion repo has both scripts above as runnable files (eval_ragas.py, eval_llm_judge.py) plus a requirements.txt ready to install.
Scoring and Thresholds
Each metric in this checklist has a target, but teams need a policy for what happens when a score lands under the bar:
| Score vs. target | Action |
|---|---|
| All metrics above target | Sign off and deploy |
| One metric 1-5% below target | Fix forward if the cause is known; otherwise investigate before deploy |
| Any metric >5% below target | Block the release; the regression is real, not noise |
| New metric drops vs. previous run | Treat as a regression even if still above target |
Two rules keep the process honest. First, never average metrics across dimensions — a system at 0.95 faithfulness and 0.40 recall is broken even though the mean looks acceptable. Second, track the trend, not just the absolute value: a metric that slid from 0.92 to 0.86 is telling you something a static threshold won’t.
Common Mistakes
- Evaluating only on happy-path queries. Teams build test sets from the questions they hope users ask. Pull real queries from logs or support tickets instead — the distribution matters more than the volume.
- Judging with the same model that generates. A model grading its own output inflates faithfulness and correctness scores by several points. Use a different, stronger model as judge.
- Small or stale golden sets. Twenty cherry-picked queries can’t catch a regression. Keep at least 50, refresh monthly, and include the weird queries that caused past incidents.
- Tuning generation when retrieval is broken. If recall is 0.40, no prompt tweak will fix the answers. Always evaluate retrieval first and generation second.
- Treating “I don’t know” as failure. A system that declines out-of-scope queries is behaving correctly; a test set with no negative queries teaches the system to always guess.
- Benchmarking once before launch. Corpus drift, model updates, and prompt edits all move scores. The checklist is a regression gate, not a one-time audit.
7. Sign-Off Checklist
- Retrieval precision > 0.75 at k=5
- Retrieval recall > 0.80 at k=10
- Faithfulness > 0.90
- Answer relevance > 4.0 average
- Answer correctness > 0.85
- No hallucinations in golden test set
- All factual claims have citations
- System handles “no context” queries gracefully
- p95 end-to-end latency < 3.5s
- Cost per query within budget
- Golden test set passes after latest changes
- Monitoring and alerting configured
See Also
- RAGAS — RAG Evaluation Framework — automated RAG metrics
- LangSmith Evaluation — tracing and eval tooling
Frequently Asked Questions
How often should I run this evaluation?
Run the full checklist before the first deployment and after any significant change — a new embedding model, a different chunking strategy, an updated generation prompt, or a corpus refresh. On every release, at least run the golden test set. Schedule the complete pass monthly to catch slow drift, and keep automated monitoring on latency, cost, and error rates in between.
What is the difference between faithfulness and correctness?
Faithfulness measures whether the answer is grounded in the retrieved context — it says nothing about whether the context itself is right. Correctness compares the answer to verified ground truth. A system can be faithful but wrong when retrieval surfaces a bad document, or correct but unfaithful when the model ignores the context and answers from memory. You need both to know which layer to fix.
How do I create a ground truth answer set?
Pick 50-100 representative queries covering every query type, and have a domain expert write the verified answer for each one. Mix in single-chunk answers, questions that need multi-chunk synthesis, and queries whose correct response is "I don't know." Store the query, the expert answer, and the relevant source chunks together, and refresh the set whenever the corpus changes in a meaningful way.
What should I do if faithfulness is low?
Low faithfulness means the model is writing claims the retrieved context can't support. Work through the usual fixes in order: tighten the system prompt so unsupported claims are explicitly forbidden, drop temperature to 0, add a verification pass where a second call checks each claim against the context, switch to a model with stronger instruction-following, and retrieve fewer chunks so the model has less irrelevant material to latch onto.
How do I evaluate multi-hop reasoning in RAG?
Design test queries that can only be answered by combining facts spread across two or three chunks — for example, a comparison that needs a date from one document and a policy from another. Then check both halves of the pipeline: did retrieval surface every required chunk, and did generation actually synthesize them? Track multi-hop accuracy separately from single-hop; it fails earlier and more often.
Related Resources
AI LLM Prompt Template Library
A reusable prompt template library for common LLM tasks: summarization, extraction, classification, code review, translation, and structured output with variables, examples, and evaluation criteria.
DocAI Data Preparation Checklist
Checklist for preparing data for LLM and RAG systems: data collection, cleaning, chunking, embedding, deduplication, PII removal, format validation, quality scoring, and indexing with metrics and thresholds.
GuideComplete Guide to RAG in Production
Take RAG to production: chunking strategies, vector store selection, hybrid retrieval, reranking, RAGAS evaluation, and deployment patterns.
RecipeEvaluate RAG Quality with RAGAS Metrics
Measure RAG pipeline quality using RAGAS framework metrics — faithfulness, answer relevancy, context precision, and context recall for objective evaluation
DocAI LLM Incident Response Runbook
Operational runbook for LLM production incidents: hallucination events, model outages, cost spikes, safety failures, and degraded quality. Includes severity levels, escalation paths, diagnostic steps, and recovery procedures.
DocAI Prompt Version Control Template
Version your LLM prompts with eval scores, change history, rollback support, and A/B testing. Includes prompt metadata schema, changelog format, evaluation tracking, and CI/CD integration for prompt management.