Manuscript Offprint

arXiv:2610.18567

Configuring RAG Systems: What Breaks, Where Originates, and How to Fix

Liangyu Chen, Youpeng Ma, Yulong Ye, Zezhen Xiang, Tao Chen

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

LIANGYU CHEN, University of Electronic Science and Technology of China, China

YOUPENG MA, University of Electronic Science and Technology of China, China

YULONG YE, University of Birmingham, United Kingdom

ZEZHEN XIANG, University of Electronic Science and Technology of China, China

TAO CHEN*, University of Birmingham, United Kingdom

Retrieval-Augmented Generation (RAG) has emerged as a dominant paradigm for improving Large Language Model (LLM) by intertwining it with other components, such as a vector/graph database. Therefore, the resulting RAG systems are often highly configurable, under which a non-trivial amount of failures are related to the configurations. However, there remains a lack of systematic understanding regarding the configuration issues for RAG systems. To bridge this gap, in this paper, we conduct the first large-scale empirical study of 654 real-world configuration issues collected from 10 diverse RAG systems. Drawing on this, we provide a complete categorization of the symptoms, root causes, relevant stages, and fix patterns of configuration issues for RAG systems, as well as several new observations. Our findings not only reveal the characteristics of configuration issues, but also strongly link them to the unique pipeline stages of RAG, e.g., we found that most symptoms can be observed at the early or late stage, while the stage of the root cause might not be at the same stage as where the symptom is identified. We also provide nine actionable insights to the practitioners on testing, localizing, and fixing the configuration issues for RAG systems.

CCS Concepts: • Software and its engineering → Empirical software validation; Software configuration management and version control systems.

Additional Key Words and Phrases: Retrieval-augmented generation, large language models, configuration bugs, misconfiguration

1 Introduction

Large Language Models (LLMs) have witnessed unprecedented growth and evolution in recent years, demonstrating remarkable capabilities across a wide spectrum of tasks [6, 37, 58]. To mitigate the issue of LLM hallucination [27, 35, 40] and outdated knowledge [26, 44], Retrieval-Augmented Generation (RAG) system has emerged as a dominant paradigm [21, 31]. Typically, as a new type of software systems, the RAG systems augment LLMs with external knowledge sources, such as documents, vector databases, and retrieval pipelines, forming the backbone of many question answering systems, developer assistants, and knowledge-based applications [2, 17, 18].

To ensure flexibility, RAG systems are designed to be highly configurable [3, 5, 19, 41, 42]—a key property of many types of software systems. For example, changing the retrieval stride length will significantly affect the quality of the generated text in RAG systems [32]. However, configuration has long been recognized as a critical source of reliability issues in traditional configurable software systems [16, 22–25, 33, 36, 45, 50, 51], RAG systems are of no exception. Yet, the unique complex stages in the pipeline of RAG systems (e.g., indexing, retrieval, and generation) make their configuration even more error-prone [3, 5, 41]. For example, it has been shown that configuration issues of RAG systems (including both configuration bugs and misconfiguration) can

∗^{*}Corresponding author.

Authors' Contact Information: Liangyu Chen, University of Electronic Science and Technology of China, Chengdu, China, cly009@std.uestc.edu.cn; Youpeng Ma, University of Electronic Science and Technology of China, Chengdu, China, myp@std.uestc.edu.cn; Yulong Ye, yxy382@student.bham.ac.uk, University of Birmingham, Birmingham, United Kingdom; Zezhen Xiang, zz.xiang.work@gmail.com, University of Electronic Science and Technology of China, Chengdu, China; Tao Chen, University of Birmingham, Birmingham, United Kingdom, t.chen@bham.ac.uk.

Chen et al.

cause a latency performance degradation of 10×10\times, leading to a two orders of magnitude cost [5]. Another example showcases the complex interaction of configuration options among the RAG stages: a subtle change in the indexing strategy can unexpectedly invalidate assumptions in the retrieval or generation stages, causing significant errors to propagate silently across the pipeline, and hence a system failure. Therefore, understanding the configuration issues of RAG systems and how they have been fixed is in high demand.

Despite the importance, our current knowledge of the configuration issues within RAG systems remains rather limited. While there are prior empirical studies of RAG systems, they focus on two different aspects: either investigates how configuration choices influence system performance [3, 5, 41], typically from a configuration tuning and hyperparameter optimization perspective; or examines failure cases and practical challenges in RAG systems through empirical analyses of observed bugs in general, which are not configuration-related [1, 4, 30]. There has been no systematic study of the configuration issues as the root of RAG systems' failures, particularly with respect to the RAG pipeline.

To bridge this gap, in this paper, we conduct a large-scale empirical study on RAG configuration issues, covering 654 issues and 345 pull requests from 10 RAG systems on GitHub over six person-months. We make several contributions:

• A Categorization: We summarize a comprehensive categorization for configuration issues in RAG systems with respect to its pipeline stages, including five types of symptoms, nine root causes, and six fix patterns.

• Empirical Findings: Our empirical study reveals ten previously unknown findings, the most notable ones are:

– Core pipeline fault, in which failures occurred at a pipeline stage with exceptions, is the predominant symptom of configuration issues in RAG systems.

– For configuration bugs, invocation of external libraries/systems is the most common cause; while resource provision that does not fulfil the needs is the most common reason for user misconfiguration.

– Most of the symptoms occurred at the initialization, indexing and generation stage of RAG systems; while root causes mostly lie in the early stages.

– The stage where the symptom is observed might not necessarily correspond to the stage of the root cause—as observed in one third of the cases.

– When the symptom and root cause deviate at more distant stages (e.g., from initialization to the last stage of generation), the resolving cost (time) of real configuration bugs can increase by up to 2.83×2.83\times.

– Patching the logic and algorithm is the most common fix pattern for configuration bugs.

• Insights: Based on these results, we distil several insights about configuration issues for RAG systems on their testing/detection, localization, and fixing.

All the data and code can be accessed at our repository: https://github.com/ideas-labo/rag-config-bugs.

This paper is organized as follows. Section 2 introduces the background. Section 3 presents our methodology. Section 4 delineates the categorization of configuration-related issues and the findings. Section 5 discusses actionable insights. Section 6 addresses threats to validity. Section 7 reviews related work. Finally, Section 8 concludes the paper.

Figure

Fig. 1. Workflow of RAG with different pipeline stages.

References (28)