Judgment document abstract generation method and system based on structural feature fusion prompt

By constructing a method based on structural feature fusion prompts and combining multiple prompting modes, a large language model is guided to generate judicial document summaries. This solves the problem of insufficient professionalism and reliability of large language models in judicial document summarization tasks and achieves higher quality summary generation.

CN118349669BActive Publication Date: 2026-07-24CHONGQING UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHONGQING UNIV
Filing Date
2024-04-18
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing large language models lack professional knowledge guidance in judicial document summarization tasks, especially in zero-sample and few-sample scenarios, resulting in unprofessional and unreliable summaries.

Method used

By constructing a method based on structural feature fusion prompts, combining basic prompts, sample prompts, pattern prompts, and thought chain prompts, a large language model is guided to understand the structural features of judicial documents and generate more accurate and professional summaries.

Benefits of technology

It enhances the professionalism and reliability of large language models in the task of summarizing judicial documents, and generates high-quality, information-complete summaries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118349669B_ABST
    Figure CN118349669B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of legal judgment abstract, and specifically discloses a judgment document abstract generation method and system based on structure feature fusion prompting, which constructs an initialization version of a prompting project as a basic prompt; different numbers of demonstration samples are added in the prompt to construct a sample prompt; on the basis of the sample prompt, mode prompts of different categories are selected and combined; the structure features of the judgment document and the division thought based on the structure features are integrated into the thinking chain prompt to construct a multi-mode prompting project integrating the structure features; and the judgment document is input into a large language model, and the multi-mode prompting project integrating the structure features is used to guide the large language model to obtain the judgment document abstract. According to the technical scheme, the multi-mode prompting project integrating the structure features is combined with the large language model to realize the judgment document abstract, the large language model is guided to understand and extract relevant information from different prompting angles, and more reasonable and more accurate results are generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of legal judgment summary technology, and relates to a method and system for generating judgment document summaries based on structural feature fusion prompts. Background Technology

[0002] With the exponential growth of text content, news, academic papers, legal documents, and other documents on the internet, automatic text summarization has become increasingly important. Human summarization requires significant time, effort, and resources, making it impractical given the sheer volume of text. Therefore, a "dimensionality reduction" process for various types of text is essential.

[0003] Legal Judgment Summarization (LJS) is an important task in the field of legal artificial intelligence, enabling the rapid delivery of crucial legal information and improving the efficiency of judicial work. However, most traditional summarization models rely heavily on fully supervised training using large amounts of specialized datasets to achieve satisfactory performance, but often fail to meet expectations in scenarios involving zero or few samples.

[0004] In recent years, large language models (LLMs) have performed well in zero-shot and few-shot scenarios due to their excellent text generation capabilities. However, due to the lack of expertise and effective prompts, they have limitations in specific domain tasks such as summarizing court documents. Summary of the Invention

[0005] The purpose of this invention is to provide a method and system for generating summaries of judicial documents based on structural feature fusion prompts. This method guides a large language model to understand and extract relevant information from different prompting perspectives, enabling it to produce more reasonable and accurate results and improving the professionalism and reliability of the final generated summary.

[0006] To achieve the above objectives, the basic solution of this invention is: a method for generating judicial document summaries based on structural feature fusion prompts, comprising the following steps:

[0007] Build an initial version of the suggestion project as the base suggestion;

[0008] Based on the basic hints, sample hints are constructed by adding different numbers of example examples to the hints;

[0009] Based on the sample prompts, select pattern prompts that combine different categories;

[0010] The structural features of judgment documents are analyzed to obtain the structural features of judgment documents and the division ideas based on structural features. These are then integrated into the thinking chain prompts to construct a multi-mode prompting project that integrates structural features.

[0011] The judgment documents are input into a large language model, and the multi-modal prompting engineering that integrates structural features guides the large language model to obtain judgment document summaries.

