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

Lawyer LLaMA 技术报告

Lawyer LLaMA Technical Report

Peking University(北京大学)

Quzhe Huang, Mingxu Tao, Chen Zhang, Zhenwei An, Cong Jiang, Zhibin Chen, Zirui Wu, Yansong Feng

AI总结:

本文提出一种将LLM适配到特定领域的框架,构建了法律领域模型Lawyer LLaMA,通过持续训练注入知识、监督微调学习技能、检索模块缓解幻觉,并发现专家数据优于ChatGPT生成数据。

摘要:

大型语言模型(LLMs),如LLaMA,在各种任务中展现出了卓越的性能。然而,当部署到法律或医学等特定领域时,模型仍然面临领域特定知识不足以及利用这些知识解决领域相关问题能力不足的挑战。在本文中,我们提出了一种新的框架,将LLMs适应到特定领域,并基于该框架构建了法律领域LLM——Lawyer LLaMA。具体来说,我们在持续训练阶段注入领域知识,并使用精心设计的监督微调任务教模型学习专业技能。此外,为了缓解模型生成过程中的幻觉问题,我们添加了一个检索模块,在模型回答任何查询之前提取相关的法律条文。在学习领域特定技能时,我们发现专家的经验比从ChatGPT中提炼的经验更有用,数百条专家撰写的数据胜过数万条ChatGPT生成的数据。我们将发布我们的模型和数据。

英文摘要:

Large Language Models (LLMs), like LLaMA, have exhibited remarkable performance across various tasks. Nevertheless, when deployed to specific domains such as law or medicine, the models still confront the challenge of a deficiency in domain-specific knowledge and an inadequate capability to leverage that knowledge to resolve domain-related problems. In this paper, we propose a new framework to adapt LLMs to specific domains and build Lawyer LLaMA, a legal domain LLM, based on this framework. Specifically, we inject domain knowledge during the continual training stage and teach the model to learn professional skills using properly designed supervised fine-tuning tasks. Moreover, to alleviate the hallucination problem during the model's generation, we add a retrieval module and extract relevant legal articles before the model answers any queries. When learning domain-specific skills, we find that experts' experience is much more useful than experiences distilled from ChatGPT, where hundreds of expert-written data outperform tens of thousands of ChatGPT-generated ones. We will release our model and data.

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

↑