通过元数据丰富的 RAG 管道与直接偏好优化提升法律 LLM
计算与语言
2026-03-23 v1
摘要
大语言模型(LLMs)在短上下文中表现良好,但在长篇法律文档上会退化,常会产生幻觉现象,如错误条款或 precedent。法律领域中,此类错误会削弱可靠性和信任。在法律领域,检索增强生成(RAG)有助于 grounding 输出,但在小型本地部署模型(尤其是需要数据隐私的场景)中仍受限。我们识别了两个 failure 模式:由于法律语料库中的词汇冗余导致的检索错误,以及模型在上下文不足时仍生成答案的解码错误。为解决此问题,我们提出了 Metadata Enriched Hybrid RAG 以提高文档级检索,并应用 Direct Preference Optimization(DPO)以在上下文不足时强制模型拒绝。这些方法共同改善了 grounding、可靠性和安全性。
引用
@article{arxiv.2603.19251,
title = {Enhancing Legal LLMs through Metadata-Enriched RAG Pipelines and Direct Preference Optimization},
author = {Suyash Maniyar and Deepali Singh and Rohith Reddy},
journal= {arXiv preprint arXiv:2603.19251},
year = {2026}
}
备注
12 pages including Appendix