Book a free call

Why RAG Systems Fail: 6 Causes and How to Fix Them

Most RAG systems fail for fixable reasons: weak retrieval, poor chunking, no evaluation and unclear ownership. Here are the six causes and how to catch them.

Hertiv engineering teamReviewed by a senior engineer
7 min read
Why RAG Systems Fail: 6 Causes and How to Fix Them
On this page

Short answer

RAG systems usually fail because the retrieval step returns the wrong documents, so the model answers from weak or missing context. The other common causes are poor chunking, stale or messy source data, prompts that ignore the retrieved text, no evaluation of answer quality, and costs or delays that grow as usage rises.

What is a RAG system, and why does it fail?

A RAG system is an AI application that searches a knowledge base for relevant documents and passes them to a language model before it answers. The idea is simple: the model should answer from your documents, not from memory.

It fails when any link in that chain breaks. The search returns the wrong pages, the text is cut into pieces that lose their meaning, the documents are out of date, or the model ignores what it was given and answers from memory anyway. Users then get confident answers that are wrong, and trust in the system drops fast.

Most failures are not model failures. The model is usually doing its job. The failure sits in the data, the retrieval setup or the way the team measures quality. That is good news, because those parts are fixable without changing the model at all.

CauseWhat users seeThe fix
Weak retrievalAnswers miss the right documentTune search, add filters and metadata
Bad chunkingAnswers use half a sentenceSplit by meaning, not by fixed size
Stale source dataOld prices, old policiesSync on a schedule and date every page
Prompt ignores contextModel answers from memoryInstruct it to use only the given text
No evaluationNobody knows it is failingTest a fixed question set weekly
Cost and latencySlow answers, rising billsCache, trim context and set limits

The rest of this article works through each cause in turn, starting with retrieval, because it decides everything else. Teams building their first system can start with RAG development guidance on the basic architecture before tuning any single part.

Why retrieval quality decides everything

Retrieval quality decides everything because the model can only answer from what it is given. If the search returns the wrong documents, even a perfect model gives a wrong answer.

Common retrieval problems are easy to spot once you look. The search matches keywords but misses meaning, so a question about refunds returns a page about returns. Or it returns the most popular page instead of the most relevant one. Or it returns five pages when only one matters, and the model has to guess which one to trust.

Fixes start with the data, not the search settings. Add clear titles, dates and categories to each document so the search can filter by them. Then test different search methods: keyword search, vector search and a mix of both, and compare them on the same questions. A small test set of 50 real questions is enough to see which method wins.

Another useful step is to return fewer, better documents. Three strong pages beat ten weak ones, because the model has less noise to sort through. Set a relevance cut-off so that documents below it are dropped instead of passed along.

How chunking and source data shape answers

Chunking and source data shape answers because the model reads chunks, not whole documents. If a chunk cuts a sentence in half or separates a number from the sentence that explains it, the model reads a fragment and may fill in the missing part itself.

Good chunking follows meaning. Split documents at headings, paragraphs or natural breaks, and keep related sentences together. A chunk of 300 to 500 words usually works for policy and support documents, but the right size depends on the content. Overlap the chunks slightly so that a point near a boundary appears in full in at least one chunk.

Source data matters just as much. Documents full of old versions, duplicate pages and internal jargon produce confused answers. Before indexing, remove duplicates, mark the current version of each document, and add a date to every page so the model and the user can see how fresh the answer is.

Ownership is the part teams forget. Someone must own each document set and keep it current, or the knowledge base slowly rots. A monthly review of the most-used documents is a small job that prevents most staleness problems. For teams weighing RAG against other approaches, RAG vs fine-tuning explains when each one fits.

How do you evaluate a RAG system before users do?

You evaluate a RAG system by testing it against a fixed set of real questions and checking whether the answers are correct, grounded in the retrieved documents and complete enough to act on.

Build the test set from real user questions, not from questions the team invents. Take 50 to 100 questions from support tickets, chat logs or sales calls, and write down the correct answer for each one from the source documents. Run the same set every week, so improvements and regressions are both visible.

Score each answer on three points: is it correct, does it cite or match the retrieved text, and does it answer the whole question. A simple pass or fail on each point is enough. The score that matters most is the share of answers that are grounded in the retrieved documents, because ungrounded answers are the ones that invent facts.

