thought leadership

Why RAG Dies on the Real Corpus

14 min read

We spent three weeks tuning the retriever. The bug was the chunker.

A policy document had been split across a paragraph boundary, so the clause the system needed never reached the model in one piece. The retrieval looked broken because that is where the symptom showed up: wrong answer, confident citation, unhappy user. The cause was two stages earlier, in a splitting decision nobody had looked at since launch.

Symptom in one stage, cause in another. That gap is why RAG debugging burns weeks, and why “why did retrieval fail” is usually the wrong first question.

The question that locates the failure

Did the passage holding the answer reach the model in a form it could use?

There are three possible answers, and each one points at a different stage. Maybe the passage never arrived: the index missed it, the retriever missed it, or a filter dropped it. Maybe it arrived damaged: split mid-sentence, or stripped of the table that carried the number. Maybe it arrived whole and the answer is still wrong, which means the model ignored it or answered from memory.

Once you know which answer applies, you know which stage owns the bug. Tuning the prompt, the temperature, or the rerank threshold is downstream work, and it only helps when the stage you are tuning is the broken one. Teams that skip this question tune the stage they can see, which is usually the last one, and the last one is usually fine.

Thirty-three ways it fails

A TrustNLP paper published this year went through 48 studies of RAG systems breaking and organised what it found into 33 distinct failure modes across seven pipeline stages. The count matters less than the spread: failures show up across the whole pipeline, not just in the two stages everyone argues about.

  • Ingestion covers everything that happens before a query exists: documents dropped by the loader or flattened by weak document intelligence, superseded versions kept alive, deleted pages still embedded in the index.
  • Representation is where surviving text gets damaged: chunks that split an answer across a boundary, metadata lost in the split, embeddings that cannot separate near-identical policies.
  • Retrieval owns the query-time misses: the right chunk ranked ninth, the wrong tenant’s document ranked first.
  • Generation is the stage benchmarks measure: the model answers from memory over the evidence, or invents a detail the chunks never contained.
  • Evaluation is the measurement layer: an eval harness whose test set shares the index’s blind spots, metrics that score fluency while the facts rot.
  • Deployment owns the drift: config changes between staging and production, index fragments left disagreeing after a partial rebuild, indexes aging between scheduled runs.
  • Agentic orchestration is the newest family: agent loops that retrieve the same context repeatedly, retries that compound a bad first decision, tool calls that fan out and never reconcile.

The full enumeration, in the paper’s own ordering:

Ingestion
  • F1 Stale / outdated data
  • F2 Missing document coverage
  • F3 Layout parsing errors
  • F4 Multimodality conversion loss
Representation
  • F5 Tokenization fragmentation
  • F6 Embedding drift / mismatch
Retrieval
  • F7 Chunking boundary errors
  • F8 Domain embedding mismatch
  • F9 Multi-hop reasoning gaps
  • F10 Graph RAG trade-offs
  • F11 Low recall / ranking failures
  • F12 Position-of-gold bias
Generation
  • F13 Hallucination despite context
  • F14 Conflicting info unresolved
  • F15 Incomplete / partial answers
  • F16 Incorrect specificity
  • F17 Wrong output format
Evaluation
  • F18 Metric inadequacy
  • F19 Lack of continuous monitoring
Deployment
  • F20 Latency / cost bottlenecks
  • F21 Audability gaps
  • F22 Domain portability degradation
  • F23 PII / compliance leaks
  • F24 Prompt sensitivity
  • F25 AuthZ policy failures
Orchestration
  • F26 Planning failures
  • F27 Tool execution errors
  • F28 Context memory degradation
  • F29 Multi-agent coordination failures
  • F30 Recursive hallucination cascades
  • F31 Unbounded cost / latency spirals
  • F32 Unsafe reasoning chains
  • F33 Attribution & governance gaps

Most stories about broken RAG are retrieval and generation stories, because those are the stages the demo exercises. The taxonomy’s quieter finding is that production systems break everywhere else too, and the literature has barely looked.

