Quantifying Document Impact in RAG-LLMs
Armin Gerami, Kazem Faghih, Ramani Duraiswami Department of Computer Science, Umiacs University of Maryland College Park, MD [agerami, Kazemf, ramanid]@umd.edu · 2026
Read Quantifying Document Impact in RAG-LLMs by Armin Gerami, Kazem Faghih, Ramani Duraiswami Department of Computer Science, Umiacs University of Maryland College Park, MD [agerami, Kazemf, ramanid]@umd.edu (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2601-05260.txt.
Introduction
Armin Gerami, Kazem Faghih, and Ramani Duraiswami measure how much each retrieved document actually shapes a retrieval-augmented model's answer in a 2026 paper. Retrieval-augmented generation connects language models to external knowledge, improving accuracy and freshness, but it also imports factual inconsistencies, source conflicts, bias, and security risks. Evaluation lacked any metric telling how much a single retrieved document swayed the final output.
Their Influence Score uses partial information decomposition, a method for splitting information into unique, shared, and combined parts, to quantify each document's effect. Knowing which source drove an answer lets engineers debug bad outputs, drop harmful sources, and audit systems whose answers must be traceable to evidence.
Catalog record
| CREATOR | Armin Gerami, Kazem Faghih, Ramani Duraiswami Department of Computer Science, Umiacs University of Maryland College Park, MD [agerami, Kazemf, ramanid]@umd.edu |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 30 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2601-05260
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Quantifying Document Impact in RAG-LLMs Armin Gerami, Kazem Faghih, Ramani Duraiswami Department of Computer Science, Umiacs University of Maryland College Park, MD [agerami, Kazemf, ramanid]@umd.edu Abstract Retrieval Augmented Generation (RAG) enhances Large Language Models (LLMs) by connecting them to external knowledge, improving accuracy and reducing outdated information. However, this introduces challenges such as factual inconsistencies, source conflicts, bias propagation, and security vulnerabilities, which undermine the trustworthiness of RAG systems. A key gap in current RAG evaluation is the lack of a metric to quantify the contribution of individual retrieved documents to the final output. To address this, we introduce the Influence Score (IS), a novel metric based on Partial Information Decomposition that measures the impact of each retrieved document on the generated response. We validate IS through two experiments. First, a poison attack simulation across three datasets demonstrates that IS correctly identifies the malicious document as the most influential in 86 % 86\% of cases. Second, an ablation study shows that a response generated using only the top-ranked documents by IS is consistently judged more similar to the original response than one generated from the remaining documents. These results confirm the efficacy of IS in isolating and quantifying document influence, offering a valuable tool for improving the transparency and reliability of RAG systems. 1 Introduction Retrieval Augmented Generation (RAG) Lewis et al. 2020 is a natural language processing technique that enables large language models (LLMs) utilize external knowledge. By connecting LLMs to external, up-to-date knowledge sources, RAG systems can generate responses that are more accurate, current, and contextually relevant. This approach has demonstrated considerable promise in mitigating persistent LLM challenges such as knowledge obsolescence and improving factual grounding, as the models can reference verifiable information without necessitating costly retraining cycles. The appeal of RAG is widespread, largely due to its capacity to incorporate the latest information and ground outputs in attributable sources, thereby enhancing the utility of LLMs across diverse applications. While RAG architectures aim to enhance reliability, they concurrently give rise to critical "explainability gaps", where the precise rationale behind a generated output remains opaque. LLMs within RAG frameworks can still produce "hallucinations" or "confabulations"—outputs that are inconsistent with retrieved facts or deviate from common sense, even when grounded An et al. 2025 , Long et al. 2024 . Furthermore, issues such as "source confliction"—sources that have conflicting information, causing vague or contradictory responses Wu et al. 2024a , Liu et al. 2023 , the potential for "bias propagation" from skewed or unrepresentative retrieved documents Wen et al. 2023 , Kim et al. 2025 , Wu et al. 2024b , and "security vulnerabilities" including the injection or amplification of malicious content Verma et al. 2024 , Kaddour et al. 2023 , Zhong et al. 2023 , Xue et al. 2024 , Zou et al. 2024 , continue to undermine system integrity. These problems collectively erode the trustworthiness and robustness of RAG systems, posing considerable risks, particularly in high-stakes domains such as healthcare, finance, and law. To better understand the way retrieval and generation interact, we need tools to analyze this interaction to make RAG more understandable. A significant lacuna in current RAG research and evaluation methodologies is the absence of a metric to quantify how each individual retrieved document contributes to the LLM’s final generated output. While numerous RAG evaluation frameworks assess crucial aspects like retrieval accuracy, contextual relevance, output faithfulness, and coherence, they often do not isolate the specific generative impact of single documents within the retrieved set. We introduce Influence Score (IS), a novel quantitative measure designed to reflect the extent to which each specific retrieved document affects the final generated response. This score is derived using Partial Information Decomposition based on the excluded information metric Kolchinsky 2022 . To validate our proposed metric, IS, we conduct two sets of experiments. First, we perform a poison attack simulation using HotPotQA Yang et al. 2018 , Natural Questions Kwiatkowski et al. 2019 , and MsMarco Nguyen et al. 2016 as the datasets, and as PoisonedRAG Zou et al. our poisoning method. After poisoning the retrieved documents to elicit incorrect answers, we use IS to measure each document’s influence on the generation. In 86\% of test cases, IS successfully identifies the poisoned document as the most influential. Second, we perform an ablation study to evaluate the ability of IS to rank documents by importance. Using the same datasets, we began by generating a baseline response ( Response A ) using a full set of retrieved documents. We then ranked these documents with IS and created two new responses: Response B , generated from only the top two documents with the highest IS, and Response C , from the remaining documents. A panel of judges, consisting of both human evaluators and an LLM, were asked to determine whether Response B or Response C more closely matched the baseline. A preference for Response B would indicate that IS effectively identifies the most influential documents. In an overwhelming majority of cases, the judges selected Response B , confirming our metric’s efficacy. Furthermore, by having a framework that quantifies the impact of each retrieved document in the LLM response, we can pinpoint the documents responsible for each response. Specifically, it helps us with • Enhanced Source Attribution and Fact-Checking: Giving each document a clear weight helps users track where information comes from and judge how trustworthy it is. • Model Calibration, and Identifying Bias: Analyzing document impact will help us find out what content our LLM focuses on, and as result reveal potential biases in the knowledge base and the need for calibration. • Document Relevance Ranking: By quantifying document impact, we can refine retrieval algorithms, improving the quality of retrieved documents and the overall response quality. • Adversarial Attacks and Model Poisoning: If our LLM produces an undesirable response, we can easily locate the responsible document and remove the poisoned data. 2 Background and Motivation 2.1 RAG The RAG process involves three components: an LLM, an external database, and a user query. The mechanism is as follows: First, we retrieve relevant documents from the database based on the user query (Retrieval). Calculating document relevance is an active area of research with various methods, such as cosine similarity between the document and query, Semantic Entropy Kuhn et al. 2023 , Lin et al. 2023 , and using another LLM for quantification Yu et al. 2024 . Next, we augment the user query with the retrieved information to create a more comprehensive prompt (Augmentation). Finally, we feed the augmented query to our LLM to generate a result (Generation). This approach enables the LLM to produce more informed, accurate, and contextually relevant responses by leveraging external knowledge in addition to its trained knowledge. 2.2 Safety of RAG LLMs RAG LLMs are often considered a solution to the problem of "hallucination" in standard LLMs. By grounding their responses in retrieved documents, RAG models can provide more accurate and up-to-date information. However, this reliance on external data also introduces new and significant safety concerns that are not present in their non-RAG counterparts. While RAG models can be less prone to generating entirely fabricated information, they are more susceptible to a range of attacks that exploit their retrieval