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 Qwen1.5-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能够根据检索文档的可信度评分自动调整其影响力,以抵御虚假信息。为此,我们提出了一种即插即用方法,称为$\textbf{Cr}$edibility-aware $\textbf{A}$ttention $\textbf{M}$odification(CrAM)。CrAM通过识别LLM中的关键注意力头,并依据文档可信度调整其注意力权重,从而降低低可信度文档的影响。在Natual Questions和TriviaQA数据集上使用Llama2-13B、Llama3-8B和Qwen1.5-7B进行的实验表明,CrAM将LLM在虚假信息污染下的RAG性能提升了20%以上,其效果甚至超越了有监督微调方法。