提出新方法提升大模型对上下文信息的忠实度,解决幻觉问题。
Context-DPO: Aligning Language Models for Context-Faithfulness
- 基于偏好优化,直接训练模型忠实响应上下文信息。
- 在测试中使模型上下文忠实度提升35%至280%。
- 适用于需要精准引用外部知识的问答与生成任务。
大型语言模型(LLMs)生成可靠回答需遵循用户指令和检索到的信息。尽管对齐技术能帮助模型贴近人类意图与价值观,但通过对齐提升上下文忠实度仍研究不足。为此,我们提出首个专为增强上下文忠实度设计的对齐方法——Context-DPO。构建了名为ConFiQA的基准,模拟带知识冲突的检索增强生成(RAG)场景以评估上下文忠实度。利用ConFiQA中提供的忠实与固执回答,通过直接偏好优化(DPO)对齐模型。大量实验表明,Context-DPO显著提升上下文忠实度,在多个开源模型上实现35%至280%的改进。进一步分析显示,该方法在保持生成能力的同时,提供对上下文使用情况的可解释洞察。代码与数据已开源于https://github.com/byronBBL/Context-DPO。
原文摘要 · Abstract (English)
Reliable responses from large language models (LLMs) require adherence to user instructions and retrieved information. While alignment techniques help LLMs align with human intentions and values, improving context-faithfulness through alignment remains underexplored. To address this, we propose $\textbf{Context-DPO}$, the first alignment method specifically designed to enhance LLMs' context-faithfulness. We introduce $\textbf{ConFiQA}$, a benchmark that simulates Retrieval-Augmented Generation (RAG) scenarios with knowledge conflicts to evaluate context-faithfulness. By leveraging faithful and stubborn responses to questions with provided context from ConFiQA, our Context-DPO aligns LLMs through direct preference optimization. Extensive experiments demonstrate that our Context-DPO significantly improves context-faithfulness, achieving 35% to 280% improvements on popular open-source models. Further analysis demonstrates that Context-DPO preserves LLMs' generative capabilities while providing interpretable insights into context utilization. Our code and data are released at https://github.com/byronBBL/Context-DPO
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。