[0012] The working principle and beneficial effects of this basic solution are as follows: This technical solution is based on a multi-modal prompting engineering approach that integrates structural feature fusion, combining it with a large language model to achieve judgment document summarization. Multiple prompting modes are incorporated into the prompting engineering, guiding the large language model to understand and extract relevant information from different perspectives, resulting in more reasonable and accurate results. To enable the large language model to further understand the judgment document summarization task and learn more suitable summarization paths, this invention integrates the structural features of the judgment documents into the construction of the prompting engineering, thereby improving the professionalism and reliability of the final generated summary.

[0013] Furthermore, the basic prompt is as follows:

[0014] Q: Text: {document}, please generate a summary of approximately x words based on the text;

[0015] In this study, the text length of the judgment document summary dataset (CAI L-2020) used in the experiment was statistically analyzed, where x is the average length obtained from the statistical analysis of standard summaries in the dataset.

[0016] The basic hints are the initial version of the hints project, which can be directly used to start the large language model for summarizing court judgments. To build the basic hints template, only the simplest explanation is needed: represent the court judgments as documents in the dataset, provide them to the large language model, and let the large language model generate summaries.

[0017] Furthermore, based on the basic prompts, sample prompts are constructed, including zero-sample prompts, single-sample prompts, and few-sample prompts;

[0018] Zero-shot hints, also known as basic hints, mean that in the absence of specific examples, large language models rely solely on the knowledge acquired during training to complete the corresponding tasks.

[0019] One or more sample examples are added to the basic prompt to obtain one-sample or few-sample prompts. One-sample and few-sample prompts provide the model with examples as a reference for the structure or context of the expected response at runtime. The model then infers the target output required for the task from the reference, helping the model to clarify the user's intent.

[0020] Setting up multiple prompting modes can enhance the understanding and problem-solving capabilities of the large language model for the judicial document summarization task from different perspectives, thereby obtaining high-quality and information-complete judicial document summaries.

[0021] Furthermore, due to the long length of the judgment documents, the sample prompts adopt either single-sample prompts or two-sample prompts. The two-sample prompts are based on the basic prompts and include two pairs of judgment document-summary example samples. The prompt template is as follows:

[0022] Q: Given the text "text + document1 + ", please generate a summary of approximately x words based on the above text.

[0023] A: summary1

[0024] Q: Using the text and document2+, please generate a summary of approximately x words based on the text above.

[0025] A:summary2

[0026] Q: Text: {document}, please generate a summary of approximately x words based on the above text;

[0027] Among them, document1, summary1 and document2, summary2 are two pairs of standard judgment document summaries added on the basis of the basic prompts.

[0028] Sample prompts are used for different tasks, and the number of samples should be determined according to the situation.

[0029] Furthermore, based on sample prompts, pattern prompts are combined, including two types: range pattern prompts and domain pattern prompts.

[0030] The scope pattern explains the operation of the large language model within a set scope and its operational role. In the task of summarizing judgment documents, the scope pattern tells the large language model that the text being processed is in the legal field, and its prompt template is designed as: "Assume you are an expert in the legal field."

[0031] Domain pattern provides details about the domain of the task that the large language model needs to complete, namely more information about the summary of the judgment document. Its prompt template is designed as: "Consider that the summary contains information such as the type of dispute, the claims of the plaintiff and defendant, the trial process, the legal provisions, and the judgment result", and adds it to the question input;

[0032] The prompt template based on a single-sample prompt combined with two modes of prompting is as follows:

[0033] Q: Suppose you are an expert in the field of law;

[0034] Q: Given the text and document1, please generate a summary of approximately x words. Consider that the summary should include information such as the type of dispute, the plaintiff's and defendant's claims, the trial process, the applicable laws and regulations, and the judgment result.

[0035] A: summary1

[0036] Q: Text: {document}, please generate a summary of approximately x words based on the above text;

[0037] The different types in the pattern prompts can be selected and used separately or simultaneously.

[0038] Different types of pattern hints can be selected and used as the basis for formulating hints, which helps to interact with large language models in various contexts and conversations, while enhancing the reusability and adaptability of large language models under different tasks and samples.

