LLM multi-agent adaptive dynamic collaborative design method for contract review
By constructing a library of intelligent agents for reviewing various types of contracts and a dynamic communication protocol between these agents, combined with a workflow adaptive engine, the problems of specialized division of labor and cross-domain collaboration in complex contract review are solved, achieving efficient and accurate contract review and report generation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUHAN SHUZHONG TECHNOLOGY CO LTD
- Filing Date
- 2025-12-29
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technologies are insufficient to meet the demands of complex contract review for specialized division of labor, cross-domain collaboration, and full-process control. Traditional manual review is inefficient, and the accuracy of a single LLM model is low in complex scenarios. Existing solutions cannot effectively handle complex contracts across multiple domains.
A specialized intelligent agent library for reviewing multiple types of contracts is constructed. A domain-fine-tuned LLM model is adopted. Through a dynamic communication protocol of semantic ontology between intelligent agents and a workflow adaptive engine based on contract feature vectors, multi-domain specialized review is achieved. Confidence weighting, voting mechanisms and collaborative decision-making are used to handle cross-domain clause conflicts and generate standardized review reports.
It enables efficient and accurate multi-domain contract review, improves review efficiency and accuracy, generates highly interpretable standardized review reports, and supports cross-domain collaboration and full-process control.
Smart Images