Also test the hard cases on purpose: questions with no answer in the documents, questions about old policies, and questions that use the wrong words for the right thing. A good system says it does not know or asks for clarification, instead of guessing. For a full evaluation approach, see how to build a RAG chatbot, which covers testing as part of the build.

What about prompts, cost and latency?

Prompts, cost and latency are the three problems that appear after retrieval is fixed, and each has a straightforward answer once the team knows what to look for.

Prompts fail when they let the model answer from memory. Tell the model to use only the text it was given, to say it does not know when the text has no answer, and to quote the relevant part of the source. Short, direct instructions work better than long lists of rules.

Cost grows when every question pulls large amounts of context. Retrieve fewer documents, cache answers to repeated questions, and set a limit on how much text goes into each request. Most systems answer well with three to five retrieved chunks, not twenty.

Latency comes from the same places: slow search, large context and slow models. Measure each step separately so you know which one to fix. A slow search needs better indexing, while a slow model needs smaller context or a faster model for simple questions.

Example (hypothetical): a support chatbot that kept inventing answers

Example (hypothetical): a software company launches a support chatbot over its help centre. In the first month, users ask 200 test questions, and the team checks the answers by hand.

The results are poor: 120 answers are correct, 48 are partly right and 32 are wrong. The wrong answers mostly invent prices and policy details that are not in the help centre at all. The team traces the problem to retrieval: the search returns the most popular pages, not the most relevant ones, and the model fills the gaps from memory.

The fix takes three weeks. The team rewrites the help centre titles, splits long pages into meaning-based chunks, and changes the search to return the three best matches instead of ten. It also adds a test set of 100 real questions and runs it every week.

After the fix, the same 200 questions score much better: 168 correct, 24 partly right and 8 wrong. The 8 wrong answers are all questions with no answer in the help centre, so the team adds a clear message for those cases instead of letting the model guess.

What are the common mistakes?

The most common RAG mistakes are indexing everything without cleaning it, never testing with real questions, and treating the launch as the end of the work.

  • Indexing raw documents. Duplicates, drafts and out-of-date pages all end up in the search results. Clean the source first.
  • Fixed-size chunking. Cutting text every 500 characters splits sentences and tables. Split by meaning instead.
  • No test set. Without a fixed set of questions, the team cannot tell whether a change helped or hurt.
  • Trusting the first demo. A demo with five easy questions says nothing about real usage. Test with messy, real questions.
  • No owner for the data. Knowledge bases go stale without an owner. Assign one person per document set.
  • Ignoring the no-answer case. Every system meets questions it cannot answer. Plan for that, or the model will invent one.

Key takeaways

  • Most RAG failures sit in retrieval, chunking or data quality, not in the model
  • Three strong retrieved documents beat ten weak ones
  • Split text by meaning, date every page and remove duplicates before indexing
  • A fixed test set of real questions, run weekly, shows whether changes help or hurt
  • A good system says it does not know when the documents have no answer

Frequently asked questions

What is RAG, in simple terms?

RAG, or retrieval-augmented generation, is a way to make a language model answer from your own documents. The system searches a knowledge base for relevant pages, passes them to the model, and the model writes its answer from that text instead of from memory alone.

Why does my RAG system invent facts?

It invents facts when the retrieved documents do not contain the answer, or when the prompt lets the model answer from memory. The fix is to improve retrieval, instruct the model to use only the given text, and add a clear response for questions with no answer in the documents.

How many documents should retrieval return?

Three to five strong documents is a good starting point for most systems. More documents add noise and cost, while fewer risk missing the right page. Test different counts on your own question set and pick the number with the best grounded-answer rate.

Should I use keyword search or vector search?

Both have strengths, and a mix of the two often works best. Keyword search is good for exact terms, codes and names, while vector search is good for meaning and paraphrase. Compare them on the same test questions before choosing.

How do I know if my RAG system is good enough?

Run a fixed set of real user questions every week and score the answers for correctness and grounding. When most answers are correct and grounded, and the system handles no-answer questions honestly, it is ready for wider use.

Is RAG better than fine-tuning?

They solve different problems. RAG is better when the knowledge changes often or must be cited, because you can update documents without retraining. Fine-tuning is better when the task needs a consistent style or behaviour. Many teams use both, as explained in the guide on RAG vs fine-tuning.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: AI and agent systems in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Building a RAG system that stays accurate? Talk to Hertiv.

A senior engineer replies within one business day. Or see our RAG Development service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to [email protected].

Prefer email? Write to [email protected]
Estimate costBook a call