Home Technology peripherals AI Fudan University team released DISC-LawLLM, a Chinese smart legal system, to build a judicial evaluation benchmark and open source 300,000 fine-tuned data

Fudan University team released DISC-LawLLM, a Chinese smart legal system, to build a judicial evaluation benchmark and open source 300,000 fine-tuned data

Sep 29, 2023 pm 01:17 PM
industry disc-lawllm disc-law-sft

With the rise of smart justice, smart legal systems driven by smart methods are expected to benefit different groups. For example, easing paperwork for legal professionals, providing legal advisory services to the general public, and providing study and exam coaching for law students.

Due to the uniqueness of legal knowledge and the diversity of judicial tasks, previous smart judicial research mainly focused on designing automated algorithms for specific tasks, which was difficult to provide for the judicial field. The demand for supporting services is far from being implemented. Large language models (LLMs) have demonstrated powerful capabilities in different traditional tasks, bringing hope for the further development of intelligent legal systems.

Recently, Fudan University’s Data Intelligence and Social Computing Laboratory (FudanDISC) released a Chinese smart legal system driven by a large language model - DISC-LawLLM. The system can provide a variety of legal services to different user groups. In addition, the laboratory also built an evaluation benchmark DISC-Law-Eval to evaluate the legal language model from both objective and subjective aspects. The performance of the model in the evaluation has obvious advantages compared with the existing large legal models.

The research team also released a high-quality supervised fine-tuning (SFT) data set containing 300,000 - DISC-Law-SFT. The model parameters and technical reports are also open source.

Fudan University team released DISC-LawLLM, a Chinese smart legal system, to build a judicial evaluation benchmark and open source 300,000 fine-tuned data

  • Home page address: https://law.fudan-disc.com
  • Github address: https://github.com/FudanDISC/DISC-LawLLM
  • Technical report: https://arxiv.org/abs/2309.11325

01 Sample Display

#When users have legal questions, they can consult the model and describe the questions , the model will give relevant legal regulations and explanations, recommended solutions, etc.

Fudan University team released DISC-LawLLM, a Chinese smart legal system, to build a judicial evaluation benchmark and open source 300,000 fine-tuned data

##                                                                                                                                                                                                               and judicial agencies can use models to complete legal text summarization, judicial event detection, entity and relationship extraction, etc., to reduce paperwork and improve work efficiency.
## 图 2 Judicial document analysis
Fudan University team released DISC-LawLLM, a Chinese smart legal system, to build a judicial evaluation benchmark and open source 300,000 fine-tuned data
##Q is preparing for the judicial examination process , you can ask questions to the model to help consolidate legal knowledge and answer legal exam questions.
##                                                                                                                                                                                                                                          When supported by legal provisions, the model will search relevant content in the knowledge base based on the question and give a reply.

Fudan University team released DISC-LawLLM, a Chinese smart legal system, to build a judicial evaluation benchmark and open source 300,000 fine-tuned data##                                                                                                                                                                                                                                                                                      

02 Introduction to DISC-LawLLM
DISC-LawLLM is based on the high-quality data set DISC-Law-SFT we built in the general field Chinese large model Baichuan A large legal model obtained by fine-tuning the full parameter command on -13B. It is worth noting that our training data and training methods can be adapted to any base large model.

DISC-LawLLM has three core capabilities:

Fudan University team released DISC-LawLLM, a Chinese smart legal system, to build a judicial evaluation benchmark and open source 300,000 fine-tuned data

#1. Basic legal text processing capabilities. In view of the different basic capabilities of legal text understanding and generation, including information extraction, text summarization, etc., we constructed fine-tuned data based on existing NLP judicial task public data and real-world legal-related texts.

2. Legal reasoning thinking ability. In response to the needs of tasks in the smart judicial field, we used legal syllogism, the basic legal reasoning process of judges, to reconstruct the instruction data, effectively improving the legal reasoning ability of the model.

3. The ability to retrieve and follow knowledge in the judicial field is very important. When solving problems in the field of smart justice, it is usually necessary to search based on the relevant background laws or cases of the problem. In order to enhance the retrieval and compliance capabilities of the intelligent legal processing system, we equipped it with a retrieval enhancement module

The overall framework of the model is shown in Figure 5:

Fudan University team released DISC-LawLLM, a Chinese smart legal system, to build a judicial evaluation benchmark and open source 300,000 fine-tuned data

                                                                                                                                                                                                                                                                                                 Set the structure of DISC-Law-SFT

##                             Figure 6 The structure of DISC-Law-SFT

Fudan University team released DISC-LawLLM, a Chinese smart legal system, to build a judicial evaluation benchmark and open source 300,000 fine-tuned data