[0039] Furthermore, the structural characteristics of judicial documents and the classification ideas based on structural characteristics are integrated into the mind chain prompts:

[0040] CoT = CoT Structure

[0041] CoT stands for Mind Chain Cue. Structure A thought chain hint representing the characteristics of a fusion structure.

[0042] By incorporating the structural features of judicial documents and the idea of ​​segmentation based on structural features into the thinking chain prompt mode, the performance of the large language model in summarizing judicial documents is improved.

[0043] Furthermore, the thought chain prompts guide the large language model to generate summaries from three structural parts: case information, case description, and court judgment.

[0044] An analysis of the structural features of court judgments and their corresponding summaries reveals that court judgments are divided into three structural parts: case information, case description, and court judgment.

[0045] The case information summary has a fixed format and includes information about the type of dispute;

[0046] The summary generated in the case description section includes the claims of the plaintiff and defendant, and information about the trial proceedings;

[0047] The court judgment extracts information from the legal provisions and the judgment result as a summary.

[0048] The structural features of the judgment document are integrated into the thought chain prompt based on the construction of the prompt template. The thought chain reasoning is added to the example answer given by the model to guide the large language model to obtain the summary generation reasoning path according to the logical way of the thought chain. That is, firstly, the text is divided into three parts: case information, case description and court judgment, and then the summary is generated for each of the three parts respectively.

[0049] The summary format for the first part is: This case is a dispute involving XX, where XX is the type of dispute;

[0050] Part Two summarizes the plaintiff's and defendant's claims and the trial process;

[0051] The third part is based on legal regulations and judgments;

[0052] Finally, the summaries from the three parts are merged to obtain the final summary.

[0053] The thought chain prompts guide the large language model in reasoning, and the reasoning process is explained in the example answers. This can effectively improve the accuracy of the large language model in answering similar questions.

[0054] Furthermore, the summary of the judgment document is obtained through a large language model, as follows:

[0055] new prompt=Basic+Shot+Pattern+CoT

[0056] summary=LLM(new prompt+document)

[0057] Among them, new prompt represents the multi-modal prompting project with integrated structural features, Basic represents basic prompting, Shot represents sample prompting, Pattern represents pattern prompting, summary represents court document summary, LLM represents large language model, document represents court document, and CoT represents thought chain prompting.

[0058] Four prompting modes are used to form the final fusion structure feature-based prompting engineering for judgment document summarization. These modes enhance the understanding and problem-solving capabilities of the large language model for judgment document summarization tasks from different perspectives, thereby obtaining high-quality and information-complete judgment document summaries.

[0059] The present invention also provides a system for generating summaries of judgment documents based on structural feature fusion prompts, including a processing unit, wherein the processing unit executes the method described in the present invention to generate summaries of judgment documents.

[0060] This system incorporates the structural features of judicial documents into the construction of the prompting project to enhance the professionalism and reliability of the final generated summary. Attached Figure Description

[0061] Figure 1 This is a flowchart illustrating the method for generating judicial document summaries based on structural feature fusion prompts according to the present invention.

[0062] Figure 2 This is a schematic diagram of the construction process of the multi-mode prompting project of the judgment document summary generation method based on structural feature fusion prompting of the present invention. Detailed Implementation

[0063] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0064] In the description of this invention, it should be understood that the terms "longitudinal", "lateral", "up", "down", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.

[0065] In the description of this invention, unless otherwise specified and limited, it should be noted that the terms "installation", "connection" and "linking" should be interpreted broadly. For example, they can refer to mechanical or electrical connections, or internal connections between two components. They can be direct connections or indirect connections through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms according to the specific circumstances.

[0066] This invention discloses a method for generating court document summaries based on structural feature fusion prompts. It integrates multiple prompting modes into the prompting process, guiding a large language model to understand and extract relevant information from different perspectives, resulting in more reasonable and accurate results. To enable the large language model to further understand the court document summarization task and learn more suitable summarization paths, this invention incorporates the structural features of the court documents into the construction of the prompting process, thereby improving the professionalism and reliability of the final generated summary. Figure 1 As shown, the method for generating court document summaries includes the following steps:

