Retrieval-Augmented Generation (RAG) can alleviate hallucinations of Large Language Models (LLMs) by referencing external documents. However, the misinformation in external documents may mislead LLMs' generation. To address this issue, we explore the task of "credibility-aware RAG", in which LLMs automatically adjust the influence of retrieved documents based on their credibility scores to counteract misinformation. To this end, we introduce a plug-and-play method named $\textbf{Cr}$edibility-aware $\textbf{A}$ttention $\textbf{M}$odification (CrAM). CrAM identifies influential attention heads in LLMs and adjusts their attention weights based on the credibility of the documents, thereby reducing the impact of low-credibility documents. Experiments on Natual Questions and TriviaQA using Llama2-13B, Llama3-8B, and Qwen-7B show that CrAM improves the RAG performance of LLMs against misinformation pollution by over 20%, even surpassing supervised fine-tuning methods.
翻译:检索增强生成(RAG)通过引用外部文档可以缓解大语言模型(LLM)的幻觉问题。然而,外部文档中的错误信息可能会误导LLM的生成。为解决此问题,我们探索了“可信度感知的RAG”任务,即LLM根据检索文档的可信度分数自动调整其影响力,以对抗错误信息。为此,我们提出了一种即插即用方法,名为**可**信度感知的**注**意力**修**改(CrAM)。CrAM识别LLM中的关键注意力头,并根据文档的可信度调整其注意力权重,从而降低低可信度文档的影响。在Natual Questions和TriviaQA数据集上使用Llama2-13B、Llama3-8B和Qwen-7B进行的实验表明,CrAM将LLM在错误信息污染下的RAG性能提升了超过20%,甚至超越了有监督微调方法。