RAG-E: Quantifying Retriever-Generator Alignment and Failure Modes
Korbinian Randl, Guido Rocchietti, Aron Henriksson, Ziawasch Abedjan, Tony Lindgren, John Pavlopoulos
TL;DR
RAG-E introduces an end-to-end explainability framework for Retrieval-Augmented Generation that jointly analyzes how retrievers and generators use and misuse evidence. It combines Integrated Gradients for retriever explanations with Monte Carlo-stabilized Shapley-style attributions for generators (pmcSHAP) and introduces the WARG metric to quantify how well the generator’s document usage aligns with the retriever’s ranking. Empirical results on two retrievers, two generators, and two datasets reveal pervasive misalignment patterns (e.g., primacy bias in generation) and strong evidence of two failure modes: wasted retrieval and noise distraction. The framework enables principled auditing, with open-source tooling, and offers a foundation for improving RAG reliability in high-stakes domains by diagnosing and potentially guiding retrieval/generation alignment decisions.
Abstract
Retrieval-Augmented Generation (RAG) systems combine dense retrievers and language models to ground LLM outputs in retrieved documents. However, the opacity of how these components interact creates challenges for deployment in high-stakes domains. We present RAG-E, an end-to-end explainability framework that quantifies retriever-generator alignment through mathematically grounded attribution methods. Our approach adapts Integrated Gradients for retriever analysis, introduces PMCSHAP, a Monte Carlo-stabilized Shapley Value approximation, for generator attribution, and introduces the Weighted Attribution-Relevance Gap (WARG) metric to measure how well a generator's document usage aligns with a retriever's ranking. Empirical analysis on TREC CAsT and FoodSafeSum reveals critical misalignments: for 47.4% to 66.7% of queries, generators ignore the retriever's top-ranked documents, while 48.1% to 65.9% rely on documents ranked as less relevant. These failure modes demonstrate that RAG output quality depends not solely on individual component performance but on their interplay, which can be audited via RAG-E.
