From RAGs to rich parameters: Probing how language models utilize external knowledge over parametric information for factual queries

Hitesh Wadhwa, Rahul Seetharaman, Somyaa Aggarwal, Reshmi Ghosh, Samyadeep Basu +4 more
6/18/2024
cs.CLcs.AI

No confident code implementation found for this paper.

Abstract

Retrieval Augmented Generation (RAG) enriches the ability of language models to reason using external context to augment responses for a given user prompt. This approach has risen in popularity due to practical applications in various applications of language models in search, question/answering, and chat-bots. However, the exact nature of how this approach works isn't clearly understood. In this paper, we mechanistically examine the RAG pipeline to highlight that language models take shortcut and have a strong bias towards utilizing only the context information to answer the question, while relying minimally on their parametric memory. We probe this mechanistic behavior in language models with: (i) Causal Mediation Analysis to show that the parametric memory is minimally utilized when answering a question and (ii) Attention Contributions and Knockouts to show that the last token residual stream do not get enriched from the subject token in the question, but gets enriched from other informative tokens in the context. We find this pronounced shortcut behaviour true across both LLaMa and Phi family of models.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{wadhwa2024from,
  title  = {From RAGs to rich parameters: Probing how language models utilize external knowledge over parametric information for factual queries},
  author = {Hitesh Wadhwa and Rahul Seetharaman and Somyaa Aggarwal and Reshmi Ghosh and Samyadeep Basu and Soundararajan Srinivasan and Wenlong Zhao and Shreyas Chaudhari and Ehsan Aghazadeh},
  year   = {2024},
  eprint = {2406.12824},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2406.12824v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2406.12824.svg)](https://codeofpaper.com/paper/2406.12824)

Discussion