# ChatLaw

- Category: Industry tools
- Official site: https://github.com/PKU-YuanGroup/ChatLaw
- HTML: https://www.88z.ai/en/tools/chatlaw
- Markdown: https://www.88z.ai/en/tools/chatlaw.md

ChatLaw is a Chinese legal Large Language Model developed by PKU-YuanGroup, designed to address hallucination risks in AI legal services.

## What is ChatLaw?

ChatLaw is a Chinese legal Large Language Model developed by PKU-YuanGroup, designed to address hallucination risks in AI legal services.It combines a Mixture-of-Experts (MoE) architecture with a multi-agent collaboration system and knowledge graph enhancements to deliver reliable and accurate legal consulting.

By simulating standard operating procedures (SOPs) inspired by law firm workflows, ChatLaw integrates information gathering, legal research, and comprehensive advice generation into detailed Legal Consultation Reports.It outperforms GPT-4 in Lawbench and the Unified Qualification Exam for Legal Professionals, demonstrating robust professional logical reasoning capabilities.

## Key features

- **Mixture-of-Exper**：The latest ChatLaw2-MoE is based on the InternLM architecture with a 4x7B MoE design, specifically tailored for Chinese legal language processing.
- **Multi-Agent Coll**：Simulates real law firm workflows by coordinating multiple agents for information gathering, legal research, and report generation, significantly minimizing errors and hallucinations.
- **Knowledge Graph**：Integrates knowledge graph technology and trains on a high-quality legal dataset curated with artificial screening to improve legal basis and relevance.
- **Text2Vec Matchin**：Includes a text similarity model trained on 93,000 court case decisions, accurately matching user queries to pertinent legal statutes.
- **Superior Benchma**：Achieves 7.73% higher accuracy than GPT-4 in Lawbench and leads by 11 points in the Unified Qualification Exam for Legal Professionals.

## How to use it

1. Visit the GitHub repository PKU-YuanGroup/ChatLaw to access project code and resources.
2. Select the appropriate model version based on your needs, such as the latest ChatLaw2-MoE or the 13B version based on Ziya-LLaMA.
3. Configure the environment and load model weights following the instructions in the README.
4. Deploy the multi-agent system to initiate the legal consultation process, including information gathering and report generation.
5. Utilize the Text2Vec component to enhance the precision of matching queries to legal statutes.

## Where it fits

- **Complex Case Con**：Suitable for complex scenarios requiring multi-dimensional legal analysis and logical reasoning, such as divorce or contract disputes.
- **Legal Statute Re**：Helps users quickly find the most relevant legal basis from a vast amount of judgment documents.
- **Bar Exam Prepara**：Assists candidates in professional knowledge training, leveraging its superior performance in the Unified Qualification Exam for Legal Professionals.

## Pricing and free quota

ChatLaw is an open-source project; deployment costs depend on hardware resources.Pricing follows the official site.

## Who it is for

- Legal Practitioners
- Legal Researchers
- AI Developers
- Law Students

## FAQ

### How does ChatLaw reduce AI hallucinations?

It significantly improves accuracy and reliability by integrating knowledge graphs, high-quality datasets with artificial screening, and a multi-agent collaboration mechanism simulating law firm SOPs.

### Which model version is recommended?

The latest ChatLaw2-MoE is recommended, as it is based on the InternLM architecture with a Mixture-of-Experts design tailored for Chinese legal processing.

### What legal tasks does ChatLaw support?

It supports case classification, public opinion analysis, legal cognitive tasks, and complex legal consultation report generation.

## Tags

Legal AI · Large Language Model · Knowledge Graph

Features, pricing and availability follow the official site. Except for 88z.ai’s own API pages, this is a third-party product; 88z.ai only provides a directory introduction.