Figure CN121998597A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of natural language processing and intelligent decision-making, and particularly relates to an LLM multi-agent adaptive dynamic collaborative design method for contract review. Background Art
[0002] Contract review is the core risk control link in business activities, and its quality directly relates to the legal compliance and commercial interest protection of enterprises. With the deep development of the market economy, the types of contracts are becoming increasingly diversified, covering multiple professional fields such as cross-border mergers and acquisitions, data compliance, intellectual property licensing, and pharmaceutical GSP adaptation. The complexity of terms has increased exponentially. The number of clauses in large commercial contracts often exceeds 500, and it involves cross-content in multiple fields such as law, finance, and technology.
[0003] The traditional manual review mode has significant limitations: It takes an average of 3-5 working days to complete the review of a 100-page complex contract, and the annual review volume of enterprise contracts increases by more than 30%. It is difficult for the manual team to cope with the high-frequency and high-complexity review requirements. At the same time, a single reviewer cannot cover the professional knowledge in multiple fields, resulting in professional blind spots in the review.
[0004] The current mainstream contract review solutions in the industry are mainly divided into three categories:
[0005] Rule engine-driven type: It realizes review by presetting keyword matching rules, with fast response speed, but high rule maintenance cost and inability to handle fuzzy expressions and complex semantic scenarios;
[0006] Single LLM application type: It develops review functions based on general large language models, with better semantic understanding ability than rule engines, but it is prone to "missing one thing while attending to another" in complex division of labor tasks, with a high calculation error rate in professional fields, and the accuracy drops significantly when there is a lack of industry corpus;
[0007] Human-machine collaborative assistance type: It adopts the "AI preliminary screening + manual review" mode. The AI only is responsible for clause element extraction and does not form a closed-loop intelligent review ability. The review quality depends on manual experience and lacks stability.
[0008] The essence of complex contract review is a "multi-task collaboration" process, which needs to complete key information extraction, compliance verification, risk assessment and other links in sequence. However, the existing solutions have problems of task splitting and collaboration missing. The "end-to-end" output mode of the single model leads to insufficient granularity and poor interpretability of the review results. Therefore, the existing technologies are difficult to meet the core requirements of complex contract review for "specialized division of labor", "cross-field collaboration", and "full-process controllability", and there is an urgent need to build a new intelligent review framework. Summary of the Invention
[0009] This invention aims to solve at least one of the technical problems existing in the prior art, and proposes an LLM multi-agent adaptive dynamic cooperative design method for contract review.
[0010] In a first aspect, embodiments of the present invention provide an LLM multi-agent adaptive dynamic cooperative design method for contract review, comprising:
[0011] S100. Construct a specialized intelligent agent library for reviewing multiple types of contracts. The intelligent agent library adopts a domain-fine-tuned LLM model, including a general basic intelligent agent group, a specialized contract intelligent agent group, a collaborative decision-making intelligent agent group, and a process control intelligent agent group; the intelligent agent library enables multi-domain specialized review capabilities.
[0012] S200. Establish a dynamic communication protocol based on semantic ontology between the intelligent agents, define the core fields of the communication messages, configure a hybrid communication structure and a phased communication strategy scheduling mechanism to ensure the accuracy and efficiency of information transmission between intelligent agents;
[0013] S300. Design a workflow adaptive engine based on contract feature vectors. By extracting key contract features to generate feature vectors, construct a multi-level workflow adaptation mechanism, and dynamically generate and adjust the review path according to contract type, complexity, and risk level.
[0014] S400. Contract preprocessing and agent collaboration group construction: Receive the contract text to be reviewed, perform format conversion, redundant information removal, structure processing, hierarchy recognition and type recognition on the contract text, select suitable agents from the agent library based on the recognition results to form a collaboration group, and trigger the corresponding workflow instance.
[0015] S500 performs dynamic review and cross-domain collaborative processing of contracts. The intelligent agent executes review tasks according to the dynamic workflow. For cross-domain clause conflicts, a collaborative decision-making mechanism combining confidence weighting, voting mechanism and collaborative decision-making intelligent agent adjudication is adopted to generate phased structured results including clause analysis summary, risk labeling, modification suggestions and compliance basis chain.
[0016] S600. Collect the results of each task node after completion, perform multi-dimensional fusion and format output, and generate a standardized contract review report.
[0017] Furthermore, in S100, the general basic intelligent agent group includes a terminology parsing intelligent agent, a clause compliance intelligent agent, and a risk quantification intelligent agent; wherein:
[0018] The terminology parsing agent, based on the Legal-BERT large model, guides the model to identify term boundaries and associate term definitions through a special terminology parsing prompt word project;
[0019] The clause compliance intelligent agent is based on the LLaMA series model with fine-tuning in the legal field. It guides the model to match clauses with legal provisions and judge their suitability through compliance verification prompts.
[0020] The risk quantification intelligent agent, based on a general large model, guides the model to apply risk matrix analysis through risk assessment-specific prompts.
[0021] Furthermore, in S100, the specialized contract intelligent agent group includes a procurement contract specialized intelligent agent, a technology development contract specialized intelligent agent, a labor contract specialized intelligent agent, and a cross-border contract specialized intelligent agent; wherein:
[0022] The procurement contract-specific intelligent agent is based on a general large model. It guides the model to focus on core clauses such as the description of the procurement target, acceptance standards, warranty period, and payment ratio through procurement clause review prompts.
[0023] The technology development contract-specific intelligent agent, based on a large model sensitive to technical terminology, guides the model to analyze intellectual property ownership, development result delivery standards, and key technical indicator acceptance clauses through review prompts on core clauses of the technology contract.
[0024] The labor contract-specific intelligent agent is based on a large legal model and uses special clause review prompts in labor contracts to guide the model to verify non-compete agreements, social security contributions, working hours systems, and salary payment clauses.
[0025] The cross-border contract-specific intelligent agent, based on a multilingual large model, uses prompts to guide the model in handling multilingual conversion and adaptation to foreign-related laws and regulations.
[0026] Furthermore, in S200, a dynamic communication protocol based on semantic ontology is established between the intelligent agents. Specific steps include:
[0027] S201. Adapt the communication structure. The core layer adopts a centralized communication and control agent integration mode, with WorkflowManagerAgent coordinating tasks and CommunicationProxyAgent managing communication decoupling. The edge layer builds a shared message pool to support subscription and publication, and constructs a semantic communication graph. It controls local point-to-point communication through a gating mechanism to reduce redundant interactions.
[0028] S202. Design the content format of the communication protocol, define the JSON-LD extended format unified semantic communication data structure, and have ProtocolEncoderAgent automatically generate all fields that must be included in the communication messages between intelligent agents, and have CommunicationProxyAgent verify them;
[0029] S203. Schedule the communication strategy and enable full communication, semantic weight-driven communication, and global control communication strategies respectively in the three stages of review initialization, mid-task, and risk conflict to achieve efficient and controllable intelligent agent collaboration.
[0030] Furthermore, in S300, a workflow adaptive engine based on contract feature vectors is designed, and the specific steps include:
[0031] S301. Construct contract feature vectors. After contract preprocessing, use the TF-IDF+BERT vector fusion algorithm to extract text and structural features and generate feature vectors of a preset length.
[0032] S302. Automatically determine the process type and output process labels using a lightweight classification model. The process labels include simple processes, standard processes, and complex processes.
[0033] S303. Generate a task graph, defining it as a directed graph G=V,E, where: V: a set of task nodes, including terminology parsing, special review, and manual verification; E: task dependency edges, representing the execution order and data flow; automatically call the graph template library according to the process type and make personalized adjustments;
[0034] S304. Node scheduling and resource allocation: for each node, if the expected time consumption of the node is greater than the preset time consumption threshold, then the node is processed in parallel or divided into smaller parts to improve review efficiency.
[0035] S305. Define the process health function and monitor and dynamically adjust the graph structure or node strategy in real time.
[0036] Furthermore, in S400, the specific steps for contract preprocessing and agent collaboration group construction include:
[0037] S401. For contract reception and format standardization, for image-based contracts, text is extracted using the OCR module and semantic error correction is performed using the edit distance algorithm; all text is uniformly converted into a standard intermediate structure to be compatible with downstream structure recognition and feature extraction.
[0038] S402. Contract structure identification and metadata extraction, including format cleaning, paragraph reconstruction and clause segmentation of the contract; using a sequence labeling model to identify the hierarchical structure of the contract, including at least chapters, articles, clauses and items; extracting core metadata, including at least the contract name, subject matter, subject information and signing time, and organizing it into a contract structure description vector in key-value pair form;
[0039] S403. For contract type identification and classification, a multimodal contract that integrates TF-IDF and BERT vectors is embedded and input into a lightweight classification model, outputting the contract type prediction results under a three-level label system;
[0040] S404. Automatically construct agent collaboration groups. Based on contract type and structural characteristics, dynamically select matching agent sets from the agent library. The agent matching function comprehensively considers multiple indicators such as capability vector, execution cost, and domain adaptability. Finally, task collaboration groups are generated and the corresponding workflow instances are initialized by WorkflowManagerAgent.
[0041] Furthermore, S500 includes dynamic review and cross-domain collaborative processing of contracts, with specific steps including:
[0042] S501. Execute the review task, and execute the serial and parallel review process according to the task graph topology. The intelligent agents are divided to handle term parsing and compliance verification tasks. The node execution strategy is driven by a weighted objective function of accuracy, cost and latency.
[0043] S502. For multi-agent collaborative processing of cross-domain clauses, for cross-domain composite clauses, three fusion strategies are adopted: confidence weighting, voting, and coordinated proxy adjudication, to integrate the judgment results of multiple agents;
[0044] S503. Produce phased structured outputs, outputting structured content including clause summaries, risk levels, modification suggestions, and legal basis at key nodes, and organize it according to standard JSON Schema to support subsequent aggregation and report generation.
[0045] Furthermore, in S600, the results of each task node are collected, multi-dimensionally integrated, and output in a formatted manner to generate a standardized contract review report. Specific steps include:
[0046] S601. For result aggregation and consistency processing, ResultAggregatorAgent summarizes the output of all sub-agents, eliminates redundancy and conflicts through semantic merging and standardization correction, and uses JSON-LD format to unify the result representation;
[0047] S602. Integrate risk assessment and recommendations, calculate comprehensive risk by weighting the probability of risk occurrence and impact, generate optimization recommendations by combining rule base and case base, and attach legal or case law basis to enhance credibility;
[0048] S603. Generate a structured review report, which includes contract information, review conclusions, clause summaries, and appendices. The review report supports export in PDF / HTML / Markdown formats and has automatic table of contents and intelligent index navigation functions.
[0049] Furthermore, an LLM multi-agent adaptive dynamic collaborative design method for contract review also includes: S700. Based on historical review data and user feedback, the agent collaboration strategy and workflow adaptation rules are continuously optimized through reinforcement learning algorithms to optimize the multi-agent adaptive dynamic collaborative method. Specific steps include:
[0050] S701. Feedback Collection and Reward Modeling: After the review is completed, the system automatically records the user's modification suggestions, adoption status, and corrective path behavior, and transforms them into reward signals to construct reinforcement learning input triples;
[0051] S702. Reinforcement Learning Strategy Optimization: Employ a pre-defined optimization algorithm to iteratively update the agent scheduling strategy with the goal of maximizing long-term cumulative rewards;
[0052] S703. System Updates and Strategy Deployment: Once the strategy's stability and profitability meet the targets, it will be automatically deployed online; prompt words, rules, and task graph modules will be updated synchronously to achieve system evolution and form a self-driven closed-loop intelligent agent system.
[0053] Secondly, the present invention also discloses an electronic device, comprising:
[0054] One or more processors;
[0055] Memory, used to store one or more programs;
[0056] When the one or more programs are executed by the one or more processors, the one or more processors implement the collaborative design method.
[0057] This invention provides an LLM (Limited Management Model) multi-agent adaptive dynamic collaborative design method for contract review. First, it constructs a specialized agent library containing various types of contracts, including general foundations and specific contracts, covering professional review capabilities across multiple domains. Next, it establishes a dynamic semantic ontology communication protocol between agents to ensure accurate and efficient information transmission. Then, it constructs a workflow adaptive engine using contract feature vectors to dynamically generate and adjust review paths. After preprocessing the contracts to be reviewed, suitable agents are selected to form a collaborative group and trigger the workflow. Agents execute the review according to the process, employing a multi-domain collaborative decision-making mechanism to handle cross-domain clause conflicts and generate phased structured results. Finally, it integrates the results from each node and outputs a standardized review report. This invention addresses the shortcomings of existing technologies in meeting the core requirements of complex contract review for "specialized division of labor," "cross-domain collaboration," and "full-process controllability." Attached Figure Description
[0058] Figure 1 A flowchart illustrating an LLM multi-agent adaptive dynamic cooperative design method for contract review provided in an embodiment of the present invention;
[0059] Figure 2 A logical schematic diagram of an LLM multi-agent adaptive dynamic cooperative design method for contract review provided in an embodiment of the present invention;
[0060] Figure 3 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0061] To enable those skilled in the art to better understand the technical solutions of the present invention, exemplary embodiments of the present invention are described below in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0062] Where there is no conflict, the various embodiments of the present invention and the features thereof may be combined with each other.
[0063] As used herein, the term "and / or" includes any and all combinations of one or more related enumerated entries.
[0064] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used herein, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that when the terms “comprising” and / or “made of” are used in this specification, the presence of the stated feature, integral, step, operation, element, and / or component is specified, but the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof is not excluded. Terms such as “connected” or “linked” are not limited to physical or mechanical connections but can include electrical connections, whether direct or indirect.
[0065] Unless otherwise specified, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having the meaning consistent with their meaning in the context of the relevant art and the invention, and will not be interpreted as having an idealized or overly formal meaning unless expressly so defined herein.
[0066] In the technical solution of this invention, the collection, storage, use, processing, transmission, provision, and disclosure of user personal information all comply with relevant laws and regulations and do not violate public order and good morals. The use of user data in this technical solution follows relevant national laws and regulations (e.g., the "Information Security Technology - Personal Information Security Specification"). For example: appropriate measures are taken for personal information access control; restrictions are imposed on the display of personal information; the purpose of using personal information does not exceed the scope of direct or reasonable association; and explicit identity targeting is eliminated when using personal information to avoid precisely locating a specific individual.
[0067] To address at least one of the technical problems existing in the aforementioned related technologies, this invention provides an LLM multi-agent adaptive dynamic cooperative design method for contract review.
[0068] This invention provides an LLM multi-agent adaptive dynamic cooperative design method for contract review, such as... Figure 1 and 2 ,include:
[0069] S100. Construct a specialized intelligent agent library for reviewing multiple types of contracts. The intelligent agent library adopts a domain-fine-tuned LLM model, including a general basic intelligent agent group, a specialized contract intelligent agent group, a collaborative decision-making intelligent agent group, and a process control intelligent agent group; the intelligent agent library enables multi-domain specialized review capabilities.
[0070] Among them, general-purpose intelligent agents (such as GeneralReviewAgent) handle basic compliance checks and format reviews;
[0071] Industry-specific intelligent agents (such as IPContractAgent, PharmaGSPAgent): fine-grained analysis of contract execution for specific industries (such as intellectual property, pharmaceuticals);
[0072] Collaborative decision-making agents (such as RiskCoordinationAgent): used to analyze potential conflicts between different terms and form a comprehensive judgment;
[0073] Process control agents (such as WorkflowManagerAgent) are responsible for task scheduling and resource allocation, ensuring the processability and controllability of agent calls.
[0074] Specifically, general basic intelligent agent group construction methods include:
[0075] Terminology parsing agent: Based on the Legal-BERT large model, driven by a terminology parsing special prompt word project (such as guiding the model to identify term boundaries and associate term definitions), the core toolset is a knowledge graph covering 3200+ legal terms (stored in Neo4j, including "synonyms" and "superiors"), to achieve entity recognition of common contract terms.
[0076] The clause compliance intelligent agent is based on a finely tuned large model in the legal field (such as the LLaMA series of legal adaptation versions). It is guided by compliance verification prompts (such as guiding the model to match clauses with legal provisions and judging suitability). The toolset includes a database of 4800+ current laws and regulations and a search enhancement generation (RAG) component to achieve basic compliance verification.
[0077] Risk Quantification Intelligent Agent: Based on a general large model, it is driven by risk assessment-specific prompts (such as guiding the model to apply risk matrices, analyzing impact and probability of occurrence). The toolset consists of a risk matrix model (impact × probability of occurrence) and a historical risk case library, which scores general risk items from 0 to 10.
[0078] The methods for constructing specialized contract intelligent agent groups include:
[0079] For fine-grained analysis of contract execution in specific industries (such as intellectual property and pharmaceuticals), specialized intelligent agents are built based on a large model to handle procurement contracts, technology development contracts, labor contracts, and cross-border contracts. Different intelligent agents achieve differentiated review functions through proprietary, customized prompts (guiding the model to focus on specific contract type clauses), toolsets (industry-specific resources), and review rules.
[0080] The procurement contract-specific intelligent agent is based on a general large model and driven by procurement clause review prompts (such as guiding the model to focus on the description of the procurement target, acceptance criteria, etc.). The toolset includes a library of 380+ industry procurement templates and a "warranty period and payment ratio" correlation verification model module (F1 value 0.89).
[0081] The technology development contract-specific intelligent agent is based on a large model sensitive to technical terms. It is guided by key words in the review of core clauses of technology contracts (such as guiding the model to analyze the ownership of intellectual property rights and the delivery standards of development results). The toolset is a special knowledge base of the Technology Contract Law and an interface with the national patent database to achieve cross-verification of ownership.
[0082] Labor Contract Specialized Intelligent Agent: Based on a large legal model, it is driven by special clause review prompts in labor contracts (such as guiding the model to verify non-competition agreements and social security payment clauses). The toolset includes a database of the Labor Contract Law and local implementation regulations, as well as a tool for verifying the compliance of working hours systems.
[0083] Cross-border contract-specific intelligent agent: Based on a multilingual large model (such as the multilingual version of BLOOM), it guides cross-border contract comprehensive review prompts (such as guiding the model to handle multilingual conversion and adapt to foreign-related laws and regulations). The toolset includes a module on conflict of international private law rules, an 8-language translation interface (translation accuracy ≥95%), and a foreign-related law library such as the United Nations Convention on Contracts for the International Sale of Goods.
[0084] The collaborative decision-making agent deployment method includes: taking a large model with strong comprehensive reasoning ability (such as GPT-4 or an equivalent model) as the core, driving it through cross-domain conflict coordination prompts (such as guiding the model to integrate opinions from multiple fields such as law, business, and technology), equipped with federated learning framework components (for securely aggregating local decisions of various specialized agents) and a conflict resolution strategy library toolset, to analyze potential conflicts between different clauses and form a comprehensive judgment.
[0085] The configuration methods for process control intelligent agent groups include:
[0086] The task scheduling and resource allocation logic is implemented based on a large model. Driven by special prompts for process control (such as guiding the model to judge task priority and allocate agent resources), the process and controllability of agent calls are ensured.
[0087] Workflow orchestration agent: Based on a large model that excels in decision-making and planning, it is driven by workflow generation and adjustment prompts (such as the guidance model generating review paths based on contract features). The toolset includes a decision model based on PPO reinforcement learning (the state space contains 128-dimensional contract feature vectors, and the action space is the workflow adjustment operation), a library of 120+ adjustment rules, and a workflow template library. It can generate process health scores (0-100 points) and supports custom rules (such as "contracts with a value > 10 million are required to introduce a financial agent").
[0088] Contract classification and preprocessing intelligent agent: Based on large text understanding and classification models (such as the BERT series), driven by preprocessing and classification prompts (such as guiding the model to perform format conversion, hierarchical recognition, and type judgment), the toolset includes 15 mainstream document format conversion tools, an edit distance algorithm OCR error correction module (accuracy improved to 98.7%), a BiLSTM-CRF contract hierarchical structure recognition tool (chapter-article-clause-item), a three-level classification label system (6 major categories, 32 subcategories, 120+ scene labels) and a manual annotation interface (triggered when confidence < 0.9, incremental training is triggered every 500 data points accumulated).
[0089] S200. Establish a dynamic communication protocol based on semantic ontology between the intelligent agents, define the core fields of the communication messages, configure a hybrid communication structure and a phased communication strategy scheduling mechanism to ensure the accuracy and efficiency of information transmission between intelligent agents;
[0090] In S200 of this embodiment, a dynamic communication protocol based on semantic ontology is established between the intelligent agents. The specific steps include:
[0091] S201. Adapt the communication structure. The core layer adopts a centralized communication and control agent integration mode, with WorkflowManagerAgent coordinating tasks and CommunicationProxyAgent managing communication decoupling. The edge layer builds a shared message pool to support subscription and publication, and constructs a semantic communication graph. It controls local point-to-point communication through a gating mechanism to reduce redundant interactions.
[0092] Specifically, based on the differences in responsibilities, communication frequency, and task relevance of different intelligent agents in the review process, this invention adopts the following communication structure:
[0093] The core layer employs a centralized communication + control proxy mechanism: a unified WorkflowManagerAgent is configured as the central coordinating agent, receiving messages from each sub-task agent and dispatching tasks. Simultaneously, a CommunicationProxyAgent is constructed to manage semantic protocols, message format conversion, information routing, and agent context bridging, achieving decoupled communication. The functional agents do not communicate directly but instead use the proxy for mediated communication, effectively reducing redundant interactions.
[0094] The edge layer supports a shared message pool mechanism: a lightweight "shared message pool" structure is built using shared memory (such as Redis / PubSub modules). All agents can subscribe to messages with specific semantic tags on demand, and subscribe / publish based on keywords or roles.
[0095] Graph Structure and Local Communication Control: During process execution, the system automatically constructs a semantic communication graph, enabling local point-to-point communication between neighboring functional agents. A learnable gating mechanism, GatingFunction(agent_i, agent_j), is introduced to determine whether to open a communication channel, thus saving resources and controlling information flow.
[0096] S202. Design the content format of the communication protocol, define a unified semantic communication data structure in JSON-LD extended format, and have ProtocolEncoderAgent automatically generate all fields required for communication messages between agents, which are then verified by CommunicationProxyAgent. Specifically, this implementation defines a unified semantic communication data structure using JSON-LD extended format. All communication messages between agents must include fields such as: intent field to indicate the purpose of this communication; embedding_vector, a sentence vector representation used to enhance the consistency of content understanding; confidence_score, representing the agent's confidence in its judgment results, which helps the aggregation module to perform weighted processing; all fields can be automatically generated by ProtocolEncoderAgent and verified by CommunicationProxyAgent.
[0097] S203. Schedule the communication strategy and enable full communication, semantic weight-driven communication, and global control communication strategies respectively in the three stages of review initialization, mid-task, and risk conflict to achieve efficient and controllable intelligent agent collaboration.
[0098] Specifically, this embodiment introduces a hybrid communication strategy, dynamically enabling different strategies based on different stages:
[0099] Review Initialization Phase (Full Communication): All task agents broadcast a shared context (such as contract metadata and chapter structure tree) to build an initial communication graph.
[0100] Mid-stage of the mission (PartialPredefined + IndividualControl):
[0101] The communication graph converges to a task-related subgraph. Each agent decides whether to communicate based on semantic content and weight score (e.g., relevance > threshold), using the following gating function:
[0102] Commagenti,agentj=sigmoidW⋅fCi,Cj,intent
[0103] Where Ci and Cj are the semantic context vectors of the two agents, f is the combination function, and W is the learnable parameter.
[0104] Risk Conflict Phase (GlobalControl): Activate CoordinationAgent to conduct global broadcast and aggregation assessment, and if necessary, suspend low-priority communication paths and improve the communication rate of high-risk terms.
[0105] This embodiment introduces a hybrid mechanism of "semantic protocol + control agent + hierarchical structure + learnable communication strategy" to enable the contract review multi-agent system to have characteristics such as high communication efficiency, task sensitivity, security controllability, and semantic consistency.
[0106] S300. Design a workflow adaptive engine based on contract feature vectors. By extracting key contract features to generate feature vectors, construct a multi-level workflow adaptation mechanism, and dynamically generate and adjust the review path according to contract type, complexity, and risk level.
[0107] In S300 of this embodiment, a workflow adaptive engine based on contract feature vectors is designed, and the specific steps include:
[0108] S301. Construct contract feature vectors. After contract preprocessing, use the TF-IDF+BERT vector fusion algorithm to extract textual and structural features, generating feature vectors of a preset length; specifically, generate feature vectors of length x∈R128.
[0109]
[0110] S302. Automatically determine the process type and output process labels using a lightweight classification model. These process labels include simple processes, standard processes, and complex processes. Lightweight classification model Output process tags:
[0111]
[0112] If the model confidence level If so, insert a manual review node; combine rules to assist in the judgment, such as:
[0113]
[0114] S303. Generate a task graph, defining it as a directed graph G=V,E, where: V: a set of task nodes, including terminology parsing, special review, and manual verification; E: task dependency edges, representing the execution order and data flow; automatically call the graph template library according to the process type and make personalized adjustments;
[0115] Specifically, the task graph is defined as a directed graph. ,in: : A set of task nodes, such as terminology analysis, special review, manual review, etc.; Task dependency edges represent the execution order and data flow. The graph template library is automatically invoked and customized based on the process type.
[0116] Simplified process → Linear graph (≤5 nodes);
[0117] Complex processes can be transformed into multi-branch parallel graphs, supporting collaborative and nested decision-making.
[0118] S304. Node scheduling and resource allocation are performed. For each node, if the expected processing time exceeds a preset time threshold, the node is processed in parallel or partitioned at a finer level to improve review efficiency. Specifically, for each node... The scheduling strategies include:
[0119] Execution method decision: If the node's expected time consumption If so, try parallel processing or granular partitioning;
[0120] Agent allocation strategy:
[0121]
[0122] The Score is a comprehensive measure of the agent's accuracy, cost, and response latency.
[0123] Fault rollback mechanism: After a timeout, the load can be reduced or a backup agent can be switched.
[0124] S305. Define the process health function to monitor and dynamically adjust the graph structure or node strategy in real time. The process health function is defined as follows:
[0125]
[0126] Current task completion rate;
[0127] At: Average node accuracy;
[0128] Cumulative risk score;
[0129] when An abnormal event may occur, triggering an adaptive update of the graph structure or node strategy.
[0130] S400. Contract preprocessing and agent collaboration group construction: Receive the contract text to be reviewed, perform format conversion, redundant information removal, structure processing, hierarchy recognition and type recognition on the contract text, select suitable agents from the agent library based on the recognition results to form a collaboration group, and trigger the corresponding workflow instance.
[0131] In this implementation of S400, the specific steps for contract preprocessing and agent collaboration group construction include:
[0132] S401. For contract reception and format standardization, for image-based contracts, text is extracted using the OCR module and semantic error correction is performed using the edit distance algorithm; all text is uniformly converted into a standard intermediate structure to be compatible with downstream structure recognition and feature extraction.
[0133] S402. Contract structure identification and metadata extraction: The contract undergoes format cleaning, paragraph reconstruction, and clause segmentation; a sequence labeling model is used to identify the contract's hierarchical structure, including at least chapters, articles, clauses, and items; core metadata is extracted, including at least the contract name, subject matter, subject information, and signing time, and organized into a key-value pair format contract structure description vector; specifically, core metadata (such as contract name, subject matter, subject information, signing time, etc.) is extracted and organized into a key-value pair format contract structure description vector:
[0134]
[0135] S403. For contract type identification and classification, a multimodal contract that integrates TF-IDF and BERT vectors is embedded and input into a lightweight classification model, outputting the contract type prediction results under a three-level label system;
[0136] S404. Automatically construct agent collaboration groups. Based on contract type and structural characteristics, dynamically select a set of matching agents from the agent library. The agent matching function comprehensively considers multiple dimensions of indicators, including capability vector, execution cost, and domain adaptability. Finally, task collaboration groups are generated, and the WorkflowManagerAgent initializes the corresponding workflow instances. Specifically, based on contract type and structural characteristics, a set of matching agents is dynamically selected from the agent library:
[0137] Aselected={ai|Match(ai,vcontract)}>θ
[0138] The agent matching function comprehensively considers multiple dimensions such as its capability vector, execution cost, and domain adaptability; finally, it generates task collaboration groups and initializes the corresponding workflow instances by WorkflowManagerAgent.
[0139] S500 performs dynamic review and cross-domain collaborative processing of contracts. The intelligent agent executes review tasks according to the dynamic workflow. For cross-domain clause conflicts, a collaborative decision-making mechanism combining confidence weighting, voting mechanism and collaborative decision-making intelligent agent adjudication is adopted to generate phased structured results including clause analysis summary, risk labeling, modification suggestions and compliance basis chain.
[0140] In S500 of this embodiment, the contract undergoes dynamic review and cross-domain collaborative processing. Specific steps include:
[0141] S501. Execute the review task, and execute the serial and parallel review process according to the task graph topology. The intelligent agents are divided to handle term parsing and compliance verification tasks. The node execution strategy is driven by a weighted objective function of accuracy, cost and latency.
[0142] Specifically, based on the topology in the task graph, a review process involving serial, parallel, and nested nodes is executed;
[0143] Each sub-agent performs corresponding tasks for different clauses, including terminology parsing, clause compliance verification, and review of time and monetary factors;
[0144] The node execution strategy is driven by the following objective function:
[0145]
[0146] S502. For multi-agent collaborative processing of cross-domain clauses, for cross-domain composite clauses, three fusion strategies are adopted: confidence weighting, voting, and coordinated proxy adjudication, to integrate the judgment results of multiple agents;
[0147] Specifically, for complex clauses involving multiple dimensions such as technology, law, and commerce, a multi-agent collaborative evaluation mechanism is constructed; the system introduces the following fusion strategy to integrate the judgment results:
[0148] Confidence-weighted: Confidence score of each agent's output The final determination was a weighted average:
[0149]
[0150] Voting mechanism: Each agent outputs a binary judgment, and the conclusion is determined according to the majority rule;
[0151] Coordination Agent Adjudication: Invokes RiskCoordinationAgent to integrate cross-domain knowledge graphs and policy rules, and outputs conflict reconciliation conclusions.
[0152] S503. Produce phased structured outputs, outputting structured content including clause summaries, risk levels, modification suggestions, and legal basis at key nodes, and organize it according to standard JSON Schema to support subsequent aggregation and report generation.
[0153] Specifically, the system outputs structured results at each key node, including: a summary of clause analysis; risk labeling and severity level; guiding modification suggestions; a traceable chain of legal basis (supporting legal provision navigation); and all output content is organized in a standard JSON Schema for easy subsequent aggregation and report generation.
[0154] S600. Collect the results of each task node after completion, perform multi-dimensional fusion and format output, and generate a standardized contract review report.
[0155] In step S600 of this embodiment, the results of each task node are collected, multi-dimensional fusion and formatted output are performed, and a standardized contract review report is generated. The specific steps include:
[0156] S601. For result aggregation and consistency processing, ResultAggregatorAgent summarizes the output of all sub-agents, eliminates redundancy and conflicts through semantic merging and standardization correction, and uses JSON-LD format to unify the result representation;
[0157] Specifically, the outputs of all sub-agents are uniformly aggregated into ResultAggregatorAgent; redundant and conflicting information is eliminated through semantic merging and naming convention correction; and the result representation format is unified using the JSON-LD data structure defined by the protocol.
[0158] S602. Integrate risk assessment and recommendations, calculate comprehensive risk by weighting the probability of risk occurrence and impact, generate optimization recommendations by combining rule base and case base, and attach legal or case law basis to enhance credibility;
[0159] Specifically, the risks of the comprehensive terms are calculated based on the following risk calculation function:
[0160]
[0161] in Probability of risk occurrence To assess its impact, the suggestion generation engine is invoked to optimize the output path based on the rule base and case base; each suggestion is accompanied by explanatory legal or case support to enhance user trust.
[0162] S603. Generate a structured review report, which includes contract information, review conclusions, clause summaries, and appendices. The review report supports export in PDF / HTML / Markdown formats and has automatic table of contents and intelligent index navigation functions.
[0163] Specifically, the review report supports exporting as a structured report in formats such as PDF / HTML / Markdown; the report content includes: basic contract information; overall review conclusions and risk ratings; clause-level review summaries and recommendations; appendices: relevant laws and regulations, terminology definitions, reference links, etc.; the review report supports automatic table of contents generation and intelligent index navigation.
[0164] In some preferred embodiments, an LLM multi-agent adaptive dynamic collaborative design method for contract review further includes: S700. Based on historical review data and user feedback, continuously optimize the agent collaboration strategy and workflow adaptation rules through reinforcement learning algorithms to optimize the multi-agent adaptive dynamic collaborative method. Specific steps include:
[0165] S701. Feedback Collection and Reward Modeling: After review, user suggestions, adoption status, and corrective path behaviors are automatically recorded and transformed into reward signals to construct reinforcement learning input triples; whereby the triples are represented as:
[0166]
[0167] in The current task status. Select actions for the agent. Rate user feedback.
[0168] S702. Reinforcement Learning Strategy Optimization: Employ a pre-defined optimization algorithm to iteratively update the agent scheduling strategy with the goal of maximizing long-term cumulative rewards;
[0169] S703. System Updates and Strategy Deployment: Once the strategy's stability and profitability meet the targets, it will be automatically deployed online; prompt words, rules, and task graph modules will be updated synchronously to achieve system evolution and form a self-driven closed-loop intelligent agent system.
[0170] This embodiment provides an LLM (Limited Management Model) multi-agent adaptive dynamic collaborative design method for contract review. First, it constructs a specialized agent library containing various types of contracts, including general foundations and specific contracts, covering professional review capabilities across multiple domains. Next, it establishes a dynamic semantic ontology communication protocol between agents to ensure accurate and efficient information transmission. Then, it constructs a workflow adaptive engine using contract feature vectors to dynamically generate and adjust review paths. After preprocessing the contracts to be reviewed, suitable agents are selected to form a collaborative group and trigger the workflow. Agents execute the review according to the process, employing a multi-domain collaborative decision-making mechanism to handle cross-domain clause conflicts and generate phased structured results. Finally, it integrates the results from each node and outputs a standardized review report. This invention solves the problem that existing technologies struggle to meet the core requirements of complex contract review for "specialized division of labor," "cross-domain collaboration," and "full-process controllability."
[0171] Based on the same inventive concept, embodiments of the present invention also provide an electronic device. Figure 2 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Figure 2 As shown, an embodiment of the present invention provides an electronic device including: one or more processors 101, a memory 102, and one or more I / O interfaces 103. The memory 102 stores one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement any of the collaborative design methods described in the above embodiments; the one or more I / O interfaces 103 are connected between the processors and the memory, configured to enable information interaction between the processors and the memory.
[0172] The processor 101 is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory 102 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), and flash memory (FLASH); the I / O interface (read / write interface) 103 is connected between the processor 101 and the memory 102, and can realize information interaction between the processor 101 and the memory 102, including but not limited to a data bus (Bus).
[0173] In some embodiments, the processor 101, memory 102, and I / O interface 103 are interconnected via bus 104, and thus connected to other components of the computing device.
[0174] In some embodiments, the one or more processors 101 include a field-programmable gate array.
[0175] This invention also provides a computer-readable medium. The computer-readable medium stores a computer program, which, when executed by a processor, implements the steps of any of the co-design methods described in the above embodiments. The computer-readable storage medium may be volatile or non-volatile.
[0176] This invention also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code. When the computer-readable code is run in the processor of an electronic device, the processor in the electronic device executes the above-described co-design method.
[0177] Those skilled in the art will understand that all or some of the steps, systems, and apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software can be distributed on a computer-readable storage medium, which may include computer storage media (or non-transitory media) and communication media (or transient media).
[0178] As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable program instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technologies, portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is known to those skilled in the art that communication media typically contain computer-readable program instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0179] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0180] The computer program instructions used to perform the operations of this invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing state information from the computer-readable program instructions. This electronic circuitry can execute the computer-readable program instructions to implement various aspects of the invention.
[0181] The computer program product described herein can be implemented specifically through hardware, software, or a combination thereof. In one alternative embodiment, the computer program product is specifically embodied in a computer storage medium; in another alternative embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.
[0182] Various aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0183] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0184] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0185] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0186] Example embodiments have been disclosed herein, and while specific terminology has been used, it is for illustrative purposes only and should be construed as such, and is not intended to be limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in conjunction with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in conjunction with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of the invention as set forth in the appended claims.
Claims
1. A multi-agent adaptive dynamic cooperative design method for contract review using LLM, characterized in that, include: S100. Construct a specialized intelligent agent library for reviewing multiple types of contracts. The intelligent agent library adopts a domain-fine-tuned LLM model, including a general basic intelligent agent group, a special contract intelligent agent group, a collaborative decision-making intelligent agent group, and a process control intelligent agent group. The intelligent body library enables multi-domain professional review capabilities to be covered; S200. Establish a dynamic communication protocol based on semantic ontology between the intelligent agents, define the core fields of the communication messages, configure a hybrid communication structure and a phased communication strategy scheduling mechanism to ensure the accuracy and efficiency of information transmission between intelligent agents; S300. Design a workflow adaptive engine based on contract feature vectors. By extracting key contract features to generate feature vectors, construct a multi-level workflow adaptation mechanism, and dynamically generate and adjust the review path according to contract type, complexity, and risk level. S400. Contract preprocessing and agent collaboration group construction: Receive the contract text to be reviewed, perform format conversion, redundant information removal, structure processing, hierarchy recognition and type recognition on the contract text, select suitable agents from the agent library based on the recognition results to form a collaboration group, and trigger the corresponding workflow instance. S500 performs dynamic review and cross-domain collaborative processing of contracts. The intelligent agent executes review tasks according to the dynamic workflow. For cross-domain clause conflicts, a collaborative decision-making mechanism combining confidence weighting, voting mechanism and collaborative decision-making intelligent agent adjudication is adopted to generate phased structured results including clause analysis summary, risk labeling, modification suggestions and compliance basis chain. S600. Collect the results of each task node after completion, perform multi-dimensional fusion and format output, and generate a standardized contract review report.
2. The collaborative design method as described in claim 1, characterized in that, In S100, the general basic intelligent agent group includes a terminology parsing intelligent agent, a clause compliance intelligent agent, and a risk quantification intelligent agent; wherein: The terminology parsing agent, based on the Legal-BERT large model, guides the model to identify term boundaries and associate term definitions through a special terminology parsing prompt word project; The clause compliance intelligent agent is based on the LLaMA series model with fine-tuning in the legal field. It guides the model to match clauses with legal provisions and judge their suitability through compliance verification prompts. The risk quantification intelligent agent, based on a general large model, guides the model to apply risk matrix analysis through risk assessment-specific prompts.
3. The collaborative design method as described in claim 1, characterized in that, In S100, the specialized contract intelligent agent group includes a procurement contract specialized intelligent agent, a technology development contract specialized intelligent agent, a labor contract specialized intelligent agent, and a cross-border contract specialized intelligent agent; wherein: The procurement contract-specific intelligent agent is based on a general large model. It guides the model to focus on core clauses such as the description of the procurement target, acceptance standards, warranty period, and payment ratio through procurement clause review prompts. The technology development contract-specific intelligent agent, based on a large model sensitive to technical terminology, guides the model to analyze intellectual property ownership, development result delivery standards, and key technical indicator acceptance clauses through review prompts on core clauses of the technology contract. The labor contract-specific intelligent agent is based on a large legal model and uses special clause review prompts in labor contracts to guide the model to verify non-compete agreements, social security contributions, working hours systems, and salary payment clauses. The cross-border contract-specific intelligent agent, based on a multilingual large model, uses prompts to guide the model in handling multilingual conversion and adaptation to foreign-related laws and regulations.
4. The collaborative design method as described in claim 1, characterized in that, In S200, a dynamic communication protocol based on semantic ontology is established between the intelligent agents. Specific steps include: S201. Adapt the communication structure. The core layer adopts a centralized communication and control agent integration mode, with WorkflowManagerAgent coordinating tasks and CommunicationProxyAgent managing communication decoupling. The edge layer builds a shared message pool to support subscription and publication, and constructs a semantic communication graph. It controls local point-to-point communication through a gating mechanism to reduce redundant interactions. S202. Design the content format of the communication protocol, define the JSON-LD extended format unified semantic communication data structure, and have ProtocolEncoderAgent automatically generate all fields that must be included in the communication messages between intelligent agents, and have CommunicationProxyAgent verify them; S203. Schedule the communication strategy and enable full communication, semantic weight-driven communication, and global control communication strategies respectively in the three stages of review initialization, mid-task, and risk conflict to achieve efficient and controllable intelligent agent collaboration.
5. The collaborative design method as described in claim 1, characterized in that, In S300, a workflow adaptive engine based on contract feature vectors is designed, and the specific steps include: S301. Construct contract feature vectors. After contract preprocessing, use the TF-IDF+BERT vector fusion algorithm to extract text and structural features and generate feature vectors of a preset length. S302. Automatically determine the process type and output process labels using a lightweight classification model. The process labels include simple processes, standard processes, and complex processes. S303. Generate a task graph, defining it as a directed graph G=V,E, where: V: a set of task nodes, including terminology parsing, special review, and manual verification; E: task dependency edges, representing the execution order and data flow; automatically call the graph template library according to the process type and make personalized adjustments; S304. Node scheduling and resource allocation: for each node, if the expected time consumption of the node is greater than the preset time consumption threshold, then the node is processed in parallel or divided into smaller parts to improve review efficiency. S305. Define the process health function and monitor and dynamically adjust the graph structure or node strategy in real time.
6. The collaborative design method as described in claim 1, characterized in that, In S400, the specific steps for contract preprocessing and agent collaboration group construction include: S401. For contract reception and format standardization, for image-based contracts, text is extracted using the OCR module and semantic error correction is performed using the edit distance algorithm; all text is uniformly converted into a standard intermediate structure to be compatible with downstream structure recognition and feature extraction. S402. Contract structure identification and metadata extraction, including format cleaning, paragraph reconstruction and clause segmentation of the contract; using a sequence labeling model to identify the hierarchical structure of the contract, including at least chapters, articles, clauses and items; extracting core metadata, including at least the contract name, subject matter, subject information and signing time, and organizing it into a contract structure description vector in key-value pair form; S403. For contract type identification and classification, a multimodal contract that integrates TF-IDF and BERT vectors is embedded and input into a lightweight classification model, outputting the contract type prediction results under a three-level label system; S404. Automatically construct agent collaboration groups. Based on contract type and structural characteristics, dynamically select matching agent sets from the agent library. The agent matching function comprehensively considers multiple indicators such as capability vector, execution cost, and domain adaptability. Finally, task collaboration groups are generated and the corresponding workflow instances are initialized by WorkflowManagerAgent.
7. The collaborative design method as described in claim 1, characterized in that, In S500, dynamic review and cross-domain collaborative processing of contracts involve the following steps: S501. Execute the review task, and execute the serial and parallel review process according to the task graph topology. The intelligent agents are divided to handle term parsing and compliance verification tasks. The node execution strategy is driven by a weighted objective function of accuracy, cost and latency. S502. For multi-agent collaborative processing of cross-domain clauses, for cross-domain composite clauses, three fusion strategies are adopted: confidence weighting, voting, and coordinated proxy adjudication, to integrate the judgment results of multiple agents; S503. Produce phased structured outputs, outputting structured content including clause summaries, risk levels, modification suggestions, and legal basis at key nodes, and organize it according to standard JSON Schema to support subsequent aggregation and report generation.
8. The collaborative design method as described in claim 1, characterized in that, In S600, the results of each task node are collected upon completion, multi-dimensional fusion and formatted output are performed, and a standardized contract review report is generated. Specific steps include: S601. For result aggregation and consistency processing, ResultAggregatorAgent summarizes the output of all sub-agents, eliminates redundancy and conflicts through semantic merging and standardization correction, and uses JSON-LD format to unify the result representation; S602. Integrate risk assessment and recommendations, calculate comprehensive risk by weighting the probability of risk occurrence and impact, generate optimization recommendations by combining rule base and case base, and attach legal or case law basis to enhance credibility; S603. Generate a structured review report, which includes contract information, review conclusions, clause summaries, and appendices. The review report supports export in PDF / HTML / Markdown formats and has automatic table of contents and intelligent index navigation functions.
9. The collaborative design method as described in claim 1, characterized in that, Also includes: S700. Based on historical review data and user feedback, the system continuously optimizes the agent collaboration strategy and workflow adaptation rules through reinforcement learning algorithms, thereby optimizing the multi-agent adaptive dynamic collaboration method. Specific steps include: S701. Feedback Collection and Reward Modeling: After the review is completed, the system automatically records the user's modification suggestions, adoption status, and corrective path behavior, and transforms them into reward signals to construct reinforcement learning input triples; S702. Reinforcement Learning Strategy Optimization: Employ a pre-defined optimization algorithm to iteratively update the agent scheduling strategy with the goal of maximizing long-term cumulative rewards; S703. System Updates and Strategy Deployment: Once the strategy's stability and profitability meet the targets, it will be automatically deployed online; prompt words, rules, and task graph modules will be updated synchronously to achieve system evolution and form a self-driven closed-loop intelligent agent system.
10. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the collaborative design method as described in any one of claims 1 to 9.