Structured law document generation method and system based on large model and knowledge base enhancement

By adopting large-scale models and knowledge base enhancement methods in the generation of legal documents, the problem of difficult legal document generation in the existing technology is solved, and high-quality and compliant legal document generation is achieved.

CN120031008AActive Publication Date: 2025-05-23中国司法大数据研究院有限公司

Patent Information

Application Number
CN202411925971.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-05-23
Estimated Expiration
2044-12-25

AI Technical Summary

Technical Problem

The existing technology is difficult to deal with complex legal situations and deep legal reasoning in the generation of legal documents, and lacks strong knowledge base support, resulting in insufficient legality and accuracy of generated documents.

Method used

A structured legal document generation method based on large-scale models and knowledge base enhancement is adopted, and case descriptions and document types are obtained through user input, legal and regulatory knowledge bases and document template knowledge bases are retrieved, legal documents are generated based on large-scale models, and structured documents are output through HTML language.

Benefits of technology

It improves the readability and generation quality of legal documents, ensures the accuracy and legal compliance of content, and can flexibly respond to complex scenarios and needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120031008A_ABST
    Figure CN120031008A_ABST
Patent Text Reader

Abstract

The invention discloses a structured legal document generation method and system based on large model and knowledge base enhancement, and belongs to the field of structured legal document generation. The method comprises the following steps: acquiring a case description and an official document type according to user input; retrieving a law and regulation knowledge base based on the case description to obtain an associated law article set related to the case description; retrieving a legal official document template knowledge base based on the official document type to obtain a legal official document template set related to the official document type; under the condition that a legal official document template which is suitable for case description and consistent with the type of the official document exists in the legal official document template set, generating a legal official document input by the user based on the user input, the associated law article set and the legal official document template; otherwise, performing network search according to the document type to generate the structured legal document. According to the method, the readability of the legal official document can be improved, and more intuitive reading experience is provided for a user.
Need to check novelty before this filing date? Find Prior Art

Claims

1. A structured legal document generation method based on a large model and knowledge base enhancement, characterized in that: The method comprises: obtaining a case description and a document type according to user input; Searching a legal and regulatory knowledge base based on the case description to obtain a set of related laws and regulations related to the case description; Searching a legal document template knowledge base based on the document type to obtain a set of legal document templates related to the document type; Determine whether there is a legal document template in the legal document template set that is suitable for the case description and consistent with the document type; When there is a legal document template in the legal document template set that is suitable for the case description and consistent with the document type, the legal document input by the user is generated based on the user input, the associated legal article set and the legal document template.

2. The method according to claim 1, characterized in that The obtaining of case description and document type according to user input includes: Determine whether the length of the text input by the user is greater than a set threshold, and summarize the user input whose text length is greater than the set threshold; The user input or user input summary whose text length is less than a set threshold is embedded into the intention understanding prompt template, and the case description and document type are generated based on the big model; wherein the content of the intention understanding prompt template also includes: a first prompt.

3. The method according to claim 1, characterized in that After searching the legal and regulatory knowledge base based on the case description to obtain a set of related laws and regulations related to the case description, the method further includes: The case description, the document type and any related legal provision are embedded into a legal provision semantic parsing template, and a semantic parsing result of the related legal provision is generated based on the big model; wherein the content of the legal provision semantic parsing template also includes: a second prompt; Combine the semantic analysis results with the applicable rules of laws and regulations pre-organized by legal experts to construct conditional rules; Determine whether the associated legal provision is suitable for generating the legal document input by the user in combination with the conditional rules; When the associated legal provision is not suitable for generating the legal document input by the user, the associated legal provision is deleted from the associated legal provision set.

4. The method according to claim 1, characterized in that: Based on the document type, a legal document template knowledge base is searched to obtain a set of legal document templates related to the document type, including: Generate a sparse vector and a dense vector of the document type; A mixed vector search is performed on the legal document template knowledge base based on the sparse vector and the dense vector to obtain a set of legal document templates related to the document type.

5. The method according to claim 1, characterized in that Determining whether there is a legal document template in the legal document template set that is suitable for the case description and consistent with the document type includes: The case description, the official document type and the legal document template set are embedded into a legal document template screening template, and based on the big model, it is determined whether there is a legal document template in the legal document template set that is suitable for the case description and consistent with the official document type; wherein the content of the legal document template screening template also includes: a third prompt.

6. The method according to claim 1, characterized in that Generating a legal document input by the user based on the user input, the associated legal article set and the legal document template, including: The user input, the associated legal article set and the legal document template are embedded into a legal document generation template, and the legal document input by the user is generated based on the large model; wherein the content of the legal document generation template also includes: a fourth prompt.

7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: If there is no legal document template suitable for the case description and consistent with the document type in the legal document template set, a network search is performed based on the document type to obtain the latest document knowledge in the legal field; The user input, the set of related laws and the latest official document knowledge in the legal field are embedded into a legal document generation template, and the legal document input by the user is generated based on the big model; wherein the content of the legal document generation template also includes: a fourth prompt.

8. A structured legal document generation system based on a large model and knowledge base enhancement, characterized in that: The system includes: an intention understanding module for obtaining a case description and a document type based on user input; A knowledge base search module is used to search a legal and regulatory knowledge base based on the case description to obtain a set of related laws and regulations related to the case description; and to search a legal document template knowledge base based on the document type to obtain a set of legal document templates related to the document type; The official document generation module is used to determine whether there is a legal document template suitable for the case description and consistent with the official document type in the legal document template set; if there is a legal document template suitable for the case description and consistent with the official document type in the legal document template set, the legal document input by the user is generated based on the user input, the associated legal article set and the legal document template.

9. An electronic device, characterized in that: The electronic device comprises: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the structured legal document generation method based on large model and knowledge base enhancement as described in any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, which, when executed by a processor, implement the structured legal document generation method based on a large model and knowledge base enhancement as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Legal provision information recommendation system based on knowledge base and large model

    CN117370539A

  • Medical document generation method and device, electronic equipment and storage medium

    CN117393099A

  • Data processing method and device based on large language model and block chain

    CN117952212A

  • Document generation method and device and computer readable storage medium

    CN118261753A

  • Structured data question and answer method and device and medium

    CN118349654A

Cited By

  • User question answering method and system, electronic equipment and readable storage medium

    CN120744050A

  • Official document content generation and compliance verification system based on large language model

    CN120873172A

  • Conversation contradiction recognition method and system based on thinking chain of acoustic model and large language model

    CN121884791A

  • Dialogue contradiction identification method and system based on acoustic model and large language model thought chain

    CN121884791B