[0067] The initial version of the prompt project is built as a basic prompt, which can be directly used to start the large language model to summarize judicial documents;

[0068] Based on the basic prompts, sample prompts (ShotPrompt) are constructed by adding different numbers of example examples to the prompts; context learning is a method in which a language model learns a task by providing a few examples, and sample prompts use context learning to guide the model's output;

[0069] Based on the sample prompts, select and combine pattern prompts from different categories;

[0070] This paper analyzes the structural features of judicial documents, derives their structural characteristics and the ideas for segmentation based on these features, and integrates them into Chain-of-Thought Prompt (CoT) to construct a multi-modal prompting system that incorporates structural features, such as... Figure 2 As shown; this prompting project = basic prompts + sample prompts + pattern prompts + thought chain prompts that integrate structural features;

[0071] Although the descriptions of cases and judgments in court documents differ, they share similar structural features, all containing three parts: case information, case description, and court judgment. Therefore, the mind chain prompt can guide the large language model to divide the court document into these three structural parts, then generate summaries for each part separately, and finally merge them. The case information section includes case type information, such as "loan contract dispute." The case description section records the claims of the plaintiff and defendant, as well as information on the case process and specific disputes. The final part of the court document is the court judgment section, which includes the relevant legal provisions on which the judgment was based and the final judgment information.

[0072] The judgment documents are input into a large language model, and the multi-modal prompting engineering that integrates structural features guides the large language model to obtain judgment document summaries.

[0073] While inputting court judgments into a large language model for processing, a multi-modal prompting engineering process is implemented, incorporating structural features. This multi-modal prompting engineering combines various prompting modes, enabling the large language model to better understand and extract prompting information, guiding it to generate more reasonable and accurate results. Simultaneously, this prompting engineering also integrates structural features extracted from the court judgments, helping the large language model obtain a more suitable task-solving approach for court judgment summaries, thereby improving its performance and reliability in court judgment summarization.

[0074] In a preferred embodiment of the present invention, to construct its prompt template, only the simplest explanation is required: the judgment document is represented as a document in the dataset, provided to the large language model, and a summary is generated. The basic prompt is:

[0075] Q: Text: {document}, please generate a summary of approximately x words based on the text;

[0076] Among them, the text length of the judgment document summary dataset (CAI L-2020) used in the experiment was statistically analyzed, where x is the average length obtained from the standard summary statistics in the dataset (which was found to be around 280 in the experiment).

[0077] The basic hints are the initial version of the hints project, which can be directly used to start the large language model for summarizing court judgments. To build the basic hints template, only the simplest explanation is needed: represent the court judgments as documents in the dataset, provide them to the large language model, and let the large language model generate summaries.

[0078] In a preferred embodiment of the present invention, sample prompts are constructed based on basic prompts, and the sample prompts include zero-shot prompts, one-shot prompts, and few-shot prompts;

[0079] Zero-shot hints, also known as basic hints, mean that in the absence of specific examples, large language models rely solely on the knowledge acquired during training to complete the corresponding tasks.

[0080] By adding one or more sample examples to the basic prompts, we obtain one-shot or few-shot prompts, guiding the model to better understand the task and the expected output. One-shot and few-shot prompts provide the model with examples at runtime as a structural or contextual reference to the expected response. The model then infers the target output required for the task from the reference, helping the model to clarify the user's intent.

[0081] Because single-shot and few-shot hints provide examples of the task, allowing the model to better understand the task and anticipate the output, their performance is often superior to zero-shot hints. However, few-shot hints increase the model's input. As the number of hint examples increases, on the one hand, the increased model input increases the overhead of model calls; on the other hand, if the task's input and output are large, the constructed input may exceed the model's maximum allowed input length, leading to truncated user input or reduced model performance in long contexts. Therefore, the number of examples used for single-shot hints should be determined based on the specific task.

