Law enforcement document generation method and system based on large model prompt project
The large-scale model prompting project has solved the problems of information omissions and limited legal citations caused by manual processing in administrative law enforcement, and has achieved efficient and accurate generation of law enforcement documents, thereby improving the quality of law enforcement judgments.
Patent Information
- Application Number
- CN202511137218.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-14
- Publication Date
- 2026-01-27
AI Technical Summary
In the current technology, when handling illegal cases, administrative law enforcement departments rely on manual processing for the preparation of investigation records and legal documents, which leads to problems such as information omissions, inconsistencies, and single legal references, resulting in inaccurate law enforcement judgments.
The method of big model-based prompting engineering is adopted. By determining case type information, generating question information, extracting target fields, and using legal knowledge base and language model to generate law enforcement documents, the method performs structured transformation and verification to ensure the accuracy and efficiency of law enforcement documents.
It improved the efficiency of record-keeping and document preparation, enhanced the accuracy of law enforcement judgments, and generated high-quality law enforcement documents.
Smart Images

Figure CN121413587A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of natural language processing technology, and in particular to a method and system for generating law enforcement documents based on large model prompting engineering. Background Technology
[0002] Currently, when handling cases of illegal activities, administrative law enforcement departments still rely primarily on manual drafting and template filling for the preparation of investigation records, inspection records, and subsequent legal documents. This has the following shortcomings: (1) Law enforcement officers manually copy and paste between multiple documents, and names, locations and times are often omitted or inconsistent; (2) On-site questioning and answering rely entirely on experience, and key elements are easily omitted or leading questions are asked; (3) The legal provisions and regulations are cited in a single way, which is difficult to meet the requirements of law enforcement judgments for complex cases, resulting in inaccurate law enforcement judgments and unreasonable content of law enforcement documents. Summary of the Invention
[0003] This invention provides a method and system for generating law enforcement documents based on large-scale model-based engineering, addressing the shortcomings of existing technologies that rely on manual processing and rely on limited legal provisions, making it difficult to meet the requirements of complex cases and resulting in inaccurate law enforcement documents. The method described in this invention improves the efficiency of record-keeping, inspection, and document preparation, and increases the accuracy of law enforcement judgments, thereby yielding high-quality law enforcement documents.
[0004] This invention provides a method for generating law enforcement documents based on large-scale model-based prompting engineering, comprising: Determine the problem information based on the type of violation in the case; The system responds to the question information and extracts target fields from the responded question information. The target fields include illegal information and evidence of illegality. Based on the legal knowledge base, the applicable laws and regulations corresponding to the illegal information and the evidence of illegality are assessed to obtain legal document prompts. Based on the first language model, the corresponding enforcement documents are generated according to the legal document prompts. The applicable laws and regulations include at least two laws and regulations, which are ordered according to priority.
[0005] According to the present invention, a method for generating law enforcement documents based on large model prompting engineering is provided, wherein determining the problem information based on the violation type information of the case includes: Determine the corresponding question prompt template for the type of violation from the prompt template set; Based on the second language model, corresponding question information is generated according to the question prompt words.
[0006] According to the present invention, a method for generating law enforcement documents based on large-scale model prompting engineering, after extracting the target field from the question information after the response, the method further includes: The target field is subjected to a structured transformation, and the transformed target field is subjected to a target validation operation to obtain a validated field; wherein, the target validation operation includes at least one of cross-document field comparison, conflict marking, and missing value detection, which is confirmed with the user.
[0007] According to the present invention, a method for generating law enforcement documents based on a large model prompting project is provided, wherein different laws in the legal knowledge base correspond to different resource identifiers; each resource identifier is a unique reference identifier for the corresponding legal provision in different regions and years.
[0008] According to the present invention, a method for generating law enforcement documents based on a large-scale model prompting engineering, after generating the corresponding law enforcement document based on the legal document prompting words using a first large-scale language model, the method further includes: The paragraphs, font sizes, and signatures of the law enforcement documents are standardized, and a target verification operation is performed on the processed law enforcement documents to obtain the verified law enforcement documents.
[0009] This invention also provides a law enforcement document generation system based on large model prompting engineering, comprising: The issue acquisition module is used to determine issue information based on the type of violation in a case. The field extraction module is used to respond to the question information and extract target fields from the responded question information. The target fields include illegal information and evidence of illegality. The enforcement document generation module is used to assess the applicable laws and regulations corresponding to the illegal information and the evidence of illegality based on the legal knowledge base, obtain legal document prompts, and generate corresponding enforcement documents based on the first language model according to the legal document prompts; wherein, the applicable laws and regulations include at least two laws and regulations, and the laws and regulations are ordered according to priority.
[0010] According to the present invention, a law enforcement document generation system based on large model prompting engineering is provided, the system further comprising: The verification module is used to extract the target field from the question information after the response, perform a structured transformation on the target field, and perform a target verification operation on the transformed target field to obtain the verified field; wherein, the target verification operation includes at least one of cross-document field comparison, conflict marking, and missing value detection, and confirmation with the user.
[0011] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the law enforcement document generation system method based on large model prompting engineering as described above.
[0012] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the law enforcement document generation system method based on large model prompting engineering as described above.
[0013] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the law enforcement document generation system method based on large model prompting engineering as described above.
[0014] The present invention provides a law enforcement document generation system and method based on a large-scale model prompting engineering. This system determines problem information based on the type of violation in a case, responds to the problem information, extracts target fields from the responded problem information, and then assesses the applicable laws corresponding to the violation information and evidence based on a legal knowledge base to obtain legal document prompts. Finally, it generates the corresponding law enforcement document based on the legal document prompts using a first large-scale language model. This improves the efficiency of record investigation, inspection, and document preparation, and increases the accuracy of law enforcement judgments, thereby obtaining high-quality law enforcement documents. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0016] Figure 1 This is a flowchart illustrating the law enforcement document generation method based on large model prompting engineering provided by the present invention.
[0017] Figure 2 This is a schematic diagram of the structure of the law enforcement document generation system based on large model prompting engineering provided by the present invention.
[0018] Figure 3 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0020] The following is combined with Figures 1-2This invention describes a method and system for generating law enforcement documents based on large model prompting engineering.
[0021] Figure 1 This is a flowchart illustrating the law enforcement document generation method based on large model prompting engineering provided by the present invention, as shown below. Figure 1 As shown, the method includes the following steps: Step 110: Determine the problem information based on the type of violation information of the case.
[0022] In this step, the application scenario of the case or event mentioned in this invention can be an administrative law enforcement scenario that requires investigation and inquiry, such as water administration law enforcement, market supervision law enforcement, urban management law enforcement, etc.
[0023] In this embodiment, the case scenario can be a water administration law enforcement scenario, and the types of violations in this scenario include, but are not limited to, illegal sand mining, illegal water extraction, and damage to water conservancy projects.
[0024] Specifically, when the type of violation is "illegal sand mining," the question could be, "Please specify whether the sand mining site is located within the river management area?" In this embodiment, the type of violation can be directly associated with the problem information. For example, multiple problem information can be set for the types of violations in different scenarios, and a mapping relationship can be established based on the correlation between the types of violations and the problem information.
[0025] In this embodiment, the violation type and the problem information can also be associated through a preset prompt word template to build a mapping relationship between violation type, problem prompt word and problem. This can be used to further associate and filter the problem information to be selected, ensuring a strong match between the violation type and the problem information.
[0026] In this embodiment, the type of violation in a case can be obtained through expert knowledge or predicted by a pre-trained case violation identification model.
[0027] Step 120: Respond to the question information and extract the target fields from the responded question information. The target fields include illegal information and evidence of illegality.
[0028] In this step, the questions to be investigated can be answered by human questioning, that is, by human filling out a written record.
[0029] In this embodiment, the question and answer method can be "question and answer".
[0030] In this embodiment, corresponding instructions can also be input on the terminal via voice or keypad input. The terminal responds to the instruction and converts the instruction into text content to fill the corresponding question.
[0031] In this embodiment, key target fields, including illegal information (such as the location of sand mining and whether a permit has been obtained) and evidence of illegality (such as the statements of the parties involved and on-site photos), can be extracted automatically or semi-automatically from the response information. For example, when the type of violation is "illegal sand mining", the target field includes information such as the time, location, method, and amount of sand mined during the violation.
[0032] In this embodiment, natural language processing (NLP) technology can be used to extract target fields from the response information.
[0033] In this embodiment, the extracted target fields can be stored in a structured form in the database for easy access later.
[0034] Step 130: Based on the legal knowledge base, assess the applicable laws and regulations corresponding to the illegal information and evidence of illegality to obtain legal document prompts, and generate corresponding enforcement documents based on the first language model according to the legal document prompts; among them, the applicable laws and regulations include at least two laws and regulations, and each law and regulation is ordered according to priority.
[0035] In this step, the regulatory knowledge base can be a publicly available database, including various types of laws, regulations, and their implementing rules.
[0036] In this embodiment, there may be multiple applicable laws associated with the current case materials. These multiple laws can be prioritized, for example, by their level of legal effect or degree of applicability. Specifically, the following discretionary criteria can be used to apply the applicable regulations: based on principles such as "priority of special laws" and "aggravation / leniency", and provide a combination of "main law provision + alternative law provisions + suggested penalty range", and finally provide the reasons for recommendation in the explanation section of the document (the reasons for recommendation can be added manually or set in advance and called directly through relevant instructions) to facilitate subsequent legal review.
[0037] In this embodiment, a mapping relationship can be constructed between illegal materials (illegal information + illegal evidence) and legal document prompts (such as constructing a mapping relationship table), and the legal document prompts corresponding to the current illegal materials can be directly queried from the table.
[0038] In this embodiment, the enforcement documents may include various types, such as a notice ordering rectification within a specified time, an investigation conclusion report, a prior notice of administrative penalty, and an administrative penalty decision. In this embodiment, the first language model can be obtained through pre-experiment training; for example, it can be obtained by iteratively training and optimizing the neural network using multiple sample law enforcement documents selected from a publicly available law enforcement document database as training samples and using law enforcement document type as prompt words.
[0039] In this embodiment, the generation of law enforcement documents in batches based on legal document prompts using the first major language model can effectively improve the efficiency of law enforcement document generation.
[0040] The law enforcement document generation method based on a large model prompting engineering provided in this invention determines the problem information through the type of violation information of the case, responds to the problem information, extracts the target field from the responded problem information, and then deliberates on the applicable laws corresponding to the violation information and evidence based on the legal knowledge base to obtain legal document prompt words. Finally, the corresponding law enforcement document is generated based on the first large language model according to the legal document prompt words. This improves the efficiency of record investigation, inspection and document preparation, and improves the accuracy of law enforcement judgments, thereby obtaining high-quality law enforcement documents.
[0041] In some embodiments, determining the question information based on the violation type information of the case includes: determining the question prompt word template corresponding to the violation type information from the prompt word template set; and generating the corresponding question information based on the question prompt word using the second language model.
[0042] In this embodiment, a series of predefined prompt word templates can be stored in a database or knowledge graph. Each template corresponds to one or more types of violations. The template contains some placeholders for subsequent filling in based on specific case information.
[0043] In this embodiment, law enforcement officers only need to input phrases such as "illegal sand mining" or "illegal detention" to instantly locate the corresponding set of legal provisions and prompt word templates through a pre-set "one-to-one mapping table," providing a standardized questioning framework for different types of cases and ensuring the standardization and completeness of the questions.
[0044] In this embodiment, a prompt word template matching the type of violation in the current case is used as a structured input to the second language model to generate question information, guiding the model to generate targeted questions.
[0045] In this embodiment, the second major language model is a pre-trained natural language processing model (e.g., a simplified version of LLM, fine-tuned for a specific law enforcement domain) used to convert prompt word templates into specific question information.
[0046] Specifically, when law enforcement officers receive a report that someone is illegally mining sand in a certain river, they enter the type of violation, "illegal sand mining," into the system. The system then finds the corresponding prompt word template from the prompt word template set, which includes the following: "Prompt 1: Please describe the sand mining location in detail: {Sand Mining Location};" Prompt 2: Has a sand mining permit been obtained? {Has a permit been obtained?} Hint 3: What are the tools and methods used in sand mining? {Sand mining tools and methods} Hint 4: What was the actual amount of sand mined? {Amount of sand mined} Hint 5: What are the specific start and end times of the sand mining operation? {Sand mining time}.
[0047] Then, the prompt word is input into the second language model, which outputs relevant question information, including the following: "Question 1: Please describe in detail the specific location where you are mining sand, including the name of the river channel and its exact location."
[0048] Question 2: Do you have a valid sand mining permit? If so, please provide the permit number.
[0049] Question 3: Please describe in detail the sand mining tools and methods you used.
[0050] Question 4: What was the actual amount of sand you mined? Please provide an estimate.
[0051] Question 5: When did your sand mining operation begin and end? The law enforcement document generation method based on large model prompting engineering provided in this invention realizes the automated generation of problem information by combining prompt word templates and a second large language model. It effectively solves the problems of low efficiency and difficulty in guaranteeing quality in traditional manual problem writing. In the scenario of water administration law enforcement (illegal sand mining), it can significantly improve law enforcement efficiency and standardization, and reduce the requirements for the professional knowledge of law enforcement personnel.
[0052] In some embodiments, after extracting the target field from the question information after the response, the law enforcement document generation method based on large model prompting engineering further includes: performing a structured transformation on the target field, and performing a target verification operation on the transformed target field to obtain the verified field; wherein, the target verification operation includes at least one of cross-document field comparison, conflict marking, and missing value detection, and confirmation with the user.
[0053] In this embodiment, the structured transformation includes: extracting unstructured target fields from the response information and converting them into structured data formats, such as JSON, XML, or database tables, to facilitate subsequent data verification, analysis, and document generation.
[0054] In this embodiment, cross-document field comparison can be used to compare target fields in the current case with fields in historical cases or related documents to detect data consistency and discover possible false statements or errors; for example, comparing the amount of sand mined in this inquiry with previous reports or on-site inspection records.
[0055] In this embodiment, the conflict marker can be used to mark conflicting fields when data inconsistencies are found during cross-document field comparison, prompting law enforcement officers to conduct further verification. This serves to highlight suspicious data and guide law enforcement officers to focus on it. In this embodiment, missing value detection is used to check whether there are missing values in the target field, to ensure the integrity of the data and avoid affecting the accuracy of the document due to the lack of key information; for example, missing key information such as sand mining location and sand mining time.
[0056] In this embodiment, user confirmation includes: displaying the verification results to law enforcement officers for confirmation or modification, ensuring the accuracy and reliability of the final data, and allowing law enforcement officers to make adjustments according to the actual situation.
[0057] The law enforcement document generation method based on large model prompting engineering provided by this invention effectively improves the quality and reliability of data by performing structured transformation and verification of target fields. In particular, in the cross-document field comparison process, it can discover potential false statements and help law enforcement officers better understand the case.
[0058] In some embodiments, different regulations in the regulatory knowledge base correspond to different resource identifiers; each resource identifier is a unique reference identifier for the corresponding legal provision in different regions and years.
[0059] In this embodiment, the resource identifier (RID) can be designed as a URI (Uniform ResourceIdentifier) to enable broader application and interoperability.
[0060] In this embodiment, URIs are used as identifiers for each regulation or legal provision in the regulatory knowledge base. When regulatory data is entered into the database, the corresponding URIs are automatically generated.
[0061] In this embodiment, each regulation entry has a unique URI. Even different versions of the same regulation (such as multiple versions specified in different regions or years) will have different URIs. This method can not only serve as a unique identifier for the regulation, but also as a unified entry point for accessing the regulatory resource.
[0062] For example, taking the first local regulation promulgated in City A in 2023 as an example, its URI can be designed as follows: "https: / / law.example.com / local / A / 2023 / 001"; Alternatively, the URI of the third administrative regulation promulgated by City B in 2022 could be designed as follows: "https: / / law.example.com / reg / B / 2022 / 003".
[0063] The law enforcement document generation method based on large model prompting engineering provided in this invention can effectively solve the problems in law citation and management by setting different resource identifiers for different laws in the legal knowledge base. Each resource identifier is a unique reference identifier for the corresponding legal provision in different regions and years. This improves the usability and reliability of the legal knowledge base. At the same time, each resource identifier can serve as a unique index for the corresponding law, making it network addressable and interoperable.
[0064] In some embodiments, after generating the corresponding law enforcement document based on the legal document prompt words according to the first large language model, the law enforcement document generation method based on the large model prompt engineering further includes: standardizing the paragraphs, font size and signature of the law enforcement document, and performing a target verification operation on the processed law enforcement document to obtain the verified law enforcement document.
[0065] In this embodiment, the standardization operation includes: unifying and standardizing the format of the effective content of law enforcement documents (such as paragraphs, font size, signatures, and other key elements).
[0066] In this embodiment, regular expressions or natural language processing techniques can be used to identify paragraph boundaries in the document and to reasonably divide it according to the content logic in order to achieve paragraph standardization; for example, each legal basis, factual statement, and decision should be a separate paragraph.
[0067] In this embodiment, the font, font size, and bold / italic settings of the documents are uniformly configured: the font size is standardized by bolding or italicizing the content that needs to be emphasized.
[0068] In this embodiment, the exact location of the signature is determined according to the document type, and an electronic seal image is automatically inserted at the designated location (image processing technology can be used to ensure the clarity and appropriate size of the seal). By reserving a space for the responsible person's signature and providing electronic signature functionality, the signature standardization is achieved.
[0069] In this embodiment, four types of verification are performed again on the standardized law enforcement documents: cross-document field comparison, conflict marking, missing value detection, and user confirmation. The specific implementation methods are as shown in the above embodiment, and will not be repeated in this embodiment.
[0070] The law enforcement document generation method based on large model prompting engineering provided in this invention can significantly improve the quality and efficiency of law enforcement documents, reduce the workload of manual review, and lower law enforcement risks through standardized processing and target verification operations.
[0071] Taking the case of "illegal sand mining" in water administration as an example, the technical process of generating law enforcement documents is explained as follows: Law enforcement officers input "illegal sand mining" into the system → the system instantly loads the corresponding prompts → the large model generates 12 questions → the answers are filled in on-site → the system extracts 500 cubic meters of sand mining volume but finds it does not match the inspection record, automatically marking it in red → the inspection coordinates are added → the verification is passed → the system suggests applying Article 39 of the Water Law and Article 20 of the River Management Regulations → four documents are output at once → the law enforcement officers sign to confirm → the case is archived.
[0072] The law enforcement document generation system based on large model prompting engineering provided by the present invention will be described below. The law enforcement document generation system based on large model prompting engineering described below can be referred to in correspondence with the law enforcement document generation method based on large model prompting engineering described above.
[0073] Figure 2 This is a schematic diagram of the structure of the law enforcement document generation system based on large model prompting engineering provided by the present invention, as shown below. Figure 2 As shown, the law enforcement document generation system based on large model prompting engineering includes: a problem acquisition module 210, a field extraction module 220, and a law enforcement document generation module 230.
[0074] The problem acquisition module 210 is used to determine problem information based on the type of violation information of the case; The field extraction module 220 is used to respond to the question information and extract target fields from the responded question information. The target fields include illegal information and evidence of illegality. The enforcement document generation module 230 is used to assess the applicable laws and regulations corresponding to the illegal information and evidence based on the legal knowledge base, obtain legal document prompts, and generate corresponding enforcement documents based on the first language model according to the legal document prompts; among them, the applicable laws and regulations include at least two laws and regulations, which are ordered according to priority.
[0075] The law enforcement document generation system based on a large-scale model prompting engineering provided in this invention determines the problem information through the type of violation information of the case, responds to the problem information, extracts the target field from the responded problem information, and then deliberates on the applicable laws corresponding to the violation information and evidence based on the legal knowledge base to obtain legal document prompt words. Finally, the corresponding law enforcement document is generated based on the first large-scale language model according to the legal document prompt words, which improves the efficiency of record investigation, inspection and document preparation, and improves the accuracy of law enforcement judgments, thereby obtaining high-quality law enforcement documents.
[0076] In some embodiments, the law enforcement document generation system based on large model prompting engineering further includes: a verification module.
[0077] The validation module is used to extract the target field from the question information after the response, perform a structured transformation on the target field, and perform a target validation operation on the transformed target field to obtain the validated field; wherein, the target validation operation includes at least one of cross-document field comparison, conflict marking, and missing value detection, which is confirmed with the user.
[0078] The law enforcement document generation system based on large model prompting engineering provided in this invention effectively improves the quality and reliability of data by performing structured transformation and verification of target fields. In particular, in the cross-document field comparison process, it can detect potential false statements and help law enforcement officers better understand the case.
[0079] In one embodiment, the law enforcement document generation system based on large model prompting engineering further includes: (1) The violation type-driven module is used for law enforcement officers to input phrases such as "illegal sand mining" and "illegal detention". The module can instantly locate the corresponding set of legal clauses and templates through a pre-set "one-to-one mapping table", which can provide data samples for the large language model used to generate transcripts.
[0080] In this embodiment, the system locks down the entire subsequent process by manually identifying the type of violation, thus avoiding the uncertainty caused by "letting the model guess". (2) Dynamic prompt word template management module, which is used to generate supplementary questions and return them to the question and answer stage when the required information such as "name of the party concerned" and "location of violation" is found to be empty.
[0081] It should be noted that each time information is supplemented, the template version number automatically increments and records the person who made the modification, the time, and the reason. This allows the "dynamic changes at the case scene" to be synchronized to the large model's call prompts in real time, ensuring a seamless connection between the questions and the facts.
[0082] (3) Automatic generation module for investigation and inquiry records, used to limit the length of each question and actively cite the complete legal provisions in the first sentence of the question; for example: "According to Article 39 of the Water Law, please explain whether the sand mining site is located within the scope of river management."
[0083] Meanwhile, law enforcement officers can view the real-time streaming questions on their mobile devices and delete or rearrange them at any time if they find anything inappropriate; the system automatically records the human intervention in this step for auditing purposes.
[0084] (4) Transcript content structured extraction and four-level consistency verification module, which is used to combine deep learning named entity recognition and rule correction to accurately capture elements such as names, time, location, behavior mode, and evidence number, and improve the quality of target fields through a four-level verification chain (cross-document field comparison, conflict marking, missing value detection and user confirmation).
[0085] (5) The regulatory knowledge base and discretionary benchmark matching module is used to set a unique index for each regulation in the regulatory knowledge base, and automatically give the combination of "main law + alternative law + suggested penalty range" according to the principles of "special law priority" and "heavier / lighter penalty", and write the reasons for recommendation in the document description section to facilitate the review by the superior legal system; at the same time, through this module, the matching logic and weight parameters of illegal materials and applicable regulations are fully open to auditors, and the hit path and threshold can be viewed in the background.
[0086] (6) Batch generation module for legal documents, which is used to inject the same set of fields into multiple templates such as order to rectify within time limit, investigation conclusion report, prior notice of administrative penalty, and administrative penalty decision, so as to realize parallel rendering of multiple documents; it is also used to automatically apply the paragraph, font size and QR code signature position of the relevant format standard to the output document to ensure that it can be used directly after printing; it is also used to trigger consistency verification again, and any field in the law enforcement document will be overwritten to prevent the inertial error of "unsynchronized modification".
[0087] Figure 3 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 3 As shown, the electronic device may include a processor 310, a communications interface 320, a memory 330, and a communication bus 340. The processor 310, communications interface 320, and memory 330 communicate with each other via the communication bus 340. The processor 310 can call logical instructions in the memory 330 to execute a law enforcement document generation method based on a large-scale model prompting project. This method includes: determining problem information based on the type of violation in the case; responding to the problem information and extracting target fields from the responded problem information, the target fields including violation information and evidence of violation; assessing the applicable laws corresponding to the violation information and evidence of violation based on a legal knowledge base to obtain legal document prompts; and generating corresponding law enforcement documents based on the legal document prompts using a first large-scale language model. The applicable laws include at least two laws, which are ordered by priority.
[0088] Furthermore, the logical instructions in the aforementioned memory 330 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0089] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the law enforcement document generation method based on the large model prompting engineering provided by the above methods. The method includes: determining question information based on the type of violation information of the case; responding to the question information and extracting target fields from the responded question information, the target fields including violation information and evidence of violation; deliberating on the applicable laws and regulations corresponding to the violation information and evidence of violation based on a legal knowledge base to obtain legal document prompt words, and generating corresponding law enforcement documents based on the legal document prompt words according to a first large language model; wherein the applicable laws and regulations include at least two laws and regulations, which are ordered according to priority.
[0090] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the law enforcement document generation method based on the large model prompting engineering provided by the above methods. The method includes: determining question information based on the type of violation information of the case; responding to the question information and extracting target fields from the responded question information, the target fields including violation information and evidence of violation; assessing the applicable laws and regulations corresponding to the violation information and evidence of violation based on a legal knowledge base to obtain legal document prompt words, and generating corresponding law enforcement documents based on the legal document prompt words using a first large language model; wherein the applicable laws and regulations include at least two laws and regulations, which are ordered according to priority.
[0091] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0092] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0093] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for generating law enforcement documents based on large-scale model-based prompting engineering, characterized in that, include: Determine the problem information based on the type of violation in the case; The system responds to the question information and extracts target fields from the responded question information. The target fields include illegal information and evidence of illegality. Based on the legal knowledge base, the applicable laws and regulations corresponding to the illegal information and the evidence of illegality are assessed to obtain legal document prompts. Based on the first language model, the corresponding enforcement documents are generated according to the legal document prompts. The applicable laws and regulations include at least two laws and regulations, which are ordered according to priority.
2. The method for generating law enforcement documents based on large-scale model prompting engineering according to claim 1, characterized in that, The determination of problem information based on the type of violation in the case includes: Determine the corresponding question prompt template for the type of violation from the prompt template set; Based on the second language model, corresponding question information is generated according to the question prompt words.
3. The method for generating law enforcement documents based on large-scale model-based prompting engineering as described in claim 1, characterized in that, After extracting the target field from the question information following the response, the method further includes: The target field is subjected to a structured transformation, and the transformed target field is subjected to a target validation operation to obtain a validated field; wherein, the target validation operation includes at least one of cross-document field comparison, conflict marking, and missing value detection, which is confirmed with the user.
4. The method for generating law enforcement documents based on large-scale model-based prompting engineering according to claim 1, characterized in that, Different laws and regulations in the legal knowledge base correspond to different resource identifiers; each resource identifier is a unique reference identifier for the corresponding legal provision in different regions and years.
5. The method for generating law enforcement documents based on large-scale model-based prompting engineering according to claim 1, characterized in that, After generating the corresponding enforcement document based on the legal document prompts using the first major language model, the method further includes: The paragraphs, font sizes, and signatures of the law enforcement documents are standardized, and a target verification operation is performed on the processed law enforcement documents to obtain the verified law enforcement documents.
6. A law enforcement document generation system based on large-scale model prompting engineering, characterized in that, include: The issue acquisition module is used to determine issue information based on the type of violation in a case. The field extraction module is used to respond to the question information and extract target fields from the responded question information. The target fields include illegal information and evidence of illegality. The enforcement document generation module is used to assess the applicable laws and regulations corresponding to the illegal information and the evidence of illegality based on the legal knowledge base, obtain legal document prompts, and generate corresponding enforcement documents based on the first language model according to the legal document prompts; wherein, the applicable laws and regulations include at least two laws and regulations, and the laws and regulations are ordered according to priority.
7. The law enforcement document generation system based on large model prompting engineering as described in claim 6, characterized in that, The system also includes: The verification module is used to extract the target field from the question information after the response, perform a structured transformation on the target field, and perform a target verification operation on the transformed target field to obtain the verified field; wherein, the target verification operation includes at least one of cross-document field comparison, conflict marking, and missing value detection, and confirmation with the user.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the law enforcement document generation method based on large model prompting engineering as described in any one of claims 1 to 5.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the law enforcement document generation method based on large model prompting engineering as described in any one of claims 1 to 5.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the law enforcement document generation method based on large model prompting engineering as described in any one of claims 1 to 5.
