通过提升回复复制度,显著减少大模型幻觉。
Copy-Paste to Mitigate Large Language Model Hallucinations
- 两阶段高复制偏好训练,增强生成内容对上下文的依赖。
- 在多个数据集上准确率提升12.2%至24.5%,仅需365条训练样本。
- 适合追求高可信度生成、资源有限场景的应用者。
尽管检索增强生成(RAG)使大语言模型能生成与上下文一致的回应,但上下文忠实性仍面临挑战,因模型可能不持续信任所提供信息,导致幻觉影响可靠性。我们在RAGTruth上观察到,回应复制程度与非忠实幻觉呈负相关,表明更高复制度可降低幻觉并增强对上下文的真实信念。为此提出CopyPasteLLM,通过两阶段高复制响应偏好训练获得。设计三种提示方法以提升复制度,实证显示高复制响应在上下文忠实性和幻觉控制上表现更优。这些方法实现全自动流水线,将生成响应转化为高复制偏好数据用于训练。在FaithEval、ConFiQA和PubMedQA上,CopyPasteLLM在反事实与原始上下文中均达最佳性能,尤其在FaithEval上相比最优基线提升12.2%至24.5%准确率,且仅需365个训练样本——仅为基线数据量的1/50。为揭示其有效性,我们提出上下文-参数复制捕捉算法,发现CopyPasteLLM在生成时重新校准了对内部参数化知识的依赖,而非外部知识。所有代码已公开于https://github.com/longyongchao/CopyPasteLLM。
原文摘要 · Abstract (English)
While Retrieval-Augmented Generation (RAG) enables large language models (LLMs) to generate contextually grounded responses, contextual faithfulness remains challenging as LLMs may not consistently trust provided context, leading to hallucinations that undermine reliability. We observe an inverse correlation between response copying degree and context-unfaithful hallucinations on RAGTruth, suggesting that higher copying degrees reduce hallucinations by fostering genuine contextual belief. We propose CopyPasteLLM, obtained through two-stage high-copying response preference training. We design three prompting methods to enhance copying degree, demonstrating that high-copying responses achieve superior contextual faithfulness and hallucination control. These approaches enable a fully automated pipeline that transforms generated responses into high-copying preference data for training CopyPasteLLM. On FaithEval, ConFiQA and PubMedQA, CopyPasteLLM achieves best performance in both counterfactual and original contexts, remarkably with 12.2% to 24.5% accuracy improvements on FaithEval over the best baseline, while requiring only 365 training samples -- 1/50th of baseline data. To elucidate CopyPasteLLM's effectiveness, we propose the Context-Parameter Copying Capturing algorithm. Interestingly, this reveals that CopyPasteLLM recalibrates reliance on internal parametric knowledge rather than external knowledge during generation. All codes are available at https://github.com/longyongchao/CopyPasteLLM
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。