[0082] In a preferred embodiment of the present invention, since the text of the judgment document is relatively long, excessively long context input may lead to a decrease in model performance. Therefore, the sample prompts adopt single-shot or two-shot prompts. Two-shot prompts are based on the basic prompts and add two judgment document-summary example sample pairs. The prompt template is as follows:

[0083] Q: Given the text "text + document1 + ", please generate a summary of approximately x words based on the above text.

[0084] A: summary1

[0085] Q: Using the text and document2+, please generate a summary of approximately x words based on the text above.

[0086] A:summary2

[0087] Q: Text: {document}, please generate a summary of approximately x words based on the above text;

[0088] Among them, document1, summary1 and document2, summary2 are two pairs of standard judgment document summaries added on the basis of the basic prompts.

[0089] In a preferred embodiment of the present invention, based on sample prompts, pattern prompts are combined, and the pattern prompts include two types: scope-pattern prompts and domain-pattern prompts;

[0090] The scope pattern explains the operation of the large language model within a set scope and its operational role. In the task of summarizing judgment documents, the scope pattern tells the large language model that the text being processed is in the legal field, and its prompt template is designed as: "Assume you are an expert in the legal field."

[0091] Domain pattern provides details about the domain of the task that the large language model needs to complete, that is, more information about the summary of the judgment document, such as the various elements that the summary should contain. Its prompt template is designed as: "Consider that the summary contains information such as the type of dispute, the claims of the plaintiff and defendant, the trial process, the legal provisions, and the judgment result", and adds it to the question input;

[0092] The prompt template based on a single-sample prompt combined with two modes of prompting is as follows:

[0093] Q: Suppose you are an expert in the field of law;

[0094] Q: Given the text and document1, please generate a summary of approximately x words. Consider that the summary should include information such as the type of dispute, the plaintiff's and defendant's claims, the trial process, the applicable laws and regulations, and the judgment result.

[0095] A: summary1

[0096] Q: Text: {document}, please generate a summary of approximately x words based on the above text;

[0097] It is also possible to combine two sample prompts with two different prompting modes;

[0098] The different types in the pattern prompts can be selected and used separately or simultaneously (depending on the specific experiment).

[0099] In a preferred embodiment of the present invention, the mind chain prompt is a prompting method based on sample prompts, which is divided into zero-sample mind chain prompts and few-sample mind chain prompts based on different sample prompting strategies.

[0100] Zero-shot CoT (Zero-shot CoT) means that without using example samples, it provides prompts to guide reasoning. A very simple and effective way to do this is to add a sentence like "Please reason step by step and draw a conclusion" to the end of the original prompts, which can greatly improve the model's reasoning ability.

[0101] Few-shot CoT, on the other hand, requires the use of example samples. The difference between it and few-shot prompts is that the prompt samples not only need to provide the answer to the question, but also the reasoning process of the question (i.e., the thought chain), so that the large language model can learn the reasoning process of the thought chain and apply it to new questions.

[0102] To improve the performance of large language models in summarizing court judgments, the structural features of court judgments and the segmentation ideas based on structural features are integrated into the thought chain prompts:

[0103] CoT = CoT Structure

[0104] CoT stands for Mind Chain Cue. Structure A thought chain hint representing the characteristics of a fusion structure.

[0105] For domain-specific problems like summarizing court judgments, the large language model can further learn the structural characteristics of court judgments based on prompts, understanding the context and semantic features. Simultaneously, thought chain prompts guide the large language model's reasoning process, clearly outlining the reasoning steps in example answers. This effectively improves the accuracy of the large language model's responses to similar questions.

[0106] In a preferred embodiment of the present invention, although the descriptions and judgments of cases in judicial documents are not identical, they share similar structural features, both containing three parts: case information, case description, and court judgment. The mind chain prompt guides the large language model to generate summaries from these three structural parts: case information, case description, and court judgment.

[0107] An analysis of the structural features of court judgments and their corresponding summaries reveals that court judgments are divided into three structural parts: case information, case description, and court judgment.

