让AI生成法律文本时更忠实原文,避免胡编乱造。
CoCoLex: Confidence-guided Copy-based Decoding for Grounded Legal Text Generation
- 根据模型信心动态决定是否直接复制原文内容
- 在5个法律数据集上优于现有方法,长文本生成效果更佳
- 适合需要高准确性的法律文书自动生成场景
由于能够处理长篇复杂语境,大语言模型在法律领域具有重要价值,但其生成内容常出现不忠实、无依据或幻觉问题。检索增强生成虽能引入外部知识,却无法保证上下文有效利用。现有上下文感知解码策略虽增强了相关上下文的影响,但未显式保障与原文的一致性。为此,本文提出面向法律文本生成的置信度引导复制解码(CoCoLex):动态将模型输出词表分布与基于上下文复制的分布进行插值。该方法根据模型置信度决定复制行为,确保生成结果高度忠实于原始文档。在五个法律基准上的实验表明,CoCoLex显著优于现有上下文感知解码方法,尤其在长文本生成任务中表现突出。
原文摘要 · Abstract (English)
Due to their ability to process long and complex contexts, LLMs can offer key benefits to the Legal domain, but their adoption has been hindered by their tendency to generate unfaithful, ungrounded, or hallucinatory outputs. While Retrieval-Augmented Generation offers a promising solution by grounding generations in external knowledge, it offers no guarantee that the provided context will be effectively integrated. To address this, context-aware decoding strategies have been proposed to amplify the influence of relevant context, but they usually do not explicitly enforce faithfulness to the context. In this work, we introduce Confidence-guided Copy-based Decoding for Legal Text Generation (CoCoLex)-a decoding strategy that dynamically interpolates the model produced vocabulary distribution with a distribution derived based on copying from the context. CoCoLex encourages direct copying based on the model's confidence, ensuring greater fidelity to the source. Experimental results on five legal benchmarks demonstrate that CoCoLex outperforms existing context-aware decoding methods, particularly in long-form generation tasks.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。