Seven Failure Points When Engineering a Retrieval Augmented Generation System
Authors:
- Scott BarnettSBScott Barnett
- Stefanus KurniawanSKStefanus Kurniawan
- Srikanth ThudumuSTSrikanth Thudumu
- Zach BrannellyZBZach Brannelly
- Mohamed AbdelrazekMAMohamed Abdelrazek
Preprint
Abstract
Software engineers are increasingly adding semantic search capabilities to applications using a strategy known as Retrieval Augmented Generation (RAG). A RAG system involves finding documents that semantically match a query and then passing the documents to a large language model (LLM) such as ChatGPT to extract the right answer using an LLM. RAG systems aim to: a) reduce the problem of hallucinated responses from LLMs, b) link sources/references to generated responses, and c) remove the need for annotating documents with meta-data. However, RAG systems suffer from limitations inherent to information retrieval systems and from reliance on LLMs. In this paper, we present an experience report on the failure points of RAG systems from three case studies from separate domains: research, education, and biomedical. We share the lessons learned and present 7 failure points to consider when designing a RAG system. The two key takeaways arising from our work are: 1) validation of a RAG system is only feasible during operation, and 2) the robustness of a RAG system evolves rather than designed in at the start. We conclude with a list of potential research directions on RAG systems for the software engineering community.Keywords
All Related Versions
This publication has 7 references indexed in Scilit:
- Large Language Models for Information Retrieval: A SurveyACM Transactions on Information Systems, 2025
- Benchmarking Large Language Models in Retrieval-Augmented GenerationProceedings of the AAAI Conference on Artificial Intelligence, 2024
- BioASQ-QA: A manually curated corpus for Biomedical Question AnsweringScientific Data, 2023
- Improving the Domain Adaptation of Retrieval Augmented Generation (RAG) Models for Open Domain Question AnsweringTransactions of the Association for Computational Linguistics, 2023
- G-Eval: NLG Evaluation using Gpt-4 with Better Human Alignment2023
- Self-adaptive Machine Learning Systems: Research Challenges and Opportunities2022
- Leveraging Passage Retrieval with Generative Models for Open Domain Question Answering2021