[0108] The case information summary has a fixed format and includes information about the type of dispute;

[0109] The summary generated in the case description section includes the claims of the plaintiff and defendant, and information about the trial proceedings;

[0110] The court judgment extracts information from legal provisions and judgment results as a summary; (Analysis of the structural characteristics of the judgment document and its corresponding summary)

[0111] The structural features of the judgment document are integrated into the thought chain prompt based on the construction of the prompt template. The template design, based on one-shot and two modes of prompting, incorporates the thought chain prompt. Before the large language model outputs the summary answer, the derivation of the judgment document summary is explained, thereby improving the performance of the large language model in judgment document summarization. Thought chain reasoning is incorporated into the example answer provided by the model, guiding the large language model to obtain the summary generation reasoning path according to the logical method of the thought chain. That is: first, the text is divided into three parts: case information, case description, and court judgment; then, summaries are generated for each of the three parts separately.

[0112] The summary format for the first part is: This case is a dispute involving XX, where XX is the type of dispute;

[0113] Part Two summarizes the plaintiff's and defendant's claims and the trial process;

[0114] The third part is based on legal regulations and judgments;

[0115] Finally, the summaries from the three parts are merged to obtain the final summary.

[0116] The difference between thought chain hints and sample hints lies in that the sample hints not only need to provide the answer to the question, but also guide the large language model's reasoning. The reasoning process (i.e., the thought chain) is clearly stated in the example answer, allowing the large language model to learn the reasoning path of the thought chain and apply it to new questions. Specifically:

[0117] The prompt template based on single-sample prompts and two-mode prompts combined with mind chain prompts is as follows:

[0118] Q: Suppose you are an expert in the field of law;

[0119] Q: Given the text "text + document1 +", please generate a summary of approximately x words based on the above text. Consider that the summary should include information such as the type of dispute, the plaintiff's and defendant's claims, the trial process, the legal provisions, and the judgment result.

[0120] A: First, the text is divided into three parts: case information, case description, and court judgment. Then, a summary is generated for each of the three parts.

[0121] The summary format for the first part is: This case is a dispute involving XX, where XX is the type of dispute;

[0122] Part Two summarizes the plaintiff's and defendant's claims and the trial process;

[0123] The third part is based on legal regulations and judgments;

[0124] Finally, the summaries from the three parts are merged to obtain the final summary: +summary1;

[0125] Q: Text: {document}, please generate a summary of approximately x words based on the above text, considering that the summary should include information such as the type of dispute, the plaintiff's and defendant's claims, the trial process, the legal provisions, and the judgment result;

[0126] Please output the final summary directly.

[0127] This paper presents a comprehensive algorithm that combines structural analysis and feature extraction of judicial documents to guide a large language model in generating summaries in a specific logical order by constructing a thought chain prompt template. Different categories in the pattern prompts can be selected and used as the basis for prompt formulation, which helps to interact with the large language model in various contexts and conversations, while enhancing the reusability and adaptability of the large language model under different tasks and samples.

[0128] In a preferred embodiment of the present invention, four prompting modes are used to form the final fusion-structured feature-based prompting engineering for judicial document summaries. The judicial document summaries are obtained through a large language model, as follows:

[0129] new prompt=Basic+Shot+Pattern+CoT

[0130] summary=LLM(new prompt+document)

[0131] Among them, new prompt represents the multi-modal prompting project with integrated structural features, Basic represents basic prompting, Shot represents sample prompting, Pattern represents pattern prompting, summary represents court document summary, LLM represents large language model, document represents court document, and CoT represents thought chain prompting.

[0132] The method of this invention improves the understanding and problem-solving capabilities of large language models for the task of summarizing judgment documents by providing different prompts, thereby obtaining high-quality and information-complete judgment document summaries.

[0133] Based on the technical solution of this invention, the effectiveness of the proposed prompting engineering method is evaluated using the CAIL-2020 judicial summary dataset. This dataset contains 9484 first-instance civil case judgments and their corresponding summaries written by legal professionals. Furthermore, the individual sentences segmented within the `text` tags in the dataset were merged and replaced with `document` tags to represent a complete judgment.

