How Retrieved Context Shapes Internal Representations in RAG

πŸ“… 2026-02-23
πŸ“ˆ Citations: 0
✨ Influential: 0
πŸ“„ PDF
πŸ€– AI Summary
This study investigates how the relevance and utility of retrieved documents in Retrieval-Augmented Generation (RAG) influence the internal representations and generation behavior of large language models (LLMs). Through controlled experiments, hidden state analyses, and cross-dataset, multi-model comparisons, the authors systematically evaluate representation shifts across model layers under single- and multi-document settings on four question-answering benchmarks and three LLMs. They provide the first internal-representation-level evidence that the relevance of retrieval context and its interaction with layer depth critically shape the model’s information integration mechanisms. The findings demonstrate a strong correlation between representational changes and generation quality, offering a theoretical foundation for understanding RAG output behavior and informing the design of more effective RAG systems.

Technology Category

Application Category

πŸ“ Abstract
Retrieval-augmented generation (RAG) enhances large language models (LLMs) by conditioning generation on retrieved external documents, but the effect of retrieved context is often non-trivial. In realistic retrieval settings, the retrieved document set often contains a mixture of documents that vary in relevance and usefulness. While prior work has largely examined these phenomena through output behavior, little is known about how retrieved context shapes the internal representations that mediate information integration in RAG. In this work, we study RAG through the lens of latent representations. We systematically analyze how different types of retrieved documents affect the hidden states of LLMs, and how these internal representation shifts relate to downstream generation behavior. Across four question-answering datasets and three LLMs, we analyze internal representations under controlled single- and multi-document settings. Our results reveal how context relevancy and layer-wise processing influence internal representations, providing explanations on LLMs output behaviors and insights for RAG system design.
Problem

Research questions and friction points this paper is trying to address.

retrieval-augmented generation
internal representations
retrieved context
large language models
context relevancy
Innovation

Methods, ideas, or system contributions that make the work stand out.

retrieval-augmented generation
latent representations
internal representations
context relevance
large language models
πŸ”Ž Similar Papers
No similar papers found.
S
Samuel Yeh
Department of Computer Science, University of Wisconsin-Madison
Sharon Li
Sharon Li
University of Wisconsin-Madison
Machine learningReliable AI