Table of Contents
Fetching ...

Quantifying Document Impact in RAG-LLMs

Armin Gerami, Kazem Faghih, Ramani Duraiswami

TL;DR

This work tackles the problem of quantifying how each retrieved document influences an LLM's output in Retrieval Augmented Generation (RAG) systems. It introduces Influence Score (IS), a metric grounded in Partial Information Decomposition and semantic entropy, to quantify document-level contributions via IS_i = -E(X_i→Y|X_1,...,X_k) = I(X_i;Y) - U(X_1,...,X_k;Y) = H_S(Y|X_1,...,X_k) - H_S(Y|X_i). The authors validate IS in two experiments: a poisoning attack showing poisoned documents are identified as highly influential in 86% of cases, and an ablation study where top-IS documents yield responses more similar to the full-set baseline. The approach enhances source attribution, model calibration, and defense against adversarial retrieval, contributing to greater transparency and reliability in RAG deployments. These results suggest IS as a practical tool for diagnosing document-level influence and guiding retrieval optimization in real-world systems, with explicit use of Semantic Entropy to approximate information distribution among documents.

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\%$ 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.

Quantifying Document Impact in RAG-LLMs

TL;DR

This work tackles the problem of quantifying how each retrieved document influences an LLM's output in Retrieval Augmented Generation (RAG) systems. It introduces Influence Score (IS), a metric grounded in Partial Information Decomposition and semantic entropy, to quantify document-level contributions via IS_i = -E(X_i→Y|X_1,...,X_k) = I(X_i;Y) - U(X_1,...,X_k;Y) = H_S(Y|X_1,...,X_k) - H_S(Y|X_i). The authors validate IS in two experiments: a poisoning attack showing poisoned documents are identified as highly influential in 86% of cases, and an ablation study where top-IS documents yield responses more similar to the full-set baseline. The approach enhances source attribution, model calibration, and defense against adversarial retrieval, contributing to greater transparency and reliability in RAG deployments. These results suggest IS as a practical tool for diagnosing document-level influence and guiding retrieval optimization in real-world systems, with explicit use of Semantic Entropy to approximate information distribution among documents.

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 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.
Paper Structure (17 sections, 5 equations, 2 figures, 2 tables)

This paper contains 17 sections, 5 equations, 2 figures, 2 tables.

Figures (2)

  • Figure 1: Visualization of an LLM's response probabilities in scenarios of high Semantic Entropy (left) and low Semantic Entropy (right). High entropy corresponds to low model confidence, while low entropy signifies high confidence.
  • Figure 2: The rate that Response B (LLM response when augmenting the two documents with the highest IS) was chosen over Response C (response when augmenting the rest of the documents) to be more similar to Response A (response when augmenting all of the documents) by 16 participants as the judge. The questions are 20 randomly chosen from HotPotQA yang2018hotpotqa, and the error bars represents the average confidence of the participants' decision.