DISC-Law-SFT is divided into two sub-datasets, namely DISC-Law-SFT-Pair and DISC-Law-SFT-Triplet. The former introduces legal reasoning to LLM capabilities, while the latter helps improve the model's ability to utilize external knowledge.
                                                                                                                                                                                                                        Table 1: Introduction to the contents of the DISC-Law-SFT data set

##Data source

The data of the DISC-Law-SFT data set comes from three parts. The first is the NLP judicial task public data set related to Chinese law, including Legal information extraction, entity and relationship extraction, judicial text summarization, judicial examination questions and answers, judicial reading comprehension, crime/sentence prediction, etc.; second, it collects legal-related original texts from the real world, such as laws and regulations, judicial cases, and judgment documents. , judicial-related examinations, etc.; the third is a general open source data set. We used alpaca_gpt4_data_zh and Firefly, which can enrich the diversity of the training set and reduce the risk of the model's basic capability degradation during the SFT training phase.

Instruction to construct

to the above one and two After the source data is converted into "input-output" instruction pairs, we use the following three methods to reconstruct the instruction data to improve data quality.

  • Behaviour Shaping

In legal syllogisms, large The premise is the applicable legal rules, the minor premise is the facts of the case, and the conclusion is the legal judgment. This constitutes a basic legal reasoning process for judges. Every case can be drawn to a clear conclusion through a syllogism, as follows:
Major premise: legal rules
Minor premise: facts of the case
Conclusion: Legal Judgment

We use GPT-3.5-turbo to complete the reconstruction and refinement of behavior shaping Output, ensuring that each conclusion is drawn from a legal provision and a case fact.

  • Knowledge expansion

Not applicable to behavior shaping For multiple-choice questions, we directly use legal knowledge to extend the output to provide more reasoning details. Many law-related exams and knowledge competitions only provide answer options, we use LLM to expand the legal knowledge involved, give correct answers, and reconstruct instruction pairs.

  • Thinking Cultivation

Chain of Thought (CoT) has been Proven to effectively improve the model's reasoning capabilities. To further empower the model with legal reasoning capabilities, we designed a thought chain with specific legal meaning, called LCoT, which requires the model to use legal syllogisms to derive answers. LCoT converts the input judge.
Case: ##Instruction triplet construction
In order to train the retrieval enhanced model, we constructed the DISC-Law-SFT-Triplet sub-dataset, the data is# Triples of the form ##, we use the three strategies listed in the instruction pair construction to process the original data, obtain input and output, and design heuristic rules to extract reference information from the original data.
04 Experiment

##Training

The training process of DISC-LawLLM is divided into two stages: SFT and retrieval enhancement.

Retrieval enhancement

Although we use high quality The instruction data fine-tunes the LLM, but it may produce inaccurate responses due to hallucinations or outdated knowledge. To solve this problem, we designed a retrieval module to enhance DISC-LawLLM.

Given a user input, the retriever returns the most relevant Top-K documents from the knowledge base by calculating their similarity to the input. These candidate documents, together with user input, are constructed using templates designed by us and then input into DISC-LawLLM. By querying the knowledge base, the model can better understand the main premises, resulting in more accurate and reliable answers.

                                                                                                                                                                                                                                               Figure 7: Retrieval enhanced DISC-LawLLM

Evaluation method

  • Evaluation Benchmark DISC-Law-Eval

We built a DISC-Law-Eval, a fair smart legal system evaluation benchmark, evaluates from both objective and subjective perspectives, filling the gap that there is currently no benchmark to comprehensively evaluate smart legal systems.

Fudan University team released DISC-LawLLM, a Chinese smart legal system, to build a judicial evaluation benchmark and open source 300,000 fine-tuned data

##                                                                                                                                                                                                                  Figure 8: DISC-Law-Eval evaluation benchmark

  • Objective Evaluation

In order to objectively and quantitatively evaluate the legal knowledge and reasoning capabilities of the intelligent legal system, we designed An objective evaluation data set consists of a series of single-item and multiple-choice questions from China's legal standardized examinations and knowledge competitions, and the questions are divided into three levels: difficult, normal and easy based on content complexity and deductive difficulty. It can provide a more challenging and reliable way to measure whether the model can use its knowledge to reason about the correct answer. We demonstrate performance by calculating accuracy.

  • Subjective evaluation

For the subjective evaluation part, we use Assessments are conducted in a question-and-answer paradigm, simulating the process of subjective exam questions. We hand-constructed a high-quality test set from legal consultations, online forums, justice-related publications, and legal documents. We use GPT-3.5-turbo as a referee model to evaluate the model's output and provide a score from 1 to 5 using three criteria: accuracy, completeness, and clarity.

Evaluation results

    ##Comparison models

