Legal contract document generation method and system based on large model and vector retrieval
By constructing a case law knowledge graph and mining risk association rules, and combining it with a large model to optimize legal contract documents, the problem of risk that is difficult to assess and warn in real time in existing technologies has been solved, and risk identification and optimization of contract documents have been achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING NEW ORANGE TECH CO LTD
- Filing Date
- 2026-04-03
- Publication Date
- 2026-05-01
AI Technical Summary
The legal contracts generated by existing technologies are difficult to assess and warn against in real time by combining them with judicial practice, and cannot identify and highlight specific clauses that may lead to adverse litigation outcomes.
By constructing a case law knowledge graph, we can uncover hidden risk association rules, generate a risk association rule base, and use a large model to analyze and optimize the risk characteristics of draft contracts, thereby achieving risk warning and logical completion.
The generated legal contract documents can conduct risk assessment and early warning based on judicial practice, identify and optimize high-risk clauses, and output optimized contract documents that conform to the guidance of judicial practice.
Smart Images

Figure CN121961783A_ABST
Abstract
Description
A Legal Contract Document Generation Method and System Based on Large Model and Vector Retrieval Technical Field
[0001] This application relates to the field of legal document generation technology, and in particular to a method and system for generating legal contract documents based on large models and vector retrieval. Background Technology
[0002] In the field of legal contract document generation, with the development of artificial intelligence technology, using automated methods to assist in the generation of contract documents has become an important application direction, with broad prospects for improving efficiency and lowering barriers to entry.
[0003] In existing technologies, large language models are often used to automatically generate legal contracts. This involves building a contract template library and then using the large model to call the corresponding templates and fill in the content based on the key information input by the user to generate a draft contract. This mainly relies on the general language generation capabilities of the model, which are trained on a large amount of text.
[0004] However, this template- and general model-based approach has obvious drawbacks. Although the generated contract content is formatted in a standardized way, the setting and specific wording of its clauses often cannot be dynamically linked to the latest judicial practices and precedents. Due to the lack of targeted learning of the risk patterns implied in historical judgments, this method is unable to proactively identify and alert to specific clause risks in the current draft contract that may lead to adverse litigation outcomes. Therefore, the existing technology has the technical problem that the generated contract documents cannot be combined with judicial practices in real time for risk assessment and early warning. Summary of the Invention
[0005] The purpose of this application is to provide a legal contract document generation method and system based on large model and vector retrieval, so as to solve the problem that the generated contract documents in the prior art are difficult to combine with judicial practice for risk assessment and early warning in real time.
[0006] To address the aforementioned technical problems, in a first aspect, this application provides a method for generating legal contract documents based on large-scale models and vector retrieval, comprising: constructing a case knowledge graph based on case elements and judgment results in acquired judicial precedent data, wherein the case knowledge graph is used to describe the relationship between case type, key factual features, contract clause type, and judgment result; performing association rule mining on the case knowledge graph to determine hidden risk association rules, wherein the hidden risk association rules are used to indicate the correspondence between the target contract clause type and the target key factual features in the contract text and the target judgment result; and constructing risk association rules according to the correspondence between the hidden risk association rules and the rule antecedents and consequents. The system retrieves a draft contract in response to user input and parses the draft contract to generate a risk feature vector characterizing the risk features of the draft contract. It then performs a vector retrieval of the risk feature vector in the risk association rule library to match target risk association rules associated with the draft contract in terms of risk features. The consequent of the target risk association rule is used as risk warning information, and this information, along with the clause text in the draft contract corresponding to the antecedent of the target risk association rule, is input into a large model. The large model performs semantic parsing on the clause text and logically completes or transforms the clause text based on the risk warning information to generate the target legal contract document.
[0007] Optionally, association rule mining is performed on the case knowledge graph to determine hidden risk association rules. These hidden risk association rules indicate the correspondence between a target contract clause type and a target key factual feature in the contract text, and the target judgment result. This includes: identifying graph structure patterns that associate the contract clause type, the key factual feature, and the judgment result based on the connection relationships in the case knowledge graph; statistically analyzing the distribution of judgment results corresponding to different combinations of contract clause types and key factual features based on the graph structure patterns; selecting graph structure patterns from the statistical distribution that result in an unfavorable judgment as risk structure patterns; defining the combination of the contract clause type and the key factual feature in the risk structure pattern as the rule antecedent, and defining the unfavorable judgment result in the risk structure pattern as the rule consequent; and generating hidden risk association rules based on the correspondence between the rule antecedent and the rule consequent.
[0008] Optionally, a risk association rule library is constructed by establishing a correspondence between the hidden risk association rules and the rule antecedents and consequents. This includes: vectorizing the contract clause types and key factual features of the rule antecedents in the hidden risk association rules to obtain rule feature vectors; identifying the judgment results of the rule consequents in the hidden risk association rules to obtain risk description tags; establishing a mapping relationship between the rule feature vectors and the risk description tags based on the hidden risk association rules; and storing all hidden risk association rules corresponding to the mapping relationship to construct a risk association rule library.
[0009] Optionally, in response to user input, a draft contract is obtained, and the draft contract is parsed to generate a risk feature vector for characterizing the risk features of the draft contract, including: identifying and extracting contract clause types and key fact features from the draft contract; converting the contract clause types and key fact features into vector forms respectively to generate a first vector and a second vector; and combining the first vector and the second vector to generate a risk feature vector.
[0010] Optionally, the risk feature vector is used for vector retrieval in the risk association rule base to match target risk association rules that are associated with the draft contract in terms of risk features. This includes: calculating the similarity between the risk feature vector and each rule feature vector in the risk association rule base; filtering target rule feature vectors whose similarity meets preset conditions from the risk association rule base based on the similarity; and determining the hidden risk association rule corresponding to the target rule feature vector in the risk association rule base as the target risk association rule.
[0011] Optionally, the consequent of the rule in the target risk association rule is used as risk warning information, and it is input into a large model along with the clause text in the draft contract corresponding to the antecedent of the rule in the target risk association rule. The large model performs semantic parsing on the clause text and performs logical completion or expression transformation on the clause text based on the risk warning information to generate a target legal contract document. This includes: converting the unfavorable judgment result of the consequent of the rule in the target risk association rule into text form to obtain risk warning information; locating specific clause text in the draft contract that matches the contract clause type of the antecedent of the rule in the target risk association rule as the clause text to be optimized; combining the risk warning information and the clause text to be optimized as prompt information; inputting the prompt information into the large model, and having the large model parse and correct the clause text to be optimized based on the risk warning information to output optimized clause text; and integrating and generating the target legal contract document based on the optimized clause text.
[0012] Optionally, the prompt information is input into a large model, which then parses and corrects the text of the clause to be optimized based on the risk warning information, and outputs an optimized clause text. This includes: extracting the risk warning information and the text of the clause to be optimized from the prompt information; analyzing the semantic structure of the text of the clause to be optimized based on the large model to identify the clause components in the text of the clause to be optimized; matching the risk warning information with the clause components to determine the target clause components that need to be corrected; adjusting the text content corresponding to the target part according to the risk warning information to generate modified text; and merging the modified text with the text of the clause to be optimized to generate the optimized clause text.
[0013] Secondly, this application provides a legal contract document generation system based on large-scale models and vector retrieval, comprising: an acquisition module, used to construct a case knowledge graph based on case elements and judgment results in acquired judicial precedent data, wherein the case knowledge graph is used to describe the relationship between case type, key factual features, contract clause type, and judgment result; a mining module, used to perform association rule mining on the case knowledge graph to determine hidden risk association rules, wherein the hidden risk association rules are used to indicate the correspondence between the target contract clause type and the target judgment result when the contract text contains a target contract clause type and meets the target key factual features; a construction module, used to construct a risk association rule library according to the correspondence between the hidden risk association rules and the rule antecedents and consequents; and a parsing module. The system comprises the following modules: a module for retrieving a draft contract in response to user input and parsing the draft contract to generate a risk feature vector characterizing the risk features of the draft contract; a matching module for performing vector retrieval of the risk feature vector in the risk association rule base to match target risk association rules associated with the draft contract in terms of risk features; and a generation module for taking the consequent of the rule in the target risk association rule as risk warning information and inputting it together with the clause text in the draft contract corresponding to the antecedent of the rule in the target risk association rule into a large model. The large model performs semantic parsing on the clause text and performs logical completion or expression transformation on the clause text based on the risk warning information to generate the target legal contract document.
[0014] Thirdly, this application provides an electronic device, comprising: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of the legal contract document generation method based on large model and vector retrieval as described in the first aspect above.
[0015] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the steps of the legal contract document generation method based on large model and vector retrieval as described in the first aspect above.
[0016] The legal contract document generation method based on large-scale models and vector retrieval provided in this application constructs a case knowledge graph based on case elements and judgment results from acquired judicial precedent data. This systematically transforms massive amounts of unstructured judicial case information into a structured relational network that can be directly analyzed and utilized by computers. By performing association rule mining on the case knowledge graph to identify hidden risk association rules, it can automatically discover the potential patterns in which specific combinations of contract clauses and factual characteristics lead to unfavorable judgment results, transforming implicit judicial experience into explicit risk rules. By classifying the hidden risk association rules according to their antecedents and consequents... By constructing a risk association rule base based on the corresponding relationships, a structured knowledge base that is dedicated to contract risk matching and can be efficiently retrieved can be created. By responding to user input to obtain a draft contract and parsing the draft contract to generate risk feature vectors that characterize the risk features of the draft contract, a specific contract text can be transformed into a data form that can be quantified, calculated, and compared. By performing vector retrieval of the risk feature vectors in the risk association rule base to match the target risk association rules that are associated with the risk features of the draft contract, the specific risk patterns triggered by historical precedents can be accurately located for the current draft contract.
[0017] Furthermore, the risk consequences revealed by the matched target risk association rules are used as early warning information. This information, along with the corresponding clauses to be optimized in the draft contract, is input into the large model. Based on an understanding of the semantics of the clauses and the risk direction indicated by the early warning information, the large model makes targeted logical additions or rewrites to the clause content, thereby outputting a final contract document optimized for risk avoidance. This achieves a closed loop from "risk identification" to "proactive risk mitigation," transforming the large model from merely a text generator into a smart contract advisor capable of targeted corrections based on specific judicial risk evidence. The final legal document retains the user's intent while embedding defensive designs based on historical precedents. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of this application 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 only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 is a flowchart illustrating a legal contract document generation method based on large model and vector retrieval provided in an embodiment of this application; Figure 2 is a schematic diagram illustrating a specific implementation of a legal contract document generation method based on large model and vector retrieval provided in an embodiment of this application; Figure 3 is a structural schematic diagram illustrating a legal contract document generation system based on large model and vector retrieval provided in an embodiment of this application. Detailed Implementation
[0020] The problem with existing technology-generated contract documents is that they cannot be combined with judicial practice in real time for risk assessment and early warning. Their knowledge sources are mainly static contract templates and general language model training data. They have failed to effectively integrate into the judicial case library, which contains rich judicial logic and risk mapping relationships. As a result, the generated contracts may be out of touch with the latest judicial trends in terms of clause design. They cannot foresee the specific adverse consequences that a certain combination of clauses may cause in real disputes. In essence, it is a text generation that is "detached from judicial practice".
[0021] To address the aforementioned issues, this application proposes a contract optimization method that integrates judicial precedent mining with large-scale model generation. By introducing and deeply utilizing judicial precedent data, a closed-loop process is constructed to discover risk patterns from precedents and guide contract optimization accordingly. The core of this method involves extracting the correlation between case elements and judgment results from precedents to construct a computationally analyzable knowledge graph. This graph then automatically mines a risk rule base that identifies patterns in the combination of clauses and facts leading to unfavorable judgments. When generating a draft contract, it is compared with the risk rule base to identify specific high-risk clauses. Corresponding risk warnings are then fed back to the large-scale model, driving the model to make targeted optimizations and revisions to these clauses in line with judicial practice. By combining general text generation capabilities with specialized judicial risk knowledge, the final generated contract not only meets formal requirements but also incorporates risk avoidance designs based on historical experience. This effectively solves the fundamental problem of high potential contract risks caused by the lack of risk warning capabilities in existing technologies.
[0022] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely some embodiments of the present application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0023] The core of this application is to provide a legal contract document generation method based on large model and vector retrieval. A flowchart of one specific implementation is shown in Figure 1. The method includes: S101, constructing a case knowledge graph based on the case elements and judgment results in the acquired judicial case data.
[0024] In one specific implementation, information is first extracted from the acquired judicial precedent text data using natural language processing technology. Named entity recognition algorithms are then used to automatically identify and label entities such as case type and core points of contention from the precedent text. Simultaneously, a relation extraction model is used to identify text fragments such as plaintiff's claims, contractual agreements, and court rulings, and key information such as specific key factual features, contract clause types, and judgment results are extracted from them. The extracted information constitutes the original material for constructing the graph.
[0025] Secondly, through knowledge fusion and modeling techniques, these discrete elements are organized into structured knowledge. Each independent information point, such as the extracted case type and key factual features, is defined as a node. Based on legal logic and textual context, rules or models are used to automatically determine and create relationships between nodes. For example, an involvement relationship is established between the two nodes of loan contract dispute and overdue interest clause, and a causal relationship is established between the factual feature of failure to repay on contract and the judgment result of payment of liquidated damages. Using graph database technology, all nodes and relationships are stored in the database to form an interconnected case law knowledge graph. The case law knowledge graph is used to describe the relationship between case type, key factual features, contract clause type, and judgment result.
[0026] S102. Perform association rule mining on the case knowledge graph to identify hidden risk association rules. Hidden risk association rules are used to indicate the correspondence between the target contract clause type and the target judgment result when the target key fact characteristics exist in the contract text.
[0027] In this embodiment of the application, S102 specifically includes: S1021, identifying the graph structure pattern of related contract clause types, key factual features and judgment results based on the connection relationships in the case law knowledge graph.
[0028] Among them, the graph structure pattern refers to a specific connection form in a knowledge graph in which contract clause type nodes and key fact feature nodes are connected to the same judgment result node, describing how a set of facts and clauses jointly lead to a judicial result.
[0029] In this embodiment, graph pattern matching and search techniques are used to traverse and identify patterns in a constructed case knowledge graph to extract graph structure patterns. A fixed search template is designed using a graph query language to describe typical paths between contract clause types, key factual features, and judgment results. This template is then used to perform a matching search throughout the entire graph, identifying all specific instances that conform to this path connection relationship. Each found instance is recognized as a graph structure pattern.
[0030] S1022. Based on the graph structure pattern, statistical data on the distribution of judgment results corresponding to different combinations of contract clause types and key factual features.
[0031] Among them, the distribution statistics are the result of quantitatively summarizing a large number of similar graph structure patterns. For example, the number of cases in which the judgment adjusts the penalty when excessive liquidated damages clauses and the fact of the buyer's broken capital chain occur together.
[0032] In this embodiment, data statistics and aggregation analysis techniques are used to analyze all identified graph structure patterns. All graph structure patterns are categorized according to the types of contract terms and key factual features they contain. For all graph structure patterns belonging to the same category, the frequency of their corresponding judgment results is statistically analyzed, thus forming a statistical data distribution showing the distribution of different judgment results caused by feature combinations.
[0033] S1023. Select the graph structure patterns with unfavorable judgment results from the distribution statistics and use them as risk structure patterns.
[0034] Among them, the risk structure pattern is selected from all graph structure patterns, and its corresponding judgment result is obviously unfavorable to one party to the contract, such as a pattern that always leads to one party losing the case or bearing high compensation.
[0035] In this embodiment, data is filtered by setting conditions to identify high-risk patterns from the statistical data. The filtering condition is that the judgment result is an unfavorable judgment, such as dismissal of the lawsuit or imposition of compensation liability. All statistical data are traversed to find specific feature combinations that are statistically mainly or frequently associated with unfavorable judgment results. The original graph structure patterns corresponding to these feature combinations are marked as risk structure patterns.
[0036] S1024. Define the combination of contractual clause types and key factual characteristics in the risk structure model as the rule antecedent, and define the adverse judgment outcome in the risk structure model as the rule consequent.
[0037] Among them, the antecedent of the rule is the combination of preconditions that lead to an adverse result, usually consisting of specific contractual terms and factual characteristics; the consequent of the rule is the adverse legal consequence caused by the combination of preconditions.
[0038] In this embodiment, risk structure patterns are defined in a formatted manner using rule extraction and formatting technology. From each marked risk structure pattern, the contract clause types and key factual features are extracted and combined to form the antecedent of the rule; simultaneously, the adverse judgment result corresponding to the pattern is extracted as the consequent of the rule.
[0039] S1025. Generate hidden risk association rules based on the correspondence between the antecedent and consequent of the rules.
[0040] In this embodiment of the application, a solid correspondence is established between all extracted rule antecedents and rule consequents through knowledge representation technology, and necessary metadata is added. The results are stored and output in the form of a structured list or rule base. Each correspondence generates a clear hidden risk association rule that can be understood and applied by a computer.
[0041] As an example, firstly, through step 1021, assume that there are numerous case nodes in the case law knowledge graph involving quality disputes related to sales contracts. Traverse the graph to identify all clauses and factual nodes connected to the judgment result of "quality dispute, buyer's inability to provide evidence." For example, among the many paths leading to this result, there are frequent connections between the contract clause type node "unclear acceptance standards A" and the key factual feature node "technically complex product B." This recurring connection is identified as a specific graph structure pattern, denoted as the pattern. .
[0042] Next, in step 1022, all identified map structure patterns are quantitatively analyzed. For the patterns... The search and calculation are performed in the entire knowledge graph database, and two key statistical measures, support and confidence, are set.
[0043] Support: Measures the prevalence of the pattern in the overall cases, calculated using the following expression:
[0044] in, It represents a specific pattern of graph structure. Representation pattern The combination of conditions for the antecedents of the rules, such as "acceptance criteria are unclear A" and "technically complex product B" appearing at the same time. This represents the total number of cases in the historical case data that simultaneously meet both of these conditions. This represents the total number of cases in the knowledge graph. Assume... The number of cases involving this combination is Then support .
[0045] Confidence level: Measures the conditional probability that a given combination of conditions will lead to a specific adverse outcome, and is calculated using the following expression:
[0046] in, Representation pattern The specific adverse judgment result corresponding to the subsequent event of the rule, such as "the buyer failed to provide evidence". This represents the number of historical cases that simultaneously satisfy conditions A and B, leading to result C. Assume that, statistically, in... Of the cases involving this combination, the final judgment was "the buyer failed to provide sufficient evidence." If there are 1, then the confidence level is 1. .
[0047] Next, in step 1023, filtering is performed based on preset thresholds, for example, confidence > 80% and support > 0.01. Hypothesis Pattern The confidence level of 86.7% and the support level of 1.5% both meet the threshold conditions, and therefore it is judged to be a risk structure pattern with significant risk.
[0048] Then, in step 1024, the risk structure model is formally defined. The set of conditions that lead to risk, namely ["unclear acceptance criteria", "technically complex products"], is extracted and defined as the antecedent of the rule; the adverse legal consequences most often caused by the set of conditions, namely "quality disputes, buyer's inability to provide evidence", are defined as the consequent of the rule.
[0049] Finally, in step 1025, the defined rule antecedent and consequent, along with the calculated support and confidence scores, are encapsulated to generate a complete, computable, and searchable hidden risk association rule. This rule can be interpreted as follows: When a sales contract simultaneously involves clauses regarding "unclear acceptance standards" and the fact of "technically complex products," then in historical judicial practice, there is approximately an 86.7% probability that, in the event of a quality dispute, the buyer will face the risk of failing to provide sufficient evidence and thus losing the case. The above example is for illustrative purposes only; the rules in actual applications are much more diverse.
[0050] Through the steps described above, this application can automatically extract highly confident and specific rules corresponding to the causes and consequences of legal risks from massive amounts of historical judicial data, providing a precise and calculable knowledge base for subsequent real-time matching and early warning of contract risks.
[0051] S103. Construct a risk association rule library based on the correspondence between the rule antecedent and rule consequent of the hidden risk association rules.
[0052] In this embodiment of the application, S103 specifically includes: S1031, vectorizing the contract clause type and key fact features of the rule antecedent in the hidden risk association rule to obtain the rule feature vector.
[0053] Vectorization transformation refers to the process of converting non-numerical information such as text and symbols into a data form that is easy for computers to perform mathematical calculations and make rapid comparisons through specific models or algorithms. The rule feature vector is a single, fixed-dimensional numerical vector that is converted from a combination of contract terms and factual features into a single vector through vectorization technology. It comprehensively represents the characteristics of the risk pattern targeted by the rule.
[0054] In this embodiment, a word embedding model from natural language processing is used to numerically represent the antecedents of each hidden risk association rule. The text describing the contract terms and key factual features in the antecedents is input into a pre-trained word vector model. This model can map text sentences or phrases of arbitrary length into a fixed-dimensional semantic vector space. All phrases in the antecedents are concatenated into a complete text description, which is then input into the text embedding model. The text is processed by the neural network parameters within the model, and finally outputs a set of fixed-length numerical sequences rich in semantic information, i.e., rule feature vectors.
[0055] S1032. Mark the judgment results of the rule consequents in the hidden risk association rules to obtain risk description labels.
[0056] Among them, the risk description label is a concise, unique code or short text description of the adverse judgment result described by the rule consequent, used to uniquely identify a risk type in the database.
[0057] In this embodiment, tag encoding technology is used to standardize the consequents of each hidden risk association rule. All types of adverse judgment results are organized and classified, and predefined rules or keyword extraction techniques are used to assign a unique identifier or a brief standardized description to each type; this identifier is the risk description tag.
[0058] S1033. Based on the hidden risk association rules, establish the mapping relationship between the rule feature vector and the risk description label.
[0059] In this context, the mapping relationship specifically refers to a stable and queryable correspondence between a rule feature vector and its corresponding risk description label in a constructed database or index.
[0060] In this embodiment, digital rule entries are established through data pairing and association technology. The rule feature vector generated for each rule is paired and combined with its corresponding risk description tag to form a complete digital rule record. At the same time, the complete original rule text is stored as detailed information. This association relationship is usually represented in a computer as a database record or a key-value pair, where the rule feature vector or its corresponding unique ID is used as the key, and the risk description tag and its associated detailed information are used as the value, thereby establishing a mapping relationship between the rule feature vector and the risk description tag.
[0061] S1034. Store the mapping relationships corresponding to all hidden risk association rules to build a risk association rule library.
[0062] In this embodiment, database storage technology is used to persistently save all digital rule records with established mapping relationships. The rule feature vector and risk description tag of each record are stored as a data entry in an ordered manner in a specific database or index file. This rule repository, which includes all historical risk rules, their digital representations, and corresponding relationships, constitutes a risk association rule base that can be used for subsequent queries and matching.
[0063] As an example, step 1031 first processes a hidden risk association rule with the antecedent being ["Unclear acceptance criteria", "Technically complex product"]. These phrases are concatenated into the input text T = "Unclear acceptance criteria; Technically complex product". This text is then input into a pre-trained text embedding model. The model maps text to a 256-dimensional semantic vector.
[0064] This process can be formally represented as: ,in, This represents the mapping function implemented by the pre-trained text embedding model. This indicates that the input text is composed of all phrases in the rule's antecedent. For example, for the antecedent ["Acceptance criteria are unclear", "Technically complex product"], its text form is T = "Acceptance criteria are unclear; Technically complex product". The output vector, i.e., the regular feature vector, is a... A real vector of dimension 1 is formally represented as Each component It is a real value that collectively encodes the semantic features of the input text.
[0065] Next, in step 1032, the consequent of the same rule is processed as "quality dispute, buyer's inability to provide evidence". Based on the preset coding rules, such as taking the first letter of the core words in pinyin, a risk description label is generated. .
[0066] Then, in step 1033, a mapping record is established. The record uses regular feature vectors Use the core index key to associate and store risk description tags. The complete original rules and statistical information are attached. This mapping relationship can be represented as:
[0067] in, This indicates the first rule in the risk association rule base. Rule record. Indicates the first The rule feature vector corresponding to each rule serves as the primary index key for that record. It indicates a relationship of "mapping to" or "associating with". Indicates the first The "risk description label" corresponding to this rule is a short identifier. This represents a structure containing all the details of the rule, typically including metadata fields such as antecedent list, consequent text, confidence level, and support level.
[0068] Finally, step 1034 executes the above process on the massive number of hidden risk association rules. Assume that the final result is... The rule set constitutes the risk association rule base. In mathematics, it can be viewed as a set:
[0069] in, This indicates that the risk association rule base has been completed. Represents a set. This indicates the total number of hidden risk-related rules in the rule base. This indicates the first to the last item stored in the database. Each rule record, each record All have the same characteristics as before. structure.
[0070] The above example details the process of building a searchable knowledge base from a single rule. In practical applications, parameters (such as vector dimensions and label rules) can be set according to requirements.
[0071] Through the steps described above, this application systematically transforms discrete risk assessment rules described in natural language into structured and computable data, constructing a risk pattern knowledge base that supports efficient semantic matching. This lays a key technological foundation for real-time risk feature comparison and localization of subsequent draft contracts.
[0072] S104. Responding to user input, obtain a draft contract and parse the draft contract to generate a risk feature vector to characterize the risk features of the draft contract.
[0073] Among them, the risk feature vector is a numerical vector that integrates the core information of the current contract. Its core function is to create a unique and calculable risk fingerprint for a specific draft contract, which can comprehensively reflect the potential correlation between the contract's terms and factual background and historical risk patterns.
[0074] In this embodiment of the application, S104 specifically includes: S1041, identifying and extracting the contract clause types and key factual features from the draft contract.
[0075] In this embodiment, natural language processing (NLP) technology is used to parse and extract key information from the user-input draft contract text. Named entity recognition (NAME) algorithms are used to scan the entire contract text, identifying segments representing contract clause types, such as liability for breach of contract, payment methods, and dispute resolution. Simultaneously, dependency parsing and other techniques are used to extract key factual features from the contract's factual statements, such as the "whereas" clause and background descriptions, including details like "delivery location is the client's factory" and "acceptance standards are unclear." This process separates and extracts a structured list of contract clause types and a list of key factual features from a complete draft contract.
[0076] S1042. Convert the contract clause type and key fact features into vector form respectively to generate the first vector and the second vector.
[0077] In this embodiment of the application, all extracted contract clause types, such as liquidated damages clauses and retention of title clauses, are input into a pre-trained word vector model through a word embedding model. The model converts these texts into a comprehensive numerical vector, called the first vector, which represents the characteristics of the contract in terms of clause type. At the same time, all extracted key factual feature texts are input into the same word vector model to generate another comprehensive numerical vector, called the second vector, which represents the characteristics of the contract in terms of factual background.
[0078] S1043. Combine the first vector and the second vector to generate a risk feature vector.
[0079] In this embodiment, two numerical vectors representing clauses and factual features are merged into a single unified vector through vector combination operations. Algorithms such as vector concatenation or weighted averaging are then used to concatenate the first and second numerical sequences, creating a new numerical sequence with higher dimensions or more comprehensive information. This newly generated vector is the risk feature vector that comprehensively characterizes the risk features of the draft contract.
[0080] As an example, firstly, in step 1041, assuming a draft "CNC Machine Tool Sales Contract" is received, the draft is scanned using a contract element identification model. The model identifies from the clauses that the payment method is installment payment and the acceptance standard is acceptance according to the technical specifications of Party A, and classifies them as contract clause types [installment payment, custom acceptance standard]; at the same time, the model extracts key factual features from the contract description [technically complex product, high-value subject matter].
[0081] Then, in step 1042, the two extracted lists are input into the text embedding model, and the model transforms the list of terms and conditions [installment payment, custom acceptance criteria] into a 256-dimensional first vector. Simultaneously, the model transforms the list of factual features [technically complex products, high-value targets] into a 256-dimensional second vector. .
[0082] Finally, through step 1043, the first vector... Second vector Perform the connection operation to generate the final risk characteristic vector of the draft cost contract. This process can be concisely represented by a formula:
[0083] in, The vector concatenation function is used to generate a 512-dimensional contract risk feature vector. Let the risk feature vector be... The first half of the vector comes from The latter half comes from .
[0084] Through the steps described above, this application can automatically create a standardized numerical representation for any input draft contract, integrating both its terms and facts. This provides a direct and comparable data foundation for achieving rapid and accurate semantic similarity matching with massive historical risk rules.
[0085] S105. Perform vector retrieval on the risk feature vector in the risk association rule base to match the target risk association rule that is associated with the draft contract in terms of risk features.
[0086] In this embodiment of the application, S105 specifically includes: S1051, calculating the similarity between the risk feature vector and each rule feature vector in the risk association rule base.
[0087] Similarity is a quantified value used to measure the closeness of two vectors in semantic space. Specifically, it refers to the degree of matching between the risk feature vector of the draft contract and the rule feature vector of a rule in the rule base. The higher the value, the more similar the current contract is to the historical risk pattern described by the rule.
[0088] In this embodiment, a vector similarity calculation algorithm is used to compare the risk feature vector with each rule feature vector stored in the risk association rule base one by one. A cosine similarity algorithm is employed to calculate the cosine of the angle between the risk feature vector and each rule feature vector in the rule base. Treating the two vectors as two lines in a multi-dimensional space, the closer this value is to 1, the more consistent the directions of the two vectors are, meaning the more similar the contract feature combinations they represent. A series of similarity values are obtained through calculation, with each value corresponding to a rule in the rule base.
[0089] S1052. Based on similarity, select target rule feature vectors whose similarity meets preset conditions from the risk association rule base.
[0090] Among them, the preset condition is a pre-set screening threshold, usually a minimum requirement of similarity value, used to filter out weak or irrelevant associations and ensure that the matched rules have significant reference value.
[0091] In this embodiment, a conditional filtering logic is used to identify items that meet the requirements from all similarity values. All calculated similarity values are compared with a pre-set threshold; those similarity values greater than or equal to the threshold are selected, and the corresponding rule feature vectors are considered to be target rule feature vectors highly similar to the current draft contract.
[0092] S1053. Determine the hidden risk association rule corresponding to the target rule feature vector in the risk association rule base as the target risk association rule.
[0093] Among them, the target rule feature vector is one or more rule feature vectors that are most similar to the current draft contract, which are found from the rule base after retrieval and screening.
[0094] In this embodiment, the final risk rules are determined by querying the mapping relationship. Based on the selected target rule feature vector, the pre-stored one-to-one mapping relationship is queried in the risk association rule base to find the complete hidden risk association rule corresponding to each target rule feature vector, including its textual antecedent and consequent. These found rules are the final matched target risk association rules that are associated with the current draft contract in terms of risk characteristics.
[0095] As an example, step 1051 is used to obtain the risk feature vector of the draft "CNC Machine Tool Sales Contract". Suppose that the risk association rule base contains tens of thousands of rules, and one of these rules is denoted as rule #1. The regular feature vector is The cosine similarity between these two vectors is calculated using the following formula:
[0096] Assumption , To calculate the cosine similarity between these two vectors: Step 1, calculate the dot product:
[0097] Step 2: Calculate the vector magnitude:
[0098]
[0099] Step 3: Calculate cosine similarity: .
[0100] Repeat this calculation process for all rule feature vectors in the rule base.
[0101] Then, in step 1052, with a preset similarity filtering threshold of 0.85, after calculating the similarity with all rules, it was found that the rule was... The similarity of 1.0 satisfies the condition, and is consistent with another rule. The similarity of 0.88 satisfies the condition, while the similarity with most other rules is below 0.85. Therefore, rule [the rule is omitted]. and rules The corresponding rule feature vector is selected as the target rule feature vector.
[0102] Finally, in step 1053, a reverse lookup is performed in the rule base based on the target rule feature vector. Assume the corresponding rule... The complete information is: "Antecedent = [Custom acceptance criteria, technically complex product], Consequence = Quality dispute, buyer unable to provide evidence, Confidence level = 0.87"; corresponding rules The complete information is "Antecedent = [Installment payment, high-value target], Consequence = Buyer defaults payment, incurring high penalty, confidence level = 0.78". These two complete hidden risk association rules are identified as the "target risk association rules" for this matching.
[0103] Through the steps described above, this application can automatically, efficiently, and accurately filter out the risk items most relevant to the current draft contract from a massive amount of historical risk patterns. This maps specific contract texts to risk knowledge with statistical basis and clear consequences, providing a direct and reliable decision-making basis for subsequent targeted contract optimization.
[0104] S106. The consequent of the rule in the target risk association rule is used as risk warning information, and the clause text corresponding to the antecedent of the rule in the target risk association rule in the draft contract is input into the big model. The big model performs semantic parsing on the clause text and performs logical completion or expression transformation on the clause text according to the risk warning information to generate the target legal contract document.
[0105] In this embodiment of the application, as shown in Figure 2, S106 specifically includes: S1061, converting the adverse judgment result of the rule consequent in the target risk association rule into text form to obtain risk warning information.
[0106] Among them, risk warning information transforms the rule consequent of the target risk-related rule into a clear and direct natural language description, explicitly pointing out the specific adverse legal consequences that may result if the status quo is maintained. It is the core instruction driving contract optimization.
[0107] In this embodiment, information conversion technology is used to convert the result portion of the target risk association rule into readable warning text. Each matched target risk association rule is read, and its consequent field is obtained, such as a label or code indicating ownership dispute risk. Using a predefined mapping table or a simple text generation template, this field is expanded into a complete risk description statement. For example, historical similar cases show that unclear ownership agreements for customized equipment can easily lead to disputes during contract performance, resulting in damage to one party's interests. This yields the risk warning information.
[0108] S1062. Locate specific clause texts from the draft contract that match the contract clause types of the rule antecedents in the rules related to the target risk, and use them as clause texts to be optimized.
[0109] Among them, the text of the clauses to be optimized is a specific contract clause fragment that is precisely located and extracted from the original draft contract based on the clause type described in the rule antecedent of the target risk rule.
[0110] In this embodiment, text localization and extraction techniques are used to identify specific clauses requiring modification within the draft contract. The complete draft contract text is then analyzed again, utilizing features described in the rule antecedents as query clues. For example, if the contract subject matter is customized equipment and the ownership transfer clauses are unclear, semantic search and pattern matching are performed throughout the contract to accurately locate relevant clauses describing equipment customization and ownership. These clauses are then extracted in their original text and used as the text for optimization.
[0111] S1063. Combine the risk warning information and the text of the clauses to be optimized as a prompt message.
[0112] The prompt message is a structured text combination that uses an instruction format that the large model can clearly understand. It organizes the text of the clause to be optimized and the risk warning information together as input to the large model.
[0113] In this embodiment, information assembly technology is used to fill risk warning information and text of clauses to be optimized into designated locations in a preset prompt template. For example, the template might be: Please analyze the following contract clauses: [Text of clauses to be optimized]; Based on historical legal risk warnings: [Risk warning information], please optimize this clause to reduce risk. The completed text after filling in the information constitutes the prompt message.
[0114] S1064. Input the prompt information into the large model. The large model will analyze and correct the text of the clause to be optimized based on the risk warning information, and output the optimized clause text.
[0115] Specifically, S1064 may include: extracting risk warning information and the text of the clause to be optimized from the prompt information; analyzing the semantic structure of the text of the clause to be optimized based on the large model, and identifying the clause components in the text of the clause to be optimized; matching the risk warning information with the clause components to determine the target clause components that need to be modified; adjusting the text content corresponding to the target part according to the risk warning information to generate the modified text; and merging the modified text with the text of the clause to be optimized to generate the optimized clause text.
[0116] Among them, the optimized terms text is a new terms text that is more rigorous and can avoid the risks indicated, output by the large model after receiving the prompt information and reconstructing the original terms without changing the basic business intentions of both parties.
[0117] In this embodiment, the natural language understanding and generation capabilities of a large language model are used to parse and rewrite the clauses. The assembled prompt information is input into the large language model. First, the model understands that the two parts of the prompt information are the original clause to be analyzed and the specific risk warning. Second, the model deeply analyzes the semantic structure of the clause text to be optimized, identifying its subject, predicate, object, condition, liability, and other components. Next, the model compares the risk warning information with these clause components to determine which component(s) are missing or ambiguous, leading to the risk. Then, based on the risk type indicated by the risk warning information, the model makes targeted adjustments to the target components. For example, the ambiguous "transfer of ownership after payment upon delivery" is modified to a clear "transfer of ownership of goods from the date the buyer pays the full contract amount, with the seller bearing the risk of damage or loss of goods before that date." Finally, the model merges the modified parts with the unmodified parts of the original clause text to generate a new, grammatically correct, and logically rigorous optimized clause text.
[0118] S1065. Based on the optimized clause text, integrate and generate the target legal contract document.
[0119] In this embodiment, a final contract is generated through text replacement and integration technology. After receiving the optimized clause text output by the large language model, the corresponding position of the clause text to be optimized is automatically found in the original draft contract file, and the old clause text is replaced with the new optimized clause text. If multiple risk rules are matched, this replacement operation is performed on all corresponding clauses in sequence. After replacing all matched risk clauses, a target legal contract document integrating all optimized content is obtained.
[0120] As an example, step 1061 first applies the draft "CNC Machine Tool Sales Contract" and the matched target risk rules. Precedence = [Customized acceptance criteria, technically complex products], Consequence = Quality disputes, buyer's inability to provide evidence. Converting the consequent of the rule into a risk warning message: Historical data shows that when dealing with technically complex products, if the acceptance criteria are subjectively defined, the buyer is highly likely to lose the case due to insufficient evidence of non-compliance in quality disputes.
[0121] Next, using step 1062, locate the specific clauses in the draft contract that are classified as "Custom Acceptance Standards". For example, if a clause is found that reads, "Acceptance: After delivery of the product by Party B, Party A shall conduct acceptance according to its own technical requirements. Any objections should be raised promptly," extract this entire text as the clause to be optimized.
[0122] Next, in step 1063, the risk warning information and the text of the clauses to be optimized are combined into a structured prompt information according to the template.
[0123] Then, through step 1064, the large language model receives this prompt. First, it parses the semantic components of the original clause: [Acceptance Party: Party A], [Acceptance Basis: Self-required Technical Requirements], [Objection Procedure: Timely Raise]. Matching the risk information with these components, it finds that the acceptance basis is too subjective (target component 1), and the objection procedure lacks operability (target component 2). Therefore, targeted adjustments are made: an objective appendix is added to the acceptance basis: "See Appendix 1 of this Contract, 'List of Technical Specifications and Acceptance Standards'," and the form and timeframe for the objection procedure are clarified: "Specific objections and reasons should be raised in writing within 15 working days after receipt of goods." Finally, the optimized clause text is output as: "Acceptance: After Party B delivers the products, Party A shall conduct acceptance in accordance with Appendix 1 of this Contract, 'List of Technical Specifications and Acceptance Standards.' If Party A has any objections, it shall issue a written notice to Party B within 15 working days after receipt of goods, specifying the specific non-conformities and reasons."
[0124] Finally, in step 1065, the optimized text generated by the large language model above is used to replace a clause in the original draft contract. (Regarding the rules...) After a similar process is followed to address payment risks, all modifications are integrated to generate a new "CNC Machine Tool Sales Contract" as the final target legal contract document.
[0125] Through the above steps, this application achieves an intelligent closed loop from risk identification to proactive risk mitigation, enabling the large model to conduct targeted contract drafting and modification under the guidance of specific and authoritative risk knowledge. The resulting legal documents are not only linguistically standardized, but also substantially incorporate defensive designs based on historical judicial experience, significantly improving the rigor and reliability of the contracts.
[0126] Figure 3 is a schematic diagram of a specific implementation of a legal contract document generation system based on large model and vector retrieval provided in this application embodiment. Referring to Figure 3, the system may include: an acquisition module 31, used to construct a case knowledge graph based on case elements and judgment results in the acquired judicial case data, the case knowledge graph being used to describe the relationship between case type, key fact features, contract clause type and judgment result; a mining module 32, used to perform association rule mining on the case knowledge graph to determine hidden risk association rules, the hidden risk association rules being used to indicate the correspondence between the target contract clause type and the target judgment result when the contract text contains the target contract clause type and meets the target key fact features; and a construction module 33, used to construct the hidden risk association rules according to the rule antecedents and rules. The system constructs a risk association rule base based on the correspondence of subsequent events; the parsing module 34 is used to obtain the draft contract in response to user input and parse the draft contract to generate a risk feature vector to characterize the risk features of the draft contract; the matching module 35 is used to perform vector retrieval of the risk feature vector in the risk association rule base to match the target risk association rule that is associated with the draft contract in terms of risk features; the generation module 36 is used to take the subsequent event of the rule in the target risk association rule as risk warning information and input it together with the clause text in the draft contract corresponding to the antecedent of the rule in the target risk association rule into the large model. The large model performs semantic parsing on the clause text and performs logical completion or expression transformation on the clause text according to the risk warning information to generate the target legal contract document.
[0127] The legal contract document generation system based on large model and vector retrieval in this application is used to implement the aforementioned legal contract document generation method based on large model and vector retrieval. Therefore, the specific implementation of the legal contract document generation system based on large model and vector retrieval can be found in the embodiment section of the legal contract document generation method based on large model and vector retrieval mentioned above. The specific implementation can be referred to the description of the corresponding embodiments, which will not be repeated here.
[0128] This application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of the legal contract document generation method based on large model and vector retrieval described above.
[0129] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of any of the above-described methods for generating legal contract documents based on large models and vector retrieval.
[0130] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory, random access memory, portable hard drives, magnetic disks, or optical disks.
[0131] Embodiments of the present invention also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the embodiments of the legal contract document generation method based on large model and vector retrieval described above.
[0132] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0133] The foregoing has provided a detailed description of the legal contract document generation method and system based on large model and vector retrieval provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of this application.
Claims
1. A method for generating legal contract documents based on large models and vector retrieval, characterized in that, Includes the following steps: A case knowledge graph is constructed based on the case elements and judgment results in the acquired judicial precedent data. The case knowledge graph is used to describe the relationship between case type, key factual features, contract clause type and judgment result. Association rule mining is performed on the case knowledge graph to identify hidden risk association rules. The hidden risk association rules are used to indicate the correspondence between the target contract clause type and the target judgment result when the target contract clause type exists in the contract text and meets the target key factual features. Construct a risk association rule library based on the correspondence between the rule antecedents and rule consequents of the hidden risk association rules; In response to user input, a draft contract is obtained and the draft contract is parsed to generate a risk feature vector that characterizes the risk features of the draft contract; The risk feature vector is used for vector retrieval in the risk association rule base to match target risk association rules that are associated with the draft contract in terms of risk features. The consequent of the rule in the target risk association rule is used as risk warning information and is input into the big model along with the clause text in the draft contract that corresponds to the antecedent of the rule in the target risk association rule. The big model performs semantic parsing on the clause text and performs logical completion or expression transformation on the clause text according to the risk warning information to generate the target legal contract document.
2. The method according to claim 1, characterized in that, Association rule mining is performed on the case knowledge graph to identify hidden risk association rules. These hidden risk association rules indicate the correspondence between a target contract clause type and a target key fact feature in the contract text and the target judgment result. This includes: identifying graph structure patterns that associate the contract clause type, the key fact feature, and the judgment result based on the connection relationships in the case knowledge graph; statistically analyzing the distribution of judgment results corresponding to different combinations of contract clause types and key fact features based on the graph structure patterns; selecting graph structure patterns from the statistical distribution that result in an unfavorable judgment as risk structure patterns; defining the combination of the contract clause type and the key fact feature in the risk structure pattern as the rule antecedent and the unfavorable judgment result in the risk structure pattern as the rule consequent; and generating hidden risk association rules based on the correspondence between the rule antecedent and the rule consequent.
3. The method according to claim 1, characterized in that, Constructing a risk association rule base by establishing a correspondence between the hidden risk association rules and their antecedents and consequents includes: vectorizing the contract clause types and key factual features of the antecedents in the hidden risk association rules to obtain rule feature vectors; identifying the judgment results of the consequents in the hidden risk association rules to obtain risk description tags; establishing a mapping relationship between the rule feature vectors and the risk description tags based on the hidden risk association rules; and storing all hidden risk association rules corresponding to the mapping relationship to construct the risk association rule base.
4. The method according to claim 1, characterized in that, In response to user input, a draft contract is obtained, and the draft contract is parsed to generate a risk feature vector to characterize the risk features of the draft contract. This includes: identifying and extracting contract clause types and key fact features from the draft contract; converting the contract clause types and key fact features into vector forms respectively to generate a first vector and a second vector; and combining the first vector and the second vector to generate a risk feature vector.
5. The method according to claim 1, characterized in that, The risk feature vector is used for vector retrieval in the risk association rule base to match target risk association rules that are associated with the draft contract in terms of risk features. This includes: calculating the similarity between the risk feature vector and each rule feature vector in the risk association rule base; filtering target rule feature vectors whose similarity meets preset conditions from the risk association rule base based on the similarity; and determining the hidden risk association rule corresponding to the target rule feature vector in the risk association rule base as the target risk association rule.
6. The method according to claim 1, characterized in that, The following steps are taken: First, the consequent of the rule in the target risk association rule is used as risk warning information. This information, along with the clause text in the draft contract corresponding to the antecedent of the rule in the target risk association rule, is input into a large model. The large model performs semantic parsing on the clause text and logically completes or transforms the clause text based on the risk warning information to generate the target legal contract document. This includes: converting the unfavorable judgment result of the consequent of the rule in the target risk association rule into text form to obtain risk warning information; locating specific clause text in the draft contract that matches the contract clause type of the antecedent of the rule in the target risk association rule as the clause text to be optimized; combining the risk warning information and the clause text to be optimized as prompt information; inputting the prompt information into the large model, which then parses and corrects the clause text to be optimized based on the risk warning information, outputting optimized clause text; and finally, integrating and generating the target legal contract document based on the optimized clause text.
7. The method according to claim 6, characterized in that, The prompt information is input into a large model, which then parses and corrects the text of the clause to be optimized based on the risk warning information, outputting an optimized clause text. This process includes: extracting the risk warning information and the text of the clause to be optimized from the prompt information; analyzing the semantic structure of the text of the clause to be optimized based on the large model to identify the clause components; matching the risk warning information with the clause components to determine the target clause components that need correction; adjusting the text content corresponding to the target components based on the risk warning information to generate a modified text; and merging the modified text with the text of the clause to be optimized to generate the optimized clause text.
8. A legal contract document generation system based on large model and vector retrieval, characterized in that, include: The acquisition module is used to construct a case knowledge graph based on the case elements and judgment results in the acquired judicial case data. The case knowledge graph is used to describe the relationship between case type, key factual features, contract clause type and judgment result. The mining module is used to mine association rules in the case knowledge graph to determine hidden risk association rules. The hidden risk association rules are used to indicate the correspondence between the target contract clause type and the target judgment result when the target contract clause type exists in the contract text and meets the target key factual features. The construction module is used to construct a risk association rule base according to the correspondence between the hidden risk association rules and the rule antecedents and consequents; the parsing module is used to obtain the contract draft in response to user input and parse the contract draft to generate a risk feature vector to characterize the risk features of the contract draft. The matching module is used to perform vector retrieval of the risk feature vector in the risk association rule base to match the target risk association rule that is associated with the draft contract in terms of risk features. The generation module is used to take the rule consequent in the target risk association rule as risk warning information and input it together with the clause text in the draft contract corresponding to the rule antecedent in the target risk association rule into the large model. The large model performs semantic parsing on the clause text and performs logical completion or expression transformation on the clause text according to the risk warning information to generate the target legal contract document.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the legal contract document generation method based on large model and vector retrieval as described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, enables the generation method for legal contract documents based on large models and vector retrieval as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Legal contract document generation method and system based on large model and vector retrieval
CN118364056A
Contract generation system and method based on multiple agents
CN121234894A
Semantic judicial contract compliance automatic generation and examination system based on DIKWP model
CN121328555A
Intelligent contract risk identification method and device based on large language model
CN121706743A
Using machine learning models to analyze contractual terms and clauses in a legal contract, to recommend edits, and to make changes to a workflow
US20240086651A1