[0134] To evaluate the quality of the generated summaries, the standard ROUGE metrics were selected, and the F1 scores of ROUGE-1, ROUGE-2, and ROUGE-L, calculated using the ROUGE package in Python, were used for experimental comparison. ROUGE-1 measures the matching degree of one text unit, ROUGE-2 measures the matching degree of two text units, and ROUGE-L measures the proportion of the longest common subsequence between the reference standard summary and the generated summary. The F1 score is the harmonic mean of precision and recall.

[0135] To verify the effectiveness of the proposed hint engineering method in processing judicial document summarization tasks using large language models, experiments can be conducted using some representative large language models:

[0136] General-domain large language model:

[0137] ChatGLM3-6B: ChatGLM3-6B is a dialogue pre-training model jointly released by Zhipu AI and Tsinghua University KEG Lab. It is based on the Genera I Language Mode I (GLM) architecture and has 6.2 billion parameters.

[0138] Qwen-7B: Qwen is a massively multi-level language model launched by Alibaba Cloud. Qwen-7B has 7 billion parameters. The current base model has been stably trained on a large scale of high-quality and diverse data, totaling 3 trillion tokens.

[0139] Baichuan (Baichuan2-7B): Baichuan2-7B is a new generation of open-source large language model launched by Baichuan Intelligence. Based on the Transformer architecture, it is trained on approximately 2.6 trillion tokens, has a parameter scale of 7 billion, and a context window length of 4096.

[0140] Domain-Specific Large Language Models:

[0141] WisdomInterrogatory: WisdomInterrogatory is a large-scale legal model jointly designed and developed by Zhejiang University, Alibaba DAMO Academy, and Huazhong University of Science and Technology. It underwent secondary pre-training and instruction fine-tuning based on Baichuan-7b data in the legal domain, and designed a knowledge-enhanced reasoning process.

[0142] Fuzi Mingcha (fuz i.mingcha): Fuzi i.mingcha is a large Chinese judicial model jointly developed by Shandong University, Inspur Cloud, and China University of Political Science and Law. It uses ChatGLM-6B as the large model base and is trained on massive unsupervised Chinese judicial corpus and supervised judicial fine-tuning data.

[0143] Lex i Law is a large Chinese legal model fine-tuned based on ChatGLM-6B. By fine-tuning it on datasets in the legal field, it has improved its performance and professionalism in providing legal advice and support.

[0144] The present invention also provides a system for generating summaries of judgment documents based on structural feature fusion prompts, including a processing unit, wherein the processing unit executes the method described in the present invention to generate summaries of judgment documents.

[0145] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0146] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims

1. A method for generating summaries of court documents based on structural feature fusion prompts, characterized in that, Includes the following steps: Build an initial version of the suggestion project as the base suggestion; Based on the basic hints, sample hints are constructed by adding different numbers of example examples to the hints; Based on the sample prompts, select pattern prompts that combine different categories; The structural features of judgment documents are analyzed to obtain the structural features of judgment documents and the division ideas based on structural features. These are then integrated into the thinking chain prompts to construct a multi-mode prompting project that integrates structural features. The judgment documents are input into the large language model, and the multi-modal prompting engineering that integrates structural features guides the large language model to obtain the judgment document summary. The structural features of court judgments and the ideas for classifying them based on these features are incorporated into the thought process prompts: , in, This indicates a thought chain prompt. A thought chain hint indicating the characteristics of a fusion structure; The thought chain prompts guide the large language model to generate summaries from three structural parts: case information, case description, and court judgment. An analysis of the structural features of court judgments and their corresponding summaries reveals that court judgments are divided into three structural parts: case information, case description, and court judgment. The case information summary has a fixed format and includes information about the type of dispute; The summary generated in the case description section includes the claims of the plaintiff and defendant, and information about the trial proceedings; The court judgment extracts information from the legal provisions and the judgment result as a summary. The structural features of the judgment document are integrated into the thought chain prompt based on the construction of the prompt template. The thought chain reasoning is added to the example answer given by the model to guide the large language model to obtain the summary generation reasoning path according to the logical way of the thought chain. That is, firstly, the text is divided into three parts: case information, case description and court judgment, and then the summary is generated for each of the three parts respectively. The summary format for the first part is: This case is a dispute involving XX, where XX is the type of dispute; Part Two summarizes the plaintiff's and defendant's claims and the trial process; The third part is based on legal regulations and judgments; Finally, the summaries obtained from the three parts are combined to obtain the final summary; The summary of the judgment documents is obtained through a large language model, as follows: , , in, Multimodal hinting engineering that represents the characteristics of the constructed fusion structure. Indicates basic information. This indicates a sample prompt. Indicates a pattern hint, This indicates a summary of the judgment document. Representing a large language model, Indicates a court judgment document. This indicates a thought chain prompt.