Compare our model DISC-LawLLM (without external knowledge base) with 4 general LLMs and 4 Chinese legal LLMs, including GPT-3.5-turbo , ChatGLM-6B, Baichuan-13B-Chat, Chinese-Alpaca2-13B; LexiLaw, LawGPT, Lawyer LLaMA, ChatLaw.

    Objective evaluation results

DISC-LawLLM in all Large models with equal parameter numbers exceeded all comparisons in tests at different difficulty levels. Even compared to GPT-3.5-turbo with 175B parameters, DISC-LawLLM shows superior performance on some tests. Table 2 shows the objective evaluation results, in which bold indicates the best result and underline indicates the second best result.

##                                                             Table 2: Objective evaluation resultsFudan University team released DISC-LawLLM, a Chinese smart legal system, to build a judicial evaluation benchmark and open source 300,000 fine-tuned data

Subjective evaluation results
In objective reviews, DISC-LawLLM received the highest overall score and the highest scores in the two criteria of accuracy and clarity. Table 3 shows the subjective evaluation results, where bold indicates the best results.

Fudan University team released DISC-LawLLM, a Chinese smart legal system, to build a judicial evaluation benchmark and open source 300,000 fine-tuned data##                                                                                                                                                                                                 Table 3: Subjective evaluation results

05 Summary
We released DISC-LawLLM, an intelligent legal system that provides legal services in multiple application scenarios. Based on the public NLP task data set in the legal field, the original legal text and the open source general instruction data set, the legal instructions are reconstructed according to the legal syllogism for supervision and fine-tuning. In order to improve the reliability of the output, we added an external retrieval module. By improving legal reasoning and knowledge retrieval capabilities, DISC-LawLLM outperforms existing legal LLMs on the legal benchmark set we constructed. Research in this field will bring more prospects and possibilities to achieve legal resource balance, etc. We have released the constructed data set and model weights to promote further research.

The above is the detailed content of Fudan University team released DISC-LawLLM, a Chinese smart legal system, to build a judicial evaluation benchmark and open source 300,000 fine-tuned data. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

DeepMind robot plays table tennis, and its forehand and backhand slip into the air, completely defeating human beginners DeepMind robot plays table tennis, and its forehand and backhand slip into the air, completely defeating human beginners Aug 09, 2024 pm 04:01 PM

But maybe he can’t defeat the old man in the park? The Paris Olympic Games are in full swing, and table tennis has attracted much attention. At the same time, robots have also made new breakthroughs in playing table tennis. Just now, DeepMind proposed the first learning robot agent that can reach the level of human amateur players in competitive table tennis. Paper address: https://arxiv.org/pdf/2408.03906 How good is the DeepMind robot at playing table tennis? Probably on par with human amateur players: both forehand and backhand: the opponent uses a variety of playing styles, and the robot can also withstand: receiving serves with different spins: However, the intensity of the game does not seem to be as intense as the old man in the park. For robots, table tennis

The first mechanical claw! Yuanluobao appeared at the 2024 World Robot Conference and released the first chess robot that can enter the home The first mechanical claw! Yuanluobao appeared at the 2024 World Robot Conference and released the first chess robot that can enter the home Aug 21, 2024 pm 07:33 PM

On August 21, the 2024 World Robot Conference was grandly held in Beijing. SenseTime's home robot brand "Yuanluobot SenseRobot" has unveiled its entire family of products, and recently released the Yuanluobot AI chess-playing robot - Chess Professional Edition (hereinafter referred to as "Yuanluobot SenseRobot"), becoming the world's first A chess robot for the home. As the third chess-playing robot product of Yuanluobo, the new Guoxiang robot has undergone a large number of special technical upgrades and innovations in AI and engineering machinery. For the first time, it has realized the ability to pick up three-dimensional chess pieces through mechanical claws on a home robot, and perform human-machine Functions such as chess playing, everyone playing chess, notation review, etc.

Claude has become lazy too! Netizen: Learn to give yourself a holiday Claude has become lazy too! Netizen: Learn to give yourself a holiday Sep 02, 2024 pm 01:56 PM

The start of school is about to begin, and it’s not just the students who are about to start the new semester who should take care of themselves, but also the large AI models. Some time ago, Reddit was filled with netizens complaining that Claude was getting lazy. "Its level has dropped a lot, it often pauses, and even the output becomes very short. In the first week of release, it could translate a full 4-page document at once, but now it can't even output half a page!" https:// www.reddit.com/r/ClaudeAI/comments/1by8rw8/something_just_feels_wrong_with_claude_in_the/ in a post titled "Totally disappointed with Claude", full of

At the World Robot Conference, this domestic robot carrying 'the hope of future elderly care' was surrounded At the World Robot Conference, this domestic robot carrying 'the hope of future elderly care' was surrounded Aug 22, 2024 pm 10:35 PM

