How Retrieved Context Shapes Internal Representations in RAG
–arXiv.org Artificial Intelligence
Abstracta mixture of documents that vary in relevance and usefulness. These observations question the reretrieved document set often contains a mixtureliability of RAG systems, calling for an in-depth of documents that vary in relevance and useful-understanding of how RAG truly works. To fill the gap of understanding, prior work has is known about how retrieved context shapes largely focused on analyzing RAG at the level of output behavior, studying how different retrievalthe internal representations that mediate instrategies or context compositions affect final an-formation integration in RAG. In this work, we study RAG through the lens of latent representa-swers, such as accuracy (Shi et al., 2023; Wu et al., tions. We systematically analyze how different 2025; Vladika and Matthes, 2025) and hallucinatypes of retrieved documents affect the hiddention rates (Joren et al., 2025; Amiraz et al., 2025). Across four question-answering they offer a limited understanding of how different datasets and three LLMs, we analyze internal types of retrieved documents influence the internal representations of LLMs. Output-level observa-representations under controlled single-and tions alone cannot distinguish whether a change inmulti-document settings. Our results reveal how context relevancy and layer-wise process-output arises from effective evidence integration, ing influence internal representations, provid-suppression of parametric knowledge, or a delibering explanations of LLMs' output behaviorsate model response such as uncertainty or refusal. A principled understanding of RAG, therefore, re-1 Introduction quires examining the internal representations that mediate interactions between retrieved information Retrieval-augmented generation (RAG) has be-and a model's parametric knowledge.
arXiv.org Artificial Intelligence
Apr-17-2026