arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.06572cs.CLcs.AI
收藏

LawGPT:知识引导的数据生成及其在法律大语言模型中的应用

LawGPT: Knowledge-Guided Data Generation and Its Application to Legal LLM

National Key Laboratory for Novel Software Technology(现代软件工程国家重点实验室);School of Artificial Intelligence, Nanjing University(南京大学人工智能学院);School of Intelligence Science and Technology, Nanjing University(南京大学智能科学与技术学院)

Zhi Zhou, Kun-Yang Yu, Shi-Yu Tian, Xiao-Wen Yang, Jiang-Xin Shi, Pengxiao Song, Yi-Xuan Jin, Lan-Zhe Guo, Yu-Feng Li

AI总结:

针对专有LLM的隐私风险、成本问题及开源LLM法律推理数据不足的局限,提出知识引导的数据生成框架KgDG,构建50K高质量法律推理数据集训练LawGPT,使其性能优于现有法律专用LLM且媲美专有LLM。

摘要:

无论是专有还是开源的大型语言模型(LLMs),在各类自然语言处理任务中均展现出卓越能力。但它们在法律推理任务中存在显著局限:专有模型存在数据隐私风险和高推理成本,开源模型因法律领域训练数据不足而表现不佳。为解决这些问题,我们研究法律推理的数据生成,借助专有LLMs提升开源LLMs的法律推理性能。这一任务面临挑战,因为专有LLMs缺乏法律知识且生成数据难以验证。我们提出KgDG,一种知识引导的法律推理数据生成框架,利用法律知识增强生成多样性,并引入优化与验证流程确保数据质量;还扩展生成数据集以进一步提升LLM推理能力。通过KgDG,我们构建了含50K高质量样本的合成法律推理数据集。训练出的LawGPT模型优于现有法律专用LLMs,性能可与专有LLMs媲美,证明了KgDG和LawGPT的有效性。我们的代码与资源公开于https://github.com/LAMDASZ-ML/Knowledge-Guide-Data-Generation。

英文摘要:

Large language models (LLMs), both proprietary and open-source, have demonstrated remarkable capabilities across various natural language processing tasks. However, they face significant limitations in legal reasoning tasks. Proprietary models introduce data privacy risks and high inference costs, while open-source models underperform due to insufficient legal domain training data. To address these limitations, we study data generation for legal reasoning to improve the legal reasoning performance of open-source LLMs with the help of proprietary LLMs. This is challenging due to the lack of legal knowledge in proprietary LLMs and the difficulty in verifying the generated data. We propose KgDG, a knowledge-guided data generation framework for legal reasoning. Our framework enables leveraging legal knowledge to enhance generation diversity and introduces a refinement and verification process to ensure the quality of generated data. Moreover, we expand the generated dataset to further enhance the LLM reasoning capabilities. Using KgDG, we create a synthetic legal reasoning dataset containing 50K high-quality examples. Our trained model LawGPT outperforms existing legal-specific LLMs and achieves performance comparable to proprietary LLMs, demonstrating the effectiveness of KgDG and LawGPT. Our code and resources is publicly available at https://github.com/LAMDASZ-ML/Knowledge-Guide-Data-Generation .

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