At the World Robot Conference being held in Beijing, the display of humanoid robots has become the absolute focus of the scene. At the Stardust Intelligent booth, the AI ​​robot assistant S1 performed three major performances of dulcimer, martial arts, and calligraphy in one exhibition area, capable of both literary and martial arts. , attracted a large number of professional audiences and media. The elegant playing on the elastic strings allows the S1 to demonstrate fine operation and absolute control with speed, strength and precision. CCTV News conducted a special report on the imitation learning and intelligent control behind "Calligraphy". Company founder Lai Jie explained that behind the silky movements, the hardware side pursues the best force control and the most human-like body indicators (speed, load) etc.), but on the AI ​​side, the real movement data of people is collected, allowing the robot to become stronger when it encounters a strong situation and learn to evolve quickly. And agile

ACL 2024 Awards Announced: One of the Best Papers on Oracle Deciphering by HuaTech, GloVe Time Test Award ACL 2024 Awards Announced: One of the Best Papers on Oracle Deciphering by HuaTech, GloVe Time Test Award Aug 15, 2024 pm 04:37 PM

At this ACL conference, contributors have gained a lot. The six-day ACL2024 is being held in Bangkok, Thailand. ACL is the top international conference in the field of computational linguistics and natural language processing. It is organized by the International Association for Computational Linguistics and is held annually. ACL has always ranked first in academic influence in the field of NLP, and it is also a CCF-A recommended conference. This year's ACL conference is the 62nd and has received more than 400 cutting-edge works in the field of NLP. Yesterday afternoon, the conference announced the best paper and other awards. This time, there are 7 Best Paper Awards (two unpublished), 1 Best Theme Paper Award, and 35 Outstanding Paper Awards. The conference also awarded 3 Resource Paper Awards (ResourceAward) and Social Impact Award (

Li Feifei's team proposed ReKep to give robots spatial intelligence and integrate GPT-4o Li Feifei's team proposed ReKep to give robots spatial intelligence and integrate GPT-4o Sep 03, 2024 pm 05:18 PM

Deep integration of vision and robot learning. When two robot hands work together smoothly to fold clothes, pour tea, and pack shoes, coupled with the 1X humanoid robot NEO that has been making headlines recently, you may have a feeling: we seem to be entering the age of robots. In fact, these silky movements are the product of advanced robotic technology + exquisite frame design + multi-modal large models. We know that useful robots often require complex and exquisite interactions with the environment, and the environment can be represented as constraints in the spatial and temporal domains. For example, if you want a robot to pour tea, the robot first needs to grasp the handle of the teapot and keep it upright without spilling the tea, then move it smoothly until the mouth of the pot is aligned with the mouth of the cup, and then tilt the teapot at a certain angle. . this

Hongmeng Smart Travel S9 and full-scenario new product launch conference, a number of blockbuster new products were released together Hongmeng Smart Travel S9 and full-scenario new product launch conference, a number of blockbuster new products were released together Aug 08, 2024 am 07:02 AM

This afternoon, Hongmeng Zhixing officially welcomed new brands and new cars. On August 6, Huawei held the Hongmeng Smart Xingxing S9 and Huawei full-scenario new product launch conference, bringing the panoramic smart flagship sedan Xiangjie S9, the new M7Pro and Huawei novaFlip, MatePad Pro 12.2 inches, the new MatePad Air, Huawei Bisheng With many new all-scenario smart products including the laser printer X1 series, FreeBuds6i, WATCHFIT3 and smart screen S5Pro, from smart travel, smart office to smart wear, Huawei continues to build a full-scenario smart ecosystem to bring consumers a smart experience of the Internet of Everything. Hongmeng Zhixing: In-depth empowerment to promote the upgrading of the smart car industry Huawei joins hands with Chinese automotive industry partners to provide

Distributed Artificial Intelligence Conference DAI 2024 Call for Papers: Agent Day, Richard Sutton, the father of reinforcement learning, will attend! Yan Shuicheng, Sergey Levine and DeepMind scientists will give keynote speeches Distributed Artificial Intelligence Conference DAI 2024 Call for Papers: Agent Day, Richard Sutton, the father of reinforcement learning, will attend! Yan Shuicheng, Sergey Levine and DeepMind scientists will give keynote speeches Aug 22, 2024 pm 08:02 PM

Conference Introduction With the rapid development of science and technology, artificial intelligence has become an important force in promoting social progress. In this era, we are fortunate to witness and participate in the innovation and application of Distributed Artificial Intelligence (DAI). Distributed artificial intelligence is an important branch of the field of artificial intelligence, which has attracted more and more attention in recent years. Agents based on large language models (LLM) have suddenly emerged. By combining the powerful language understanding and generation capabilities of large models, they have shown great potential in natural language interaction, knowledge reasoning, task planning, etc. AIAgent is taking over the big language model and has become a hot topic in the current AI circle. Au

See all articles