How Retrieved Context Shapes Internal Representations in RAG
On the map: Retrieval-augmented generation → RAG pipeline design and evaluation
Abstract (arXiv)
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 of LLMs' output behaviors and insights for RAG system design.
Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Placed in RAG pipeline design and evaluation, one of 15 directions in Retrieval-augmented generation. Builds on 36 of its 56 references that are in the map. First posted on arXiv 23 Feb 2026.
Builds on
36 of 56 references.
Closest ancestors · 6
Same direction, newest first
- 2025Controlled Retrieval-augmented Context Evaluation for Long-form RAG24 Jun
- 2025Do RAG Systems Really Suffer From Positional Bias?21 May
- 2025LaRA: Benchmarking Retrieval-Augmented Generation and Long-Context LLMs -- No Silver Bullet for LC or RAG Routing14 Feb
- 2024Long2RAG: Evaluating Long-Context & Long-Form Retrieval-Augmented Generation with Key Point Recall30 Oct
- 2024Stochastic RAG: End-to-End Retrieval-Augmented Generation through Expected Utility Maximization5 May
- 2024The Power of Noise: Redefining Retrieval for RAG Systems26 Jan
Other references · 30
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
- 2017TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehensioncited by 2,895
- 2020REALM: Retrieval-Augmented Language Model Pre-Trainingcited by 2,126
- 2020Leveraging Passage Retrieval with Generative Models for Open Domain Question Answeringcited by 1,203
- 2021Unsupervised Dense Information Retrieval with Contrastive Learningcited by 1,203
- 2022When Not to Trust Language Models: Investigating Effectiveness of Parametric and Non-Parametric Memoriescited by 1,103
- 2019BERT Rediscovers the Classical NLP Pipelinecited by 1,046
- 2023Large Language Models Can Be Easily Distracted by Irrelevant Contextcited by 820
- 2021Did Aristotle Use a Laptop? A Question Answering Benchmark with Implicit Reasoning Strategiescited by 736
- 2023In-Context Retrieval-Augmented Language Modelscited by 694
- 2019Linguistic Knowledge and Transferability of Contextual Representationscited by 382
18 more
- 2023Adaptive Chameleon or Stubborn Sloth: Revealing the Behavior of Large Language Models in Knowledge Conflictscited by 333
- 2024INSIDE: LLMs' Internal States Retain the Power of Hallucination Detectioncited by 317
- 2025Layer by Layer: Uncovering Hidden Representations in Language Modelscited by 293
- 2024Knowledge Conflicts for LLMs: A Surveycited by 274
- 2024Certifiably Robust RAG against Retrieval Corruptioncited by 144
- 2019The Bottom-up Evolution of Representations in the Transformer: A Study with Machine Translation and Language Modeling Objectivescited by 139
- 2024HaloScope: Harnessing Unlabeled LLM Generations for Hallucination Detectioncited by 96
- 2024Not All Layers of LLMs Are Necessary During Inferencecited by 95
- 2024Enhancing Noise Robustness of Retrieval-Augmented Language Models with Adaptive Adversarial Trainingcited by 88
- 2024Sufficient Context: A New Lens on Retrieval Augmented Generation Systemscited by 69
- 2025Retrieval-Augmented Generation with Conflicting Evidencecited by 60
- 2024Scaling Retrieval-Based Language Models with a Trillion-Token Datastorecited by 54
- 2022RHO (ρ): Reducing Hallucination in Open-domain Dialogues with Knowledge Groundingcited by 47
- 2024From RAGs to rich parameters: Probing how language models utilize external knowledge over parametric information for factual queriescited by 16
- 2024Analysing the Residual Stream of Language Models Under Knowledge Conflictscited by 15
- 2025LUMINA: Detecting Hallucinations in RAG System with Context-Knowledge Signalscited by 8
- 2025On the Influence of Context Size and Model Choice in Retrieval-Augmented Generation Systemscited by 5
- 2025Select to Know: An Internal-External Knowledge Self-Selection Framework for Domain-Specific Question Answeringcited by 3
Built on by
Citing papers per year: 2026: 2.
2 papers.
Similar, not cited
Close in wording, no citation either way
- 2026On the impact of retrieved content representations in RAG Pipelines
- 2024Deciphering the Interplay of Parametric and Non-parametric Memory in Retrieval-augmented Language Models
- 2025Grounding Long-Context Reasoning with Contextual Normalization for Retrieval-Augmented Generation
- 2025Dynamic Context Selection for Retrieval-Augmented Generation: Mitigating Distractors and Positional Bias
- 2025Enhancing Retrieval-Augmented Generation: A Study of Best Practices
- 2025Is Relevance Propagated from Retriever to Generator in RAG?
- 2024Quantifying reliance on external information over parametric knowledge during Retrieval Augmented Generation (RAG) using mechanistic analysis
- 2025Reconstructing Context: Evaluating Advanced Chunking Strategies for Retrieval-Augmented Generation