Seven Failure Points When Engineering a Retrieval Augmented Generation System
- Publication
- CAIN 2024Conference
- First submitted to arXiv
- arXiv:2401.05856
Cite this paper · BibTeX
The citation identifies the linked source version. It cites the original paper and its authors.
@misc{retrievalaugmentedgenerationragfailurepoints2024,
title = {{Seven Failure Points When Engineering a Retrieval Augmented Generation System}},
author = {Scott Barnett and Stefanus Kurniawan and Srikanth Thudumu and Zach Brannelly and Mohamed Abdelrazek},
year = {2024},
eprint = {2401.05856},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2401.05856}
}
In 2023, putting together a RAG demo was easy enough.
Split the documents into chunks, compute embeddings, and put them in a vector database. When a question arrives, retrieve the closest chunks and send them to ChatGPT alongside the question. In an afternoon, you could show your boss that “AI understands our documents.”
The hard part came afterward.
This paper comes from the Applied Artificial Intelligence Institute at Deakin University in Australia. It introduces no new model and sets no new benchmark record. Instead, it is an experience report in which the authors built three RAG systems and organized the failures they encountered into seven categories.
Defining the Problem
The authors begin with three things RAG is meant to accomplish:
- Reduce hallucinations: have the model answer from documents rather than improvise.
- Provide sources: let users see which document an answer comes from.
- Avoid annotation: use semantic search directly, without manually adding metadata to every document.
But RAG also inherits weaknesses from both sides. Information retrieval systems retrieve the wrong material or miss relevant material, and large language models misread it or give bad answers.
The authors therefore ask two questions:
- Where can a RAG system fail during engineering?
- What should engineers watch for?
Solving the Problem
Three Case Studies
The report draws on three systems:
| Case | Domain | Documents | Scale | Example question |
|---|---|---|---|---|
| Cognitive Reviewer | Research | PDFs | No limit | What are this paper's key points? |
| AI Tutor | Education | Videos, HTML, PDFs | 38 docs | What topics were taught in week six? |
| BioASQ | Biomedicine | PDF papers | 4,017 docs | What is pseudotumor cerebri, and how is it treated? |
Adapted from Table 1 of the paper.
Cognitive Reviewer helps researchers read the literature. A user enters a research question and uploads a set of papers; the system ranks them against the research objective and supports questions across the entire collection. Users upload the documents at runtime, so developers cannot check their quality in advance.
AI Tutor acts as a teaching assistant. Students ask questions, and the system answers from the course materials with citations. Videos are transcribed with Whisper before being chunked. A rewriter uses the conversation history to turn vague follow-ups such as “Explain that concept again” into complete queries. The system was developed from August to November 2023 and piloted from October 30 in a course with about 200 students.
Both systems were used at Deakin University. Confidentiality constraints meant that only the third case released its data and code.
BioASQ was built to test a larger collection. The authors downloaded 4,017 open-access papers from the BioASQ biomedical question-answering dataset, used GPT-4 to answer 1,000 questions, and scored the answers automatically with OpenAI's evals tool. They manually checked answers marked incorrect and a subset of those marked correct.
In this domain, they found automatic scoring stricter than human scoring. They also pointed out that the human reviewers were not biomedical experts and that the language model might know more than they did, which weakens the validity of the scoring.
RAG's Two Processes
Before looking at the failures, let us read the authors' pipeline diagram. The red boxes mark the seven failure points.