2. The method for generating court document summaries based on structural feature fusion prompts as described in claim 1, characterized in that, The basic prompt is as follows: Q: Text: {document}, please generate a summary of approximately x words based on the text; In this study, the text length of the judgment document summary dataset used in the experiment was statistically analyzed, where x is the average length obtained from the statistical analysis of standard summaries in the dataset.

3. The method for generating court document summaries based on structural feature fusion prompts as described in claim 1, characterized in that, Based on the basic prompts, sample prompts are constructed, including zero-sample prompts, single-sample prompts, and few-sample prompts. Zero-shot hints, also known as basic hints, mean that in the absence of specific examples, large language models rely solely on the knowledge acquired during training to complete the corresponding tasks. One or more sample examples are added to the basic prompt to obtain one-sample or few-sample prompts. One-sample and few-sample prompts provide the model with examples as a reference for the structure or context of the expected response at runtime. The model then infers the target output required for the task from the reference, helping the model to clarify the user's intent.

4. The method for generating court document summaries based on structural feature fusion prompts as described in claim 3, characterized in that, Due to the length of court judgments, the sample prompts will be provided using either a single-sample prompt or a two-sample prompt. The two-sample prompts will add two pairs of court judgment / summary example samples to the basic prompt. The prompt template is as follows: Q: Given the text "document1" and "[text]", please generate a summary of approximately x words based on the given text. A: summary1 Q: Given the text and document2, please generate a summary of approximately x words. A:summary2 Q: Text: {document}, please generate a summary of approximately x words based on the above text; Among them, document1, summary1 and document2, summary2 are two pairs of standard judgment document summaries added on the basis of the basic prompts.

5. The method for generating court document summaries based on structural feature fusion prompts as described in claim 1, characterized in that, Based on sample prompts, pattern prompts are combined, including two types: range pattern prompts and domain pattern prompts. The scope pattern explains the operation of the large language model within a set scope and its operational role. In the task of summarizing judgment documents, the scope pattern tells the large language model that the text being processed is in the legal field, and its prompt template is designed as: "Assume you are an expert in the legal field." Domain pattern provides details about the domain of the task that the large language model needs to complete, namely more information about the summary of the judgment document. Its prompt template is designed as: "Consider that the summary contains the type of dispute, the claims of the plaintiff and defendant, the trial process, the legal provisions, and the judgment result", and adds it to the question input; The prompt template based on a single-sample prompt combined with two modes of prompting is as follows: Q: Suppose you are an expert in the field of law; Q: Given the text "document1" and "[text]", please generate a summary of approximately x words. This summary should include the type of dispute, the plaintiff's and defendant's claims, the trial process, the applicable laws and regulations, and the judgment result. A: summary1 Q: Text: {document}, please generate a summary of approximately x words based on the above text; The different types in the pattern prompts can be selected and used separately or simultaneously.

6. A system for generating summaries of court documents based on structural feature fusion prompts, characterized in that, The system includes a processing unit that performs the method described in any one of claims 1-5 to generate a summary of the judgment document.