SuperAPI AI Directory

LaWGPT - A Chinese Legal Large Language Model Launched by Nanjing University

Author: AI小集 · Original source: AI工具集

What is LaWGPT

LaWGPT is a Chineselegallarge language model launched by Nanjing University. Based on the LLaMA model for secondary pre-training, it incorporates a large amount of Chinese legal knowledge. Focused on the legal field, it can understand and generate legal-related texts, suitable for various scenarios such as legal consultation, case analysis, and legal document generation. LaWGPT has multiple versions including LaWGPT-7B-alpha and LaWGPT-7B-beta1.0. The model has been trained on massive Chinese legal texts and possesses a rich reserve of legal knowledge.

LaWGPT

Main Functions of LaWGPT

  • Legal Consultation: Users can consult LaWGPT on various legal issues, such as contract disputes, labor law issues, intellectual property protection, etc. Based on the user's questions, it provides corresponding legal interpretations and suggestions.
  • Legal Document Generation: Based on text generation capabilities, it can assist lawyers and legal professionals in quickly generating legal documents, such as contracts and complaints, improving work efficiency.
  • Judicial Examination Assistance: It can be used to assist in preparing for the Chinese judicial examination. By simulating exam questions and providing explanations, it helps candidates better understand and master legal knowledge.
  • Legal Education and Training: It can serve as a legal education tool to help students and teachers better understand legal knowledge and improve teaching effectiveness.
  • Intelligent Customer Service: Applied in the field of intelligent customer service, it automatically answers users' legal questions and improves customer service efficiency.

Technical Principles of LaWGPT

  • Base Architecture: LaWGPT is extended and optimized based on general Chinese base models (such as Chinese-LLaMA, ChatGLM, etc.). This provides LaWGPT with powerful language generation and understanding capabilities.
  • Legal Domain Vocabulary Expansion: To better handle legal issues, LaWGPT expands the specialized vocabulary of the legal domain. The model can more accurately recognize and understand legal terminology and its contextual relationships, demonstrating higher semantic understanding in legal texts.
  • Large-Scale Legal Corpus Pre-training: LaWGPT uses large-scale Chinese legal corpora for pre-training. The corpora include legal documents, codes, judicial cases, etc., covering a wide range of content from the constitution to local regulations. Through pre-training, the model learns the grammar, semantics, and context of legal language, enhancing its basic semantic understanding in the legal field.
  • Instruction Fine-tuning: On the basis of pre-training, LaWGPT underwent instruction fine-tuning. The development team constructed a legal domain dialogue question-answering dataset and a Chinese judicial examination dataset. By fine-tuning the model with these datasets, it further improved the model's ability to understand and answer legal questions.
  • Knowledge-Guided Data Generation Framework (KGDG): LaWGPT adopts the Knowledge-Guided Data Generation Framework (KGDG), which includes the following key components:
    • KGGEN: Introduces legal documents as a knowledge base, and generates content containing questions and reasoning paths through a knowledge-aware sampler and knowledge-guided writer.
    • KGFIX and DAVER: Used to fix errors in reasoning paths and references, and verify the quality of generated data.
    • MITRA: Generates standard question-answer pairs and question-answer pairs with explicit reasoning paths, providing the model with richer training data.

LaWGPT Project Address

Application scenarios of LaWGPT

  • Legal research: LaWGPT can help researchers quickly find relevant laws and regulations, cases, and literature, accelerating the research process. It can help researchers quickly understand relevant laws and regulations and speed up policy analysis.
  • Case analysis: LaWGPT can help lawyers quickly understand the details of complex cases and generate preliminary analysis reports. In judicial practice, lawyers and judges can refer to LaWGPT's precise interpretation of relevant legal provisions, as well as reasonable judgment recommendations generated based on the analysis of a large number of cases, to quickly clarify the thinking of a case and make fair and efficient judgments.
  • Policy research: LaWGPT can help researchers quickly find and understand relevant laws and regulations, accelerating policy analysis.