Model Internals-based Answer Attribution for Trustworthy Retrieval-Augmented Generation

Jirui Qi, Gabriele Sarti, Raquel Fernández, Arianna Bisazza
6/19/2024
45 citations
cs.CLcs.AIcs.LG
rag

Official code: Betswish/MIRAGE (25 stars, Python, Apache-2.0, last commit 2025-03-10).

Abstract

Ensuring the verifiability of model answers is a fundamental challenge for retrieval-augmented generation (RAG) in the question answering (QA) domain. Recently, self-citation prompting was proposed to make large language models (LLMs) generate citations to supporting documents along with their answers.

Show full abstract

However, self-citing LLMs often struggle to match the required format, refer to non-existent sources, and fail to faithfully reflect LLMs' context usage throughout the generation. In this work, we present MIRAGE --Model Internals-based RAG Explanations -- a plug-and-play approach using model internals for faithful answer attribution in RAG applications. MIRAGE detects context-sensitive answer tokens and pairs them with retrieved documents contributing to their prediction via saliency methods. We evaluate our proposed approach on a multilingual extractive QA dataset, finding high agreement with human answer attribution. On open-ended QA, MIRAGE achieves citation quality and efficiency comparable to self-citation while also allowing for a finer-grained control of attribution parameters. Our qualitative evaluation highlights the faithfulness of MIRAGE's attributions and underscores the promising application of model internals for RAG answer attribution.

View on arXivView PDF

Code Implementations(1)

Betswish/MIRAGEOfficial100%
Apache-2.0

Easy-to-use MIRAGE code for faithful answer attribution in RAG applications. Paper: https://aclanthology.org/2024.emnlp-main.347/

254PythonJun 18, 20241 years agoApache-2.0
attribution-methodsinterpretabilitymodel-internalsnlpretrieval-augmented-generation

Similar Papers

Cite this paper

@article{qi2024model,
  title  = {Model Internals-based Answer Attribution for Trustworthy Retrieval-Augmented Generation},
  author = {Jirui Qi and Gabriele Sarti and Raquel Fernández and Arianna Bisazza},
  year   = {2024},
  eprint = {2406.13663},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2406.13663v4}
}

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.13663.svg)](https://codeofpaper.com/paper/2406.13663)

Discussion