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.
翻译:软件工程师越来越多地采用一种名为检索增强生成(RAG)的策略来为应用程序添加语义搜索能力。RAG系统涉及查找与查询语义匹配的文档,然后将这些文档传递给大型语言模型(LLM,如ChatGPT)以利用LLM提取正确答案。RAG系统旨在:a)减少LLM生成幻觉响应的问题,b)将来源/参考文献链接到生成的响应,以及c)消除为文档标注元数据的需要。然而,RAG系统受到信息检索系统固有局限性以及对LLM依赖性的影响。在本文中,我们基于来自三个不同领域(研究、教育和生物医学)的案例研究,报告了RAG系统的失败点经验。我们分享了经验教训,并提出了设计RAG系统时需考虑的7个失败点。从我们的工作中得出的两个关键要点是:1)RAG系统的验证仅在运行过程中可行,2)RAG系统的鲁棒性是通过演变而非初始设计实现的。最后,我们为软件工程社区列出了关于RAG系统的潜在研究方向。