The upper Index Process usually runs during development. A Chunker splits documents into smaller pieces, each piece is turned into an embedding, and the embeddings are stored in a database.
Even here, the decisions are difficult. Chunks that are too small cannot answer some questions; chunks that are too large bring noise into the answer. Changing the embedding model requires reindexing all documents.
The lower Query Process runs at runtime and passes through five stages:
- Rewriter: a language model rewrites the question into a generalized query, optionally using the conversation history.
- Retriever: the query embedding retrieves the top most similar chunks.
- Reranker: the chunks are reordered to bring those containing the answer toward the front.
- Consolidator: the content that will enter the prompt is assembled. This stage exists because the APIs of the time had token and rate limits. When all snippets cannot fit, the system must select, combine, or chain multiple prompts.
- Reader: the model filters noise from the prompt, follows formatting instructions, and generates the final answer.
One Question, Seven Ways to Go Wrong
Take AI Tutor's example question, “What topics were taught in week six?” We can follow it through the pipeline to see where each failure occurs.
FP1: Missing Content. The week-six materials were never uploaded. Ideally, the system should answer, “Sorry, I don't know.” But when a question is close to existing content, it may be fooled into inventing an answer.
FP2: Missed the Top Ranked Documents. The week-six slides are in the database, but rank eighth in similarity while the system retrieves only the top five. In principle, all documents can be ranked; in practice, only the top proceed downstream.
FP3: Not in Context. The slides were retrieved, but the Consolidator dropped them to fit the token limit.
FP4: Not Extracted. The slides really are in the prompt, but the model fails to extract the answer. The authors say this commonly happens when the context is noisy or contradictory—for example, when materials from both the old and new semesters are retrieved.
FP5: Wrong Format. The student asks for a bulleted list, but the model writes a paragraph and ignores the formatting instruction.
FP6: Incorrect Specificity. The response contains the answer, but is too general or too detailed. The authors give an educational example: teachers want the answer accompanied by relevant teaching materials. This can also happen when users are unsure how to ask and make the question too broad.
FP7: Incomplete. Week six covered three topics, but the model lists only two, even though the third is in the context. The authors suggest splitting questions such as “What are the key points of documents A, B, and C?” into separate requests.
The first three failures, which happen before the answer reaches the model, are absent material, material that is not retrieved, and material left out of the prompt; the last four, which happen after the model receives it, are failure to extract, wrong format, wrong specificity, and a missing part.
Discussion
Lessons from the Three Cases
The authors collect their lessons in Table 2, linking each to the relevant failure points:
- A larger context improved results. AI Tutor answered more accurately with an 8K context than with 4K. The authors explicitly note that this contradicts earlier findings on GPT-3.5. (FP4)
- Semantic caching can reduce cost and latency. Rate limits and fees become concerns with concurrent users; common questions can be placed in a semantic cache. (FP1)
- Jailbreak attacks can bypass RAG. Research suggests that fine-tuning can weaken a model's safety training, so fine-tuned models used in RAG should be tested. (FP5–7)
- Metadata helps retrieval. Adding filenames and chunk numbers to retrieved content helps the Reader extract the required information. (FP2, FP4)
- On short texts, open-source embedding models can match commercial models. (FP2, FP4–7)
- RAG systems need continuous calibration. Unexpected inputs arrive at runtime, so ongoing monitoring is necessary. (FP2–7)
- Make the RAG pipeline configurable. Chunk size, embeddings, chunking strategy, retrieval strategy, consolidation strategy, context size, and prompts all need adjustment. (FP1, FP2)
- A pipeline assembled piecemeal is not optimal. The authors cite research showing that end-to-end training can improve domain adaptation. (FP2, FP4)
- Performance can only be measured at runtime. Offline evaluation methods such as G-Eval look promising, but require annotated question-and-answer data. (FP2–7)
The final point echoes the abstract's two conclusions:
- RAG systems can only be validated during operation.
- Robustness in a RAG system develops over time; it cannot be fully designed in at the outset.
The reason is practical. RAG works with documents that have not been curated into evaluation material, and developers usually lack ready-made question-and-answer test sets. The actual questions become clear when real users start asking them.
Research Directions Proposed by the Authors
- Chunking and embeddings: should chunks follow punctuation and paragraphs, or semantic boundaries? Their effects on retrieval need systematic comparison. Embedding multimodal content such as tables, images, and formulas remains an open problem too.
- RAG and fine-tuning: fine-tuning trains information into a model and must address who can access what. RAG can add documents at any time and control which snippets users can see. The trade-offs in accuracy, latency, cost, and robustness need systematic comparison.
- Testing and monitoring: generating test questions and answers that reflect a real domain remains an open problem. Each model update can also change latency and performance characteristics.
What to Keep in Mind While Reading
This is an experience report. Its seven failure points are categories distilled from three cases. The paper does not report how frequently each failure occurs, nor compare how much different designs reduce them. The data from the two deployed systems remain confidential; only the BioASQ case is available for examination.
These are also experiences from early 2024, in the GPT-4 era. The Consolidator behind FP3 existed mainly because of token limits; later increases in context length changed the pressure on that stage. That is a subsequent development rather than a finding of the paper, but the timing is useful to bear in mind.
Conclusion
This paper offers a map rather than a new method.
It separates a RAG system into indexing and querying, then marks seven places where it can fail, covering missing content, missing the top-ranked results, omission from context, failure to extract, wrong format, wrong specificity, and an incomplete answer. The first three concern getting the material in front of the model; the last four concern how well the model uses it once it arrives.
The next time your RAG system gets an answer wrong, you can use this map to check the pipeline stage by stage. Does the material exist? Was it retrieved? Was it included? Did the model find the answer?
A better embedding model can fix only some of these problems.
For the rest, you may have to wait until launch and meet them one at a time.