The seven pipeline stages of a RAG system from ingestion to orchestration, with symptom markers at the visible ends and cause markers buried in the middle The TrustNLP taxonomy spans seven stages; the studied failures sit at the ends, the production failures sit in between

The symptom is not where the cause lives

The second study is more recent and harder to sit with. An October paper pulled 654 real configuration issues from the issue trackers of ten production RAG systems, and found that the stage where a symptom shows up is often not the stage where its cause sits. Symptoms collect at the ends of the pipeline, where users and tests can see them. Causes collect in the middle and in the seams between components, where nobody is looking.

Say the answer comes back wrong. What you see is a bad generated sentence. What caused it is often a setting three components earlier: a chunk size picked for a different document type, a similarity threshold copied from the quickstart, a retriever default that survived the move to a real corpus, a permissions field renamed between versions. Ten systems, 654 issues, and the pattern that repeats is parts that were each reasonable on their own.

A wrong-answer symptom glowing at the generation end of a pipeline while the real cause marker sits upstream at ingestion The stage the user sees and the stage holding the bug are usually different places

A RAG system is glue code between components that were never designed for each other: a document store, an embedding model, a vector index, a prompt, a generator. The bugs live at the joints.

The unstudied half

Of the 33 modes, the TrustNLP authors mark 12 as having no dedicated peer-reviewed study, and every mode in agentic orchestration, F26 through F33, lacks a peer-reviewed benchmark. Retrieval and generation are well covered because benchmarks can measure them and papers can publish them. Representation, evaluation, deployment, and orchestration are not, and those are the stages where production systems spend their failure budget.

An index fragmenting across rebuilds does not make a benchmark. A permissions layer quietly degrading what the retriever may see does not make one either, which is why we treat permission-aware retrieval as a retrieval constraint rather than a UI filter. The drift between a staging config and a production one produces no papers at all. These failures are common in operations and nearly absent from the literature, so they keep surprising the teams that own them.

The check-first table

In practice this becomes a check order: map the symptom to its most likely stage and check there before tuning anything, the cheap high-probability check ahead of the expensive one.

SymptomLikely stageCheck first
Confident answer, wrong factsRetrieval or representationDid the right chunk make the top-k, and was it whole?
Vague, hedged answerRepresentationAre chunks splitting the evidence across boundaries?
Answer cites a deleted or old documentIngestionDid the delete or supersede event reach the index?
Answer ignores a source you know existsRetrievalIs the chunk indexed, permitted, and ranking in top-k?
Answer covers part of the questionRetrieval or generationDid retrieval return for each sub-question, or did the model compress?
Another tenant's data in the answerIngestion or retrievalAre permission filters applied at query time, not after?

Take the third row, the deleted-document citation. The symptom shows at generation: an answer built on a source that now returns 404. But the check order runs upstream first. The document is still in the index, and so is its replacement, because the supersede event never reached the index; the retriever ranked the version it had. The fix lives at ingestion, a lifecycle hook that makes deletion and supersession events the index consumes. Symptom at generation, cause at ingestion, the same gap the config study measured across 654 issues.

Two of these six map cleanly to a named retrieval pattern. The other four are plumbing: lifecycle events, chunking decisions, permission filters, index state. Patterns fix named failures in the retrieval and generation stages. The corpus kills systems in the stages before those patterns get a turn.

The bugs are upstream

Ingestion is half the system, and it gets a fraction of the attention. The corpus you ship is alive. Documents get superseded while their ancestors stay embedded. Chunks inherit splitting decisions made before anyone knew what users would ask. Metadata that would have caught a stale answer gets dropped at load time, when dropping it was free.

A better reranker only re-orders what the index gives it, so it cannot repair a system that cannot tell current from superseded. Citation-strict generation cannot save an answer whose citation points at a ghost. Grounding means nothing when the evidence itself is wrong.

This is the piece the Retrieval Patterns series links back to from every post. Each pattern there fixes a named failure at a specific stage, and this post is the map of where stages break. Knowing the map first is how you pick the right fix.


Working With Flytebit

At FLYTEBIT TECHNOLOGIES, RAG development is a structured engagement rather than a workshop and a tool licence.

