Production RAG failures usually cluster into 12 categories. Many engineering teams monitor only the infrastructure-visible subset.
That gap is why RAG systems that pass all internal benchmarks still degrade in production — often quietly, without a single alert firing. The failures that go undetected tend to be the ones that look like the system is working. Documents are returned. Answers are generated. Latency is within SLA. The problem is that the documents are wrong, the answers are not grounded in them, and the latency is about to spike.
This taxonomy names 12 recurring failure modes, groups them by where in the pipeline they originate, and gives you the detection method and fix complexity for each. If you are running a RAG system in production and you have only instrumented latency, error rate, and basic hit rate, you have blind spots.
Why Most Teams Only Monitor 3
Production observability for RAG systems tends to cluster around what is easy to measure: end-to-end latency, error rate, and approximate retrieval hit rate. These are necessary but not sufficient. They catch infrastructure problems. They do not catch semantic failures.
A semantic failure is when the pipeline executes correctly — no exceptions, no timeouts — but the answer is wrong. The wrong document was retrieved. The right document was retrieved but the generated answer did not use it faithfully. The index was current at one point, but the source document changed afterward.
Semantic failures require semantic instrumentation: groundedness scoring, retrieval precision measurement, index freshness checks, and embedding consistency validation. These are harder to build and harder to automate, which is why most teams skip them until a user files a ticket about a factually incorrect answer.
The failure modes that often evade standard alerts — hallucination despite context, embedding drift, and silent degradation — share one structural property: they require a dedicated evaluation layer to detect, not infrastructure monitoring alone.
The 12 Failure Modes
| # | Failure Mode | Category | Detection Method | Severity | Fix Complexity |
|---|---|---|---|---|---|
| 1 | Wrong documents retrieved | Retrieval | Retrieval precision@k evaluation against labeled queries | High | Medium — reranker, query expansion, or index restructure |
| 2 | Missing documents (gap failure) | Retrieval | Recall@k evaluation; known-answer test set | High | Medium — chunking strategy, overlap parameters, or hybrid search |
| 3 | Stale index | Retrieval | Index freshness tracking; document update timestamp vs index timestamp delta | High | Low — scheduled reindex or event-driven update pipeline |
| 4 | Hallucination despite context | Generation | Groundedness scoring; claim-level citation verification | Critical | High — prompt engineering, critic agent, or model swap |
| 5 | Context window overflow | Generation | Token count logging per request; truncation alerts | Medium | Low — chunk size reduction, top-k reduction, or map-reduce pattern |
| 6 | Citation drift | Generation | Source-answer alignment scoring; document ID tracking through to output | High | High — structured citation format enforcement plus groundedness gate |
| 7 | Chunk boundary errors | Ingestion | Manual inspection of retrieved chunks; semantic coherence scoring | Medium | Medium — semantic chunking, overlap tuning, or document-structure-aware splitters |
| 8 | Embedding drift | Ingestion | Model version mismatch detection; embedding space consistency check | Critical | High — full corpus reindex required on model upgrade |
| 9 | Metadata loss | Ingestion | Metadata field presence audit in stored vectors; filter test suite | Medium | Low — ingestion pipeline fix plus reindex for affected documents |
| 10 | Latency spikes | Operational | p95/p99 latency tracking by pipeline stage; vector DB query profiling | Medium | Medium — index optimization, ANN parameter tuning, or caching layer |
| 11 | Cost inflation | Operational | Per-request token spend tracking; context size distribution alerts | Medium | Low — context budget enforcement; chunk count caps |
| 12 | Silent degradation | Operational | Automated retrieval quality regression on fixed evaluation set; scheduled diff | Critical | High — requires evaluation infrastructure that most teams do not have |
Retrieval Failures: The Foundation Layer
Retrieval failures are common and comparatively easy to instrument for, yet they remain underdiagnosed in many production systems. The reason is that teams evaluate retrieval during development against a small, well-curated corpus and then deploy without reassessing as the corpus grows and diversifies.
Wrong documents retrieved (Failure 1) is a precision problem. The system returns documents that are topically adjacent but not actually relevant to the specific query. A query about quarterly revenue recognition returns documents about revenue attribution more broadly. The answer looks plausible because the domain matches. The LLM fills the gap with inference.
The detection mechanism is straightforward: maintain a labeled query set with ground-truth relevant document IDs, run precision@k on a fixed cadence, and alert when it drops below your baseline. The fix depends on diagnosis — a reranker addresses ordering failures, query expansion addresses narrow embedding matches, and index restructuring addresses domain-specific retrieval gaps.
Missing documents (Failure 2) is a recall problem. The system fails to retrieve a document that would have answered the query correctly, so the LLM either fabricates an answer or returns a low-confidence response. This frequently traces back to chunking strategy: a document that answers a question is split at a boundary that separates the question-relevant content from the rest of the document.
The production-ready RAG pipeline checklist covers chunk overlap parameters in detail, but the diagnostic signal for Failure 2 is a known-answer test: take a representative set of questions with known source documents, run retrieval, and check whether the correct document appears in the top-k results.
Stale index (Failure 3) is operationally the simplest failure and organizationally the hardest to prevent. Source documents are updated — a policy changes, a price list is revised, a technical specification is amended — but the index is not updated on the same schedule. The RAG system answers confidently from the old version.
The fix is a freshness tracking system: log the last-modified timestamp of every source document and the last-indexed timestamp of its corresponding chunks, and alert when the delta exceeds your freshness SLA. For SharePoint and Confluence sources specifically, the ingestion architecture decisions around event-driven reindexing are worth reviewing before committing to a polling approach.
Generation Failures: When Retrieval Is Right but the Answer Is Wrong
Generation failures are more expensive to detect and more expensive to fix. They require semantic evaluation rather than infrastructure metrics, and they often require changes to the generation step that add latency and complexity.
Hallucination despite context (Failure 4) is the failure mode that gets the most attention and the least systematic treatment. Teams add a note to the system prompt (“only use the provided context”) and consider the problem addressed. It is not.
LLMs hallucinate in RAG systems for specific, diagnosable reasons: the retrieved context is partially relevant but not fully sufficient, so the model fills gaps with parametric knowledge; the prompt does not enforce strict grounding; or the context is long enough that the model fails to attend to the specific relevant passage. Each mechanism requires a different fix.
A critic agent — the self-correcting RAG pattern — addresses this by adding a groundedness verification step after generation. If the generated answer contains claims not supported by the retrieved context, the pipeline rerouts rather than returning the answer. This verification step adds latency, but in high-stakes domains that overhead is often the correct trade-off.
Context window overflow (Failure 5) is the most mechanical failure on this list. When the total token count of retrieved chunks plus system prompt plus query exceeds the model’s context window, the pipeline either truncates silently or throws an error. Silent truncation is worse: the model answers from an incomplete context and has no way to signal that relevant information was cut off.
The fix is a context budget: set a maximum token allocation for retrieved chunks, enforce it at the retrieval step rather than at generation time, and log the token distribution per request so you can see when your average context size is creeping toward the limit. A map-reduce pattern — summarizing each chunk independently before combining — is the architectural solution when top-k cannot be reduced.
Citation drift (Failure 6) is a precision failure at the citation level. The system retrieves document A and document B, generates an answer, and correctly names document A as its source — but the specific claim in the answer actually came from the model’s parametric knowledge, not from document A’s content. The citation is present but inaccurate.
This is one of the hardest failures to detect automatically. It requires claim-level attribution: identifying each factual claim in the generated answer, tracing it to its cited source chunk, and verifying that the chunk actually supports the claim. LangSmith’s evaluation framework and Arize Phoenix both support variants of this, though they require domain-specific rubrics to be reliable.
Ingestion Failures: Problems Built Into the Foundation
Ingestion failures are written into the system at pipeline construction time and are often invisible until they compound with other failures. They are also the most expensive to fix in a running system because they typically require a full or partial reindex.
Chunk boundary errors (Failure 7) occur when the chunking strategy splits documents at semantically wrong boundaries. A table is split across two chunks. A numbered list is separated from its header. A paragraph that provides the context for the next paragraph is in chunk N, but the specific claim being searched for is in chunk N+1 without its context.
Chunk boundary errors degrade retrieval precision even when the right document is in the index, because the chunk that gets retrieved is not self-contained enough to support the answer. Detection requires manual inspection of a random sample of retrieved chunks for your top query categories, plus semantic coherence scoring if you have the evaluation infrastructure. The fix is a combination of semantic chunking (respecting document structure), overlap tuning, and in some cases document-structure-aware splitters that understand HTML or Markdown formatting.
Embedding drift (Failure 8) is operationally disruptive. When an engineering team upgrades their embedding model — moving between embedding model families, for example, or switching providers — queries run through the new model can produce vectors in a different embedding space than the stored document vectors. Cosine similarity between a new-model query vector and an old-model document vector may no longer be meaningful.
The failure presents as sudden, unexplained retrieval degradation after an infrastructure change. If your embedding model is managed by a third party, it can present as a spontaneous degradation if the provider silently updates the underlying model.
The prevention is model version pinning and a full corpus reindex as part of any embedding model upgrade. The detection is an embedding consistency check: periodically verify that a fixed set of query-document pairs produces similarity scores consistent with baseline.
Metadata loss (Failure 9) is an underappreciated ingestion failure. Vector databases store embeddings plus metadata — document ID, source URL, date, access control labels, content type. When metadata is dropped or corrupted during ingestion, metadata-filtered retrieval fails silently: queries that should be scoped to a recent document window, or to documents a particular user has access to, return results from the full unfiltered corpus.
Metadata loss often traces to schema mismatches in the ingestion pipeline: a field name that changed in the source system, a null value that was not handled, or a type mismatch that caused silent coercion. The detection mechanism is a metadata field presence audit: run a periodic scan of stored vectors and verify that all expected metadata fields are populated within expected ranges.
Operational Failures: System-Level Decay
Operational failures are not failures of a single pipeline component. They are emergent properties of how the system behaves under real production conditions: real query distributions, real corpus sizes, real usage volumes, and real time elapsed since initial deployment.
Latency spikes (Failure 10) in RAG systems rarely trace to a single cause. They are typically the product of vector database query time increasing as the index grows (ANN parameter tuning degrades as the index scales), combined with context assembly overhead increasing as retrieved chunks get longer, combined with LLM generation latency increasing as context size grows.
Diagnosing latency spikes requires stage-level instrumentation: separate latency tracking for the retrieval step, the context assembly step, and the generation step. Without this breakdown, you cannot tell whether the bottleneck is in the vector database, the ingestion pipeline, or the LLM call.
Cost inflation (Failure 11) follows a predictable arc in production RAG systems. Initial deployment has a controlled corpus and a controlled query distribution. As adoption grows, both expand. Longer documents get added to the corpus, producing longer chunks. More diverse queries come in, producing higher top-k retrieval. The average context window per request grows, and so does the per-request LLM cost — without any single change triggering an alert.
A context budget, enforced at the retrieval step, is the most direct control. Track the distribution of context token counts per request, not just the average — the p95 and p99 are where cost inflation actually lives.
Silent degradation (Failure 12) is the failure mode that separates mature RAG deployments from immature ones. The system continues to function. Latency is within SLA. Error rate is zero. But retrieval quality has been declining over multiple evaluation windows because a related but slightly different vocabulary has entered the query distribution, because the corpus has grown in a domain the index was not optimized for, or because a dependency was updated in a way that changed embedding behavior.
Silent degradation is only detectable with a fixed evaluation set: a curated collection of queries with ground-truth relevant documents and expected answer characteristics, run against the production system on a scheduled basis. When the evaluation score on this fixed set drops below threshold, the alert fires — not because something broke, but because quality degraded.
This is the evaluation infrastructure most teams do not build, and it is why silent degradation is rated Critical on this taxonomy. It is not the most catastrophic individual failure, but it is the most likely to persist undetected.
Building the Detection Layer
The 12 failure modes map to four instrumentation layers you need to build in sequence:
- Infrastructure layer: latency by stage (retrieval, context assembly, generation), error rates, token counts per request, context size distribution
- Index health layer: freshness tracking (source update timestamp vs index timestamp delta), metadata field presence audits, embedding model version consistency checks
- Retrieval quality layer: precision@k and recall@k on a labeled query set, with cadence set by risk and corpus change rate
- Groundedness layer: claim-level attribution scoring for a sampled subset of production outputs, citation accuracy tracking, groundedness score distribution over time
- Regression evaluation layer: fixed evaluation set run on a scheduled basis, score trending over time, threshold alerts
- Cost accounting layer: per-request cost tracking by pipeline stage, context budget enforcement, p95/p99 context size alerts in addition to average
- Access control audit layer: for systems with per-user document permissions, periodic verification that metadata-filtered retrieval correctly scopes results to authorized documents
Many teams build the infrastructure layer first. Fewer build the retrieval quality layer. Groundedness and regression evaluation layers often arrive only after a user files a complaint.
The ordering matters: build infrastructure instrumentation first because it gives you the baseline. Build retrieval quality evaluation next because precision and recall gaps surface the most failures fastest. Build groundedness instrumentation third because it requires retrieval to be working reasonably well to be interpretable. Build regression evaluation last because it requires the other layers to give you context on what changed.
A Pydantic Model for RAG Failure Reporting
When you are tracking failures across a production system, structured reporting makes the difference between a useful post-mortem and a wall of logs. Here is a Pydantic model that encodes this taxonomy:
from enum import Enumfrom datetime import datetimefrom typing import Optionalfrom pydantic import BaseModel, Field
class FailureCategory(str, Enum): RETRIEVAL = "retrieval" GENERATION = "generation" INGESTION = "ingestion" OPERATIONAL = "operational"
class FailureMode(str, Enum): WRONG_DOCUMENTS = "wrong_documents_retrieved" MISSING_DOCUMENTS = "missing_documents" STALE_INDEX = "stale_index" HALLUCINATION_WITH_CONTEXT = "hallucination_despite_context" CONTEXT_OVERFLOW = "context_window_overflow" CITATION_DRIFT = "citation_drift" CHUNK_BOUNDARY_ERROR = "chunk_boundary_errors" EMBEDDING_DRIFT = "embedding_drift" METADATA_LOSS = "metadata_loss" LATENCY_SPIKE = "latency_spike" COST_INFLATION = "cost_inflation" SILENT_DEGRADATION = "silent_degradation"
class SeverityLevel(str, Enum): LOW = "low" MEDIUM = "medium" HIGH = "high" CRITICAL = "critical"
class FixComplexity(str, Enum): LOW = "low" # single component change MEDIUM = "medium" # multiple components HIGH = "high" # pipeline restructure or full reindex
class RAGFailureReport(BaseModel): """Structured report for a detected RAG pipeline failure."""
failure_id: str = Field(..., description="Unique identifier for this failure event") detected_at: datetime = Field(..., description="Timestamp when failure was detected") failure_mode: FailureMode = Field(..., description="One of the 12 classified failure modes") category: FailureCategory = Field(..., description="Pipeline stage where failure originates") severity: SeverityLevel = Field(..., description="Impact severity in production") fix_complexity: FixComplexity = Field(..., description="Estimated complexity to remediate")
# Detection context detection_method: str = Field( ..., description="How the failure was detected: metric threshold, evaluation score, user report" ) affected_query_sample: Optional[list[str]] = Field( None, description="Representative queries that triggered or exposed the failure" ) affected_document_ids: Optional[list[str]] = Field( None, description="Document IDs in scope if failure is document-specific" )
# Severity scoring retrieval_precision_delta: Optional[float] = Field( None, ge=-1.0, le=0.0, description="Drop in precision@k from baseline, negative values only" ) groundedness_score: Optional[float] = Field( None, ge=0.0, le=1.0, description="Groundedness score of affected outputs (0=hallucinated, 1=fully grounded)" ) latency_p95_ms: Optional[int] = Field( None, description="p95 latency at time of detection, for operational failures" ) cost_per_request_delta_usd: Optional[float] = Field( None, description="Increase in average per-request cost from baseline, for cost inflation failures" )
# Resolution tracking root_cause: Optional[str] = Field(None, description="Diagnosed root cause after investigation") remediation_action: Optional[str] = Field(None, description="Action taken to resolve") resolved_at: Optional[datetime] = Field(None, description="Timestamp when failure was resolved") reindex_required: bool = Field( False, description="Whether resolution requires a full or partial corpus reindex" )
@property def is_semantic_failure(self) -> bool: """Semantic failures produce no runtime error and require evaluation to detect.""" return self.failure_mode in { FailureMode.HALLUCINATION_WITH_CONTEXT, FailureMode.CITATION_DRIFT, FailureMode.EMBEDDING_DRIFT, FailureMode.SILENT_DEGRADATION, FailureMode.WRONG_DOCUMENTS, FailureMode.MISSING_DOCUMENTS, }
@property def composite_severity_score(self) -> float: """ 0-100 score combining failure severity, detection lag, and semantic vs infrastructure type. Higher = more urgent. """ base_scores = { SeverityLevel.LOW: 20, SeverityLevel.MEDIUM: 40, SeverityLevel.HIGH: 70, SeverityLevel.CRITICAL: 90, } score = float(base_scores[self.severity])
# Semantic failures score higher because they evade standard monitoring if self.is_semantic_failure: score = min(100, score + 10)
# Groundedness failures near zero are maximum priority if self.groundedness_score is not None and self.groundedness_score < 0.3: score = min(100, score + 15)
return scoreThis model structures the output of any failure investigation: what broke, where in the pipeline, how it was detected, and what resolution is required. The composite_severity_score property weights semantic failures higher than their raw severity rating because they are harder to catch and tend to persist longer undetected.
What Audits Find
RAG pipeline audits often reveal the same pattern: teams have strong infrastructure instrumentation, partial retrieval quality measurement, and weak groundedness or regression evaluation. The failures they know about are usually operational. The failures causing user-facing quality problems are often semantic.
The gap is not usually technical. The instrumentation for these failure modes is buildable with available tools. The gap is that retrieval quality evaluation and groundedness scoring require upfront investment in evaluation infrastructure — labeled query sets, ground-truth annotation, scheduled evaluation runs — and teams deprioritize this work until a failure surfaces in a user complaint.
A RAG system without a regression evaluation layer is not production-mature, regardless of its infrastructure quality — because the failures it will not catch are the ones that compound silently over weeks before a user surfaces them.
The enterprise agentic assessment framework includes RAG pipeline evaluation as a first-tier component because the evaluation infrastructure gap is a recurring finding in production RAG reviews.
If you want to understand which of these 12 failure modes are present in your current deployment before they surface in a user complaint, the starting point is a retrieval quality audit against your existing query logs. That is a scoped engagement with a defined deliverable, not an open-ended consulting arrangement.
What are common causes of RAG failures in production?
Common causes include retrieval failures — wrong documents returned, missing documents due to poor chunking, and stale indexes that have not been updated when source documents changed. These are often the easiest to monitor. The failures that cause more surprise are operational failures: silent degradation, latency spikes under load, and cost inflation from runaway context windows.
How do you detect hallucination in a RAG pipeline that has access to source documents?
Hallucination in a RAG system most often shows up as citation drift — the answer is plausible and references the right document, but the specific claim is not supported by the retrieved chunk. Detection requires groundedness scoring: comparing each factual claim in the output against its cited source chunks, not just checking that the document was retrieved. Tools like LangSmith and Arize Phoenix offer automated groundedness evaluation, though a sampled human review at regular intervals remains necessary for high-stakes domains.
What is embedding drift and why does it cause retrieval failures?
Embedding drift occurs when the model used to generate query embeddings at query time differs from the model used to generate the stored document embeddings. This happens when teams update their embedding model without reindexing the existing corpus. The query vector and the document vectors now occupy incompatible semantic spaces, so similarity scores become meaningless and retrieval degrades without any obvious error signal — the system returns documents, they just are not the right ones.
When should a team commission an external RAG audit versus fixing failures internally?
Internal fixes are appropriate when the failure mode is understood and isolated — a stale index, a chunking parameter, a context window overflow. An external audit becomes necessary when teams are seeing degraded retrieval quality they cannot reproduce consistently, when failure modes span ingestion, retrieval, and generation simultaneously, or when the system is making decisions in a regulated domain where the audit trail itself has compliance requirements.
The Decision Rule
Do not tune the model before you classify the failure. If retrieval, generation, ingestion, and operational failure modes are not separated, every fix looks like prompt work and the real defect keeps compounding.