The diagnostic order above is how we run it: locate the stage before pricing the fix. Teams that arrive having already bought a bigger model or an agentic layer tend to learn the index was the problem at invoice time. The feasibility study exists to run that check on your corpus before the budget does. When the cause does sit in the deciding layer, the build needs the same discipline: decision records per step and traces you can replay, the governed version. The RAG vs agentic AI guide covers when that machinery earns its cost.

We run these pipelines in our own products. PASSR reviews every pull request against context retrieved from the repository; a stale index there means reviews grounded on yesterday’s code. DOCKR regenerates documentation when the codebase changes, the same lifecycle discipline this post argues the index needs. TESTR builds test cases from retrieved source behavior, where an eval loop that shares the index’s blind spots passes stale code forever.


Ready to get started?


The series this post feeds:

👉 Retrieval Patterns: From Naive RAG to Agentic Retrieval

Nineteen named patterns grouped by the failure each one fixes, the fixes this post’s stage map points at.

When the failure sits in the deciding layer:

👉 RAG vs Agentic AI vs Agentic RAG: Which Does Your System Need?

The buyer guide for deciding whether the loop layer earns its cost.

The measurement side:

👉 Evaluating Agentic AI: Why Pass/Fail Tests Don’t Work for Agents

The evaluation-stage discipline: golden sets, pass^k scoring, and harnesses that grade their own work.


Key takeaways

  • ✅ Locate the clause, not the stage you can see: did the passage holding the answer reach the model in a form it could use?
  • ✅ 33 modes, seven stages: failures distribute across the whole pipeline, not just retrieval and generation
  • ✅ Symptom and cause sit in different stages: 654 real issues say the visible failure is usually downstream of the bug
  • ✅ 12 of 33 modes are unstudied: representation, evaluation, deployment, and orchestration is where production systems spend their failure budget
  • ✅ Check the likely stage first: the cheap high-probability check ahead of the expensive one
  • ✅ Ingestion is half the system: lifecycle events, chunking decisions, and dropped metadata kill more systems than ranking does

Frequently Asked Questions

Why do RAG systems fail in production?

Because a production corpus is alive and the demo corpus was not. Documents get deleted and superseded, chunks split policies mid-sentence, permissions drift, and indexes fragment across reindex runs. The model is usually fine. The failure sits in the pipeline around it, most often in the stages before retrieval ever runs.

What are the most common RAG failure modes?

The taxonomy behind this post organizes 33 named failure modes across seven pipeline stages: ingestion, representation, retrieval, generation, evaluation, deployment, and orchestration. The ones production teams hit first are stale or superseded documents in the index, chunks that split the answer across boundaries, near-miss chunks that outrank the right one, and citations that point at evidence the user cannot verify.

How do you debug a RAG system?

Start with one question: did the passage holding the answer reach the model in a form it could use? If the passage never arrived, the problem is retrieval or ingestion. If it arrived mangled, the problem is chunking and representation. If it arrived whole and the answer is still wrong, the problem is the prompt or the model. The empirical warning is that the stage showing the symptom is frequently not the stage holding the cause, so check upstream before tuning what you can see.

Are RAG failures usually model failures?

No. The largest empirical study of real-world RAG configuration issues, 654 issues across ten production systems, found the failures concentrate in the plumbing: pipeline configuration, index state, and the seams between components. Changing models rarely fixes a system whose problem is a stale index or a chunker cutting evidence in half.

Can better retrieval patterns prevent these failures?

Some of them. A reranker fixes near-miss ranking, hybrid search fixes missed exact terms, and permission-aware retrieval fixes access leakage. But stages matter more than patterns here: a retrieval-stage fix cannot repair an ingestion-stage failure. Name the stage holding the cause first, then reach for the pattern that matches it.

#RAG#RetrievalAugmentedGeneration#ProductionAI#AIEngineering#Debugging#LLM
Jayaveer Bhupalam

Written by

Jayaveer Bhupalam

Founder · Chief Technology Officer · AI & Digital Transformation Leader

Ready to Transform Your Business with AI?

Let's discuss how Agentic AI and intelligent automation can help you achieve your goals.