Contract intelligent review system based on multi-agent collaborative tool enhanced orchestration
The intelligent contract review system, enhanced by a hierarchical and progressive architecture and multi-agent collaborative tools, solves the problems of accurate positioning and interpretability in the review of long contracts, and achieves efficient and accurate multi-angle review, meeting the requirements of legal rigor.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JIANGXI TONGRUI INFORMATION TECH CO LTD
- Filing Date
- 2026-02-12
- Publication Date
- 2026-05-01
AI Technical Summary
Existing contract review systems suffer from problems such as difficulty in accurately identifying the basis of fine-grained clauses when handling lengthy contracts, lack of tools to enhance their capabilities, and lack of flexibility and interpretability in the review process, resulting in inefficiency and insufficient risk identification.
The intelligent contract review system adopts a hierarchical and progressive architecture, including a contract processing layer, a chapter positioning layer, a clause positioning layer, and a review and analysis layer. It enhances the arrangement through multi-agent collaborative tools to achieve layer-by-layer positioning at the chapter, clause, and review levels. Combined with a large visual model and OCR technology, it establishes a complete chain of evidence mechanism.
It significantly improves the accuracy of extracting fine-grained risk points in extremely long documents, achieves full traceability of review conclusions and comprehensiveness of multi-angle review, and meets the requirements of legal rigor.
Smart Images

Figure CN121685203B_ABST
Abstract
Description
Intelligent Contract Review System Based on Multi-Agent Collaborative Tools and Enhanced Orchestration Technical Field
[0001] This invention relates to the field of machine genetic algorithms, and in particular to a contract intelligent review system based on multi-agent collaborative tool-enhanced orchestration. Background Technology
[0002] With the rapid development of enterprise management and manufacturing, the workload of contract review has increased dramatically. Large enterprises' legal departments review tens of thousands of contracts annually, with individual contracts reaching tens of thousands of words. Traditional contract review mainly relies on manual review by legal professionals, which suffers from inefficiency, strong subjectivity, and a high risk of errors. Especially in scenarios involving trade secrets and technical parameters, how to efficiently, accurately, and intelligently complete contract reviews to prevent economic losses and legal disputes caused by omissions in clauses and insufficient risk identification is the core problem this invention addresses.
[0003] Therefore, this invention proposes a contract intelligent review system based on multi-agent collaborative tool-enhanced orchestration. It utilizes a visual large language model and a semantic large model to achieve intelligent parsing of contract texts, achieves professional division of labor through a multi-agent collaborative mechanism, empowers AI with the ability to correctly extract knowledge by utilizing tool enhancement technology, and achieves flexible analysis process management by adopting declarative workflow orchestration.
[0004] Currently, the mainstream intelligent contract review solutions mainly fall into the following categories:
[0005] Methods based on rule matching and keyword extraction, such as patent CN202111551351A "Contract Review Method Based on Element Extraction". By combining machine learning algorithms with rule matching technology, knowledge is learned and an element extraction rule model is constructed to extract contract elements. This method is relatively simple to implement, but it has the following limitations: (1) It can only handle standardized contract types. For highly personalized contracts, the extracted key elements are often inaccurate; (2) The review process is fixed and relies on a predefined rule base, lacking the ability to understand the deep semantics and legal relationships of the contract text, and thus unable to identify hidden risks.
[0006] Deep learning model methods based on attention mechanisms, such as patent CN202111152131A "Contract Review Method Based on Artificial Intelligence", use an improved Transformer model to achieve intelligent detection of missing contract clauses. However, this approach has the following shortcomings: (1) It mainly focuses on the single task scenario of missing clause detection and lacks support for multi-dimensional review capabilities such as contract risk analysis and comparative analysis; (2) Model training requires a large number of labeled samples, and the model update and maintenance costs are high.
[0007] An end-to-end review scheme based on a single large language model. The contract is analyzed and reviewed directly using general large language models such as GPT-4 in a one-time or conversational manner. Although general models have strong semantic understanding capabilities, they have significant technical bottlenecks when dealing with long and high-precision contract review tasks: (1) In the case of long documents, the single model is difficult to accurately lock the basis of fine-grained clauses and fabricate false review opinions, which seriously affects the rigor of the law; (2) The lack of tool enhancement and dynamic arrangement makes it impossible to actively call external tools (such as OCR, legal library) for auxiliary reasoning, and the lack of flexible workflow mechanism makes it difficult to cope with complex composite review tasks.
[0008] Based on existing technology analysis, the following technical defects and their causes exist in the field of intelligent contract review:
[0009] System architecture defects
[0010] Traditional rule engine solutions employ a fixed clause matching process, which cannot flexibly address the personalized review needs of different types of contracts. As a closed black box system, a single LLM solution cannot proactively call external tools (such as OCR, legal databases, and similar case databases) for auxiliary reasoning like human experts, and lacks tool enhancement capabilities; the review process lacks hierarchical orchestration, with all tasks relying on the model to complete all at once, making it difficult to implement complex phased review logic.
[0011] Failure of Evidence Location and the Problem of "Hallucination"
[0012] When dealing with lengthy contracts (tens of thousands of words), solutions based on a single large language model face a serious "Lost in the Middle" phenomenon. The model struggles to accurately pinpoint the basis of fine-grained clauses and is highly susceptible to fabricating false review opinions due to contextual window limitations.
[0013] Technical limitations
[0014] Existing systems generally lack interpretability, review conclusions cannot be traced back to the specific location in the original text, users cannot verify the accuracy of AI judgments, and it is difficult to meet the requirements of legal rigor.
[0015] Based on the existing technologies mentioned above, it is clear that the contract review field has long suffered from a technological path dependency of "keyword matching + rule engine." Furthermore, the "end-to-end black-box model" approach, which emerged before multi-agent systems as a new technology, cannot link the analysis results of large models with the original documents to form traceable evidence. The main reasons are:
[0016] Semantic understanding models struggle to pinpoint precise locations: While general-purpose large language models possess powerful semantic understanding capabilities, they lack a hierarchical and progressive positioning mechanism in scenarios involving extremely long documents. They cannot achieve precise positioning by narrowing down the scope layer by layer, such as through "chapter → clause → review," as human experts do.
[0017] Lack of tool enhancement mechanisms: Existing agent systems only use LLM as an inference engine and fail to equip it with a dedicated evidence localization toolset, resulting in a lack of external knowledge access capabilities during the review process; Summary of the Invention
[0018] In view of the above situation, the main objective of this invention is to propose a contract intelligent review system based on multi-agent collaborative tools to enhance orchestration. By adopting a three-level progressive positioning strategy of "chapter level → clause level → review level", it simultaneously realizes the function of traceable evidence, thereby solving the above-mentioned technical problems.
[0019] This invention proposes a contract intelligent review system based on multi-agent collaborative tools to enhance orchestration. The system includes a contract processing layer, a chapter positioning layer, a clause positioning layer, and a review analysis layer with a hierarchical and progressive architecture.
[0020] The contract processing layer is used for:
[0021] Parse the given contract document and extract text and visual layout information to obtain a structured document;
[0022] Chapter positioning layer, used for:
[0023] Set chapter retrieval strategies based on the semantic information, document structure, and contract type of the contract documents;
[0024] Based on the chapter retrieval strategy, a large language model is used to perform parallel preliminary retrieval and identification of structured documents. Then, the union of the preliminary retrieval and identification results is taken to obtain the chapter set and the complete evidence chain.
[0025] Terms positioning layer, used for:
[0026] Based on the complete chain of evidence, the chapter set is decomposed into tasks to generate a structured task list;
[0027] Based on the structured task list, the layout of the corresponding chapters is analyzed using a large visual model to locate the clauses and their corresponding key elements. Visual analysis and structured integration are then performed to obtain the structured clauses and visual evidence chain.
[0028] The review and analysis layer, comprising a review management agent and several contract review agents, is used for:
[0029] The review stance is set according to the contract subject, and several mutually exclusive review perspectives are generated using the review management agent based on the review stance and structured documents.
[0030] Assign a contract review agent to each review perspective, and review the structured clauses in parallel. Each contract review agent outputs at least one review opinion, resulting in a multi-perspective review opinion set.
[0031] The multi-angle review opinion set is integrated and deduplicated from both semantic and vector directions to obtain the final review report. Based on the final review report, visualized labeled data is generated and interactive navigation is performed.
[0032] This system employs a layered, progressive review architecture, breaking down the complex task of contract review into three progressively deeper positioning stages. Each stage is led by a specialized intelligent agent, which works in concert and utilizes tools to create a multi-agent system. The contract processing layer is responsible for visual preprocessing of the contract for initial data extraction. The first layer is the chapter positioning layer, responsible for quickly identifying all chapters requiring focused review within the entire contract document, equivalent to the "preliminary browsing and highlighting key points" stage in manual review. The second layer is the clause positioning layer, responsible for precisely locating specific clause paragraphs and their key elements within the identified chapters, equivalent to the "detailed reading and extraction of key information" stage. The third layer is the review analysis layer, responsible for conducting in-depth multi-perspective analysis of the positioned clauses and generating review opinions, equivalent to the "professional judgment and conclusion" stage. The advantage of this layered architecture lies in its progressive filtering and focusing, avoiding the distraction caused by a single model handling too many tasks simultaneously, significantly improving the comprehensiveness and accuracy of the review.
[0033] At each level of the localization process, the system establishes a complete chain of evidence. Starting with chapter identification, the system meticulously records information such as the page range, title coordinates, and identification basis for each identification result. During clause localization, it further records precise location information such as clause number, bounding box coordinates, line number range, and character offset. Finally, in the review and analysis phase, each review comment is accompanied by a complete chain of evidence, including the original text citation and its coordinates, the problem location, and the insertion location of suggested modifications. This layered evidence system ensures the complete traceability of review conclusions.
[0034] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0035] 1. The advantages of accuracy and anti-interference brought by the layered and progressive evidence localization architecture:
[0036] To address the "Lost in the Middle" phenomenon and the forgetting problem caused by context window limitations in existing single-language models when processing long contracts of tens of thousands of words, this invention designs a three-layer progressive localization strategy: "Chapter-level → Clause-level → Review-level". First, the PageNavigator agent filters and identifies key chapters (narrowing the scope) using seed angles and rules. Then, the ClauseLocalizer agent, combined with visual layout, precisely locates specific clauses (locking in the target). Finally, the review agent performs in-depth analysis. This funnel-shaped processing mechanism, from coarse to fine, effectively filters out interference from irrelevant text, avoids model distraction due to excessive input length, significantly improves the accuracy of extracting fine-grained risk points in ultra-long documents, and solves the problems of "not finding" or "not finding all" in traditional long document reviews.
[0037] 2. The "human-like" expert reasoning advantages brought about by multi-agent collaboration and tool enhancement:
[0038] To address the shortcomings of traditional end-to-end models, which are essentially "closed black boxes" unable to actively acquire external knowledge or verify facts, this invention employs a multi-agent collaborative architecture, equipping each agent with a dedicated toolset (such as MinerU layout detection, PaddleOCR text extraction, a risk pattern vector library, and coordinate calculation tools). The agents are no longer simply text generators, but can proactively invoke tools to "look" at document layouts, "check" risk databases, and "calculate" coordinate positions, much like human experts. This tool enhancement mechanism endows the system with the ability to actively reason and verify, enabling the review process to move beyond probabilistic guesses within the model and rely on reliable data obtained from external tools. This effectively solves the limitations of traditional solutions, which lack logical support and cannot handle complex layouts (such as multi-page tables).
[0039] 3. Advantages of deep parsing based on "visual-semantic" dual-modal fusion:
[0040] Traditional technologies, often based on plain text stream processing, easily lose crucial layout information in contracts, such as table structures, seal locations, and paragraph hierarchies. This invention introduces a large visual model (Qwen-VL, etc.) at the clause positioning layer, combined with OCR technology, treating the document as a composite of "image + text." Through a planning-execution-aggregation model, the system can identify the physical bounding boxes and logical hierarchies of page elements.
[0041] 4. Advantage of rigorous evidence tracing across the entire chain:
[0042] To address the "illusion" problem (fabricated clauses, fabricated risks) prevalent in generative AI, this invention establishes a mandatory chain of evidence mechanism. From the title coordinates of chapter identification to the line number range of clause location, and the mandatory original text citations required when generating review comments, all outputs are accompanied by precise visual coordinates and comparisons with the original text. This invention ensures that every review comment can be found in the exact location of the original document (accurate to the line number and coordinates), achieving complete interpretability and traceability of review conclusions.
[0043] 5. By improving the above-mentioned system and developing tools, this invention ultimately realizes a tool-enhanced multi-agent collaborative mechanism. The multi-agent mechanism rationally arranges tasks to call large models to process specific tasks, and equips each agent with a dedicated toolset. Through tool enhancement, the agents are no longer closed black-box reasoning, but expert systems with the ability to actively call external knowledge and locate information. This effectively solves the fundamental defect of traditional solutions "lacking tool calls". Ultimately, it realizes an interpretability guarantee mechanism, attaching a complete evidence location chain to all review conclusions and storing page and line number coordinates to meet the rigorous requirements of legal review.
[0044] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by means of embodiments of the invention. Attached Figure Description
[0045] Figure 1 is an overall architecture diagram of the intelligent contract review system based on multi-agent collaborative tools and enhanced orchestration proposed in this invention;
[0046] Figure 2 is a diagram of the chapter positioning layer;
[0047] Figure 3 is a diagram of the clause positioning layer;
[0048] Figure 4 is the architecture diagram of this review and analysis layer. Detailed Implementation
[0049] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0050] These and other aspects of the embodiments of the present invention will become clear from the following description and accompanying drawings. In these descriptions and drawings, some specific embodiments of the present invention are specifically disclosed to illustrate some ways of implementing the principles of the embodiments of the present invention; however, it should be understood that the scope of the embodiments of the present invention is not limited thereto.
[0051] Please refer to Figure 1. This embodiment provides a contract intelligent review system based on multi-agent collaborative tools to enhance orchestration. The system includes a contract processing layer, a chapter positioning layer, a clause positioning layer, and a review analysis layer with a hierarchical and progressive architecture.
[0052] The contract processing layer is used for:
[0053] Parse the given contract document and extract text and visual layout information to obtain a structured document;
[0054] As a preferred embodiment, parsing a given contract document and extracting text and visual layout information to obtain a structured document specifically includes the following steps:
[0055] Parse the given contract document and convert it into page images, resulting in an array of page images;
[0056] Using OCR tools, text recognition is performed on each page image in the page image array to extract the text and the corresponding rectangular region, and text blocks and text block coordinate information are generated;
[0057] Based on the text block coordinate information, the text blocks of all page images are concatenated in the reading order to generate a complete plain text contract;
[0058] Establish a complete mapping relationship between plain text contracts and text block coordinate information to obtain structured documents.
[0059] Chapter positioning layer, used for:
[0060] Set chapter retrieval strategies based on the semantic information, document structure, and contract type of the contract documents;
[0061] Based on the chapter retrieval strategy, a large language model is used to perform parallel preliminary retrieval and identification of structured documents. Then, the union of the preliminary retrieval and identification results is taken to obtain the chapter set and the complete evidence chain.
[0062] As shown in Figure 2, in this embodiment, the chapter location layer is led by a chapter location agent, whose core task is to quickly filter out all chapters in the contract that require focused review. This layer strictly follows a three-stage architecture pattern of planning-execution-aggregation, ensuring that no potentially risky chapters are overlooked by planning a multi-mode parallel retrieval strategy within a single stage, executing multiple retrieval tasks in parallel, aggregating results, and recording evidence.
[0063] Planning Phase (Constructing Prompts for the Execution Phase using OCR-recognized data and knowledge base content): In the planning phase, the system first utilizes a large model and knowledge base to plan a collaborative strategy for three parallel retrieval modes. The first is a seed angle generation strategy, which uses a risk pattern vector library and sliding window technology to segment the contract document into overlapping paragraphs and identifies patterns with similarity exceeding a threshold (e.g., 0.82) as seed angles. The second is a structured rule verification strategy, which uses a rule library for verifying necessary clauses to check whether the contract contains the corresponding chapters. The third is a contract type matching strategy, where the system uses regular expressions to detect keywords in the contract text (such as "purchase," "sales," "technical services," "leasing," "confidentiality," etc.) to determine the contract type (sales / purchase, technical services, leasing, NDA, etc.) and loads retrieval rules associated with the contract type from the type-based retrieval strategy library. After understanding these three strategies, the large model prompts needed for the next stage are assembled in this phase.
[0064] Execution Phase (Overall Scanning of Contract Documents Based on OCR Recognition Data using Strategy and Prompts): The system executes three retrieval tasks in parallel. Branch A, Vector Semantic Matching, also uses sliding window merging and seed angle prompts from the previous phase to scan the contract document in segments. Based on a set threshold, the chapter containing the segment is identified as a potential risk chapter. Branch B, Structured Rule Verification, executes the process. If a keyword for a necessary clause identified in the previous phase is not detected, the large model marks that clause type as "missing" and records it as an angle requiring review based on the specific contract context, along with key information. Branch C, Contract Type Matching, executes the process. Based on the contract type identified in the planning phase, the system applies corresponding type-specific retrieval rules. These rules, obtained from the planning phase, include specific clause detection, such as packaging and transportation clauses, risk transfer clauses, and quality acceptance clauses in sales / purchase contracts. These rules become part of the dynamic injection of prompts into the large model, such as "For technical service contracts, you need to pay special attention to the existence and completeness of the following clauses: Service Level Agreement (SLA) clauses, intellectual property ownership clauses, etc.", and mainly serve as the aggregation strategy and evidence identification basis for the next phase. Simultaneously, the system executes a multiple sampling mechanism. The complete process of the three retrieval tasks described above will be executed independently 3-5 times, with each execution potentially producing slightly different results due to the randomness of the model. The system will record the list of chapters identified in each execution, along with the seed angles and evidence identification criteria for each chapter, and will merge them according to the strategy during the aggregation phase. These seed angles will be used as input prompts for the review management agent to plan review angles during the planning phase of the third review analysis layer, generating the final list of review angles. Therefore, the list will be consistent with the review angle format and include content for review analysis, specifically including the seed angle name, explanation, clause type, question type, matching risk pattern, and similarity score.
[0065] The aggregation phase (aggregating results and establishing evidence chains based on the output of the previous phase): First, the system merges the chapter recognition results from the three parallel branches (vector semantic matching, structured rule verification, and contract type matching) to facilitate subsequent steps. Then, the system performs perspective deduplication and verification, checking whether the review perspective and evidence recognition basis are included in the results. Next, it normalizes the chapter titles (similarity exceeding 0.92 is considered duplicates). Finally, for similar chapters, it retains the version with more sufficient identification evidence and higher confidence. After deduplication, the system generates a complete chain of evidence. For each identified chapter, the system records: (1) Page range [start page, end page]: the page range of the chapter in the contract document; (2) Title position coordinates [x1, y1, x2, y2]: the visual coordinates of the chapter title on the page, obtained through the OCR coordinate mapping table; (3) Identification basis: indicating which retrieval mode the chapter was identified through (vector matching, structured verification, type matching or a combination thereof). If it is vector matching, the similarity score is also recorded; (4) Confidence score: comprehensively assessing the confidence of the chapter that needs to be reviewed, such as vector similarity, keyword hits, etc.
[0066] After the three phases are completed, the chapters and their associated chains of evidence for the chapter-level review will be collected and used for the clause-level review.
[0067] As a preferred embodiment, setting a chapter retrieval strategy based on the semantic information, document structure, and contract type of the contract document specifically includes the following steps:
[0068] The sliding window technique is used to divide a structured document into multiple overlapping paragraph segments of text.
[0069] An embedding model is used to convert multiple overlapping paragraph segments into corresponding vector representations; (e.g., a window size of 512 characters and an overlap of 128 characters).
[0070] Given a risk pattern vector library containing common contract risk patterns, calculate the cosine similarity between each text fragment vector and each risk pattern vector in the risk pattern vector library to obtain a similarity score; (the library stores at least 23 common contract risk patterns (including "payment out of control", "acceptance failure", etc.)).
[0071] A first similarity threshold is preset. The similarity scores of all risk patterns are compared with the first similarity threshold. If the scores exceed the first similarity threshold, the current risk pattern is identified as a seed angle, and a set of seed angles is obtained.
[0072] Given a verification rule base, which predefines common contract clause types, the structured document is matched with each clause type in the verification rule base using keyword matching.
[0073] If no clause type is detected in the full text of the contract, the current clause type is determined to be "missing" and a corresponding missing record is generated. All identified missing clauses constitute a missing clause set.
[0074] Given a contract type matching rule base, perform keyword matching on the structured document to obtain the keyword matching results. (For example, keywords "purchase" and "order" may be associated with "purchase contract"; keywords "sales" and "sold" may be associated with "sales contract"; keywords "technical service" and "development" may be associated with "technical service contract"; keywords "lease" and "rent" may be associated with "lease contract"; keywords "confidentiality" and "confidentiality" may be associated with "non-disclosure agreement (NDA)"). Based on the keyword matching results, determine the contract type and obtain the contract type.
[0075] Based on the contract type, load the retrieval rules associated with the contract type from the typological retrieval strategy library to obtain contract association rules; (for example, for procurement contracts, special attention may be paid to "payment terms" and "delivery standards"; for technical service contracts, special attention may be paid to "ownership of intellectual property rights" and "acceptance standards")
[0076] The task is to require a large language model to conduct a chapter-level review of contracts, identifying chapters with potential risks as the primary instruction. Structured documents serve as contextual information, and three retrieval modes—seed perspective set, missing clause set, contract type, and contract association rules—are used for execution and interpretation, resulting in corresponding keyword templates. (Mode 1 (seed perspective based): The large language model is required to refer to the seed perspective set and find chapters in the contract related to these risk descriptions. Mode 2 (structured rules based): The large language model is required to refer to the missing clause set and check if there are chapters in the contract to which the missing clauses might belong, or analyze the completeness of the relevant chapter content. Mode 3 (contract type based): The large language model is required to apply specific rules related to the contract type, focusing on the most relevant typical chapters for the current type of contract.)
[0077] The seed perspective set, missing clause set, contract type, and contract association rules are filled into the prompt word template of the corresponding search mode to obtain the chapter search strategy.
[0078] As a preferred embodiment, the parallel preliminary retrieval and identification of structured documents using a large language model, based on a chapter retrieval strategy, specifically includes the following steps:
[0079] Set up three parallel search branches, namely branch A, branch B and branch C;
[0080] Input the chapter retrieval strategy and text fragments of multiple overlapping paragraph segments into branch A. The large language model is required to identify relevant chapters in the text fragments of multiple overlapping paragraph segments based on the seed perspective set, and obtain a list of potentially risky chapters. The list of potentially risky chapters records the chapter title: the chapter title text identified by the model; semantic matching risk identifier: the specific risk pattern associated with the seed perspective set; evidence identification basis: explicitly labeled as "vector semantic matching", and optionally recording the main keywords or semantic fragments that trigger the identification; confidence score: optional, which can record the confidence score or similarity score built into the model output.
[0081] Input the chapter retrieval strategy and text fragments of multiple overlapping paragraphs into branch B. The large language model is required to refer to the set of missing clauses to check whether there are chapters to which the missing clauses belong in the contract, or to analyze whether the content of the relevant chapters is complete, and obtain a list of missing chapters. The list of missing chapters records the chapter titles: the chapter title text identified by the model; structural missing identifiers: formatted as "[Missing] + [Missing Clause Type]", such as "[Missing] Breach of Contract Liability"; evidence identification basis: clearly marked as "structured rule verification"; key information: record the key contextual information related to the current missing risk obtained by the model analysis (for example, the model believes that "although there is no independent breach of contract liability chapter, it is mentioned sporadically in the 'Bilateral Liability' clause, and the agreement is unclear").
[0082] Input the chapter retrieval strategy and text fragments of multiple overlapping paragraph segments into branch C. The large language model is required to focus on the typical chapters most relevant to the type of contract based on the specific rules associated with it, and obtain a list of typical chapters. The list of typical chapters records the chapter titles: the chapter title text identified by the model; typified risk identifiers: risk angles defined by specific rules associated with the contract type (e.g., for a procurement contract, it may be "payment term ambiguity risk"); evidence identification basis: clearly marked as "contract type matching: [contract type]";
[0083] The sampling results for this round are obtained by taking the union of the list of potentially risky chapters, the list of missing chapters, and the list of typical chapters.
[0084] After N samplings are completed, preliminary retrieval and identification results are obtained.
[0085] As a preferred embodiment, the process of taking the union of the preliminary search and identification results to obtain the chapter set and the complete chain of evidence includes the following steps:
[0086] All chapter entries in the initial search and identification results are merged into a single initial candidate chapter list to obtain a list of chapter titles;
[0087] The chapter title list is vectorized using the Embedding model to obtain the chapter title vector representation;
[0088] Calculate the cosine similarity between the vector representations of all chapter titles to form a similarity matrix;
[0089] A second similarity threshold is preset. All chapter titles are clustered based on the second similarity threshold and the similarity matrix to form groups. Each group is represented by a standardized chapter title to obtain similar chapter groups.
[0090] For similar chapter groups, the completeness of evidence identification criteria, confidence level comparison, and sampling frequency comparison are performed sequentially to select an optimal entry from the similar chapter groups. Based on the optimal entry, evidence fusion is performed to obtain a chapter set and a complete evidence chain. The chapter evidence chain contains the following complete fields: standardized chapter title, page number range, title position coordinates, evidence identification criteria, confidence score, and chapter risk identifier. The chapter risk identifier consists of semantic matching risk identifier, structural missing identifier, and typological risk identifier.
[0091] In this embodiment, the evidence identification is based on a completeness assessment, specifically as follows:
[0092] The system examines the evidence identification criteria fields for each entry in each chapter within the group. The evaluation rules are prioritized as follows:
[0093] Combinations of multiple bases such as "vector semantic matching + structured rule verification" or "vector semantic matching + contract type matching" > single "vector semantic matching" > single "structured rule verification" ≈ single "contract type matching".
[0094] For the same basis, entries with specific similarity scores or key information descriptions > entries that only specify the basis type.
[0095] In this embodiment, the confidence level comparison is specifically as follows:
[0096] For multiple entries with comparable evidence completeness, compare their confidence scores and retain the entry with the highest score.
[0097] In this embodiment, the sampling frequency comparison is specifically as follows:
[0098] For entries with equal or no confidence, calculate the frequency of occurrence of the chapter represented by each entry in N samples, and retain the entry with the highest frequency to obtain the optimal entry.
[0099] In this embodiment, evidence fusion is performed based on the optimal entries to obtain a set of chapters and a complete chain of evidence, specifically as follows:
[0100] Update the chapter title of the best entry to a standardized chapter title; for the chapter risk identification and evidence identification basis fields, integrate relevant information from all winning entries in the current group. For example, the basis can be updated to "vector semantic matching and contract type matching", and descriptions from multiple perspectives can be merged;
[0101] The confidence score is the highest or average value among the winning entries;
[0102] Retain all other key information recorded in the current winning entry to obtain the group representative entry;
[0103] Combine the chapter title information in the group representative entries with the text block coordinate information to query and determine the visual coordinates and page number range of the current chapter title in the structured document;
[0104] Generate a chapter evidence chain for each chapter corresponding to a standardized chapter title.
[0105] Terms positioning layer, used for:
[0106] Based on the complete chain of evidence, the chapter set is decomposed into tasks to generate a structured task list;
[0107] Based on the structured task list, the layout of the corresponding chapters is analyzed using a large visual model to locate the clauses and their corresponding key elements. Visual analysis and structured integration are then performed to obtain the structured clauses and visual evidence chain.
[0108] As shown in Figure 3, in this embodiment, the clause localization layer is led by the clause localization agent and is the core application layer of the visual big data model. It receives the set of chapters output by the first layer as input. Its core task is to locate the corresponding chapters based on the complete chain of evidence, and further pinpoint the specific clause paragraphs within these chapters, extracting the key elements in the clauses. Unlike the coarse-grained filtering of chapter localization, clause localization requires understanding the fine structure of the contract document, including the clause numbering system, hierarchical relationships, and the position of special elements such as tables and charts. This layer fully utilizes the document layout understanding capability of the visual big data model, adopting a three-stage implementation paradigm of planning-execution-aggregation to achieve fine-grained localization from chapters to clauses and the organization of multi-scale visual input.
[0109] Planning Phase (Content Reprocessing and Task Decomposition Based on Chapters and Data Sets): In the planning phase, the system plans how to utilize the capabilities of the large visual model to achieve precise location and structured parsing of clauses. First, chapter data analysis and task decomposition involve detailed layout detection and clause parsing planning for each chapter. Second, strategies are determined by distinguishing between page spans, and the large language model is used to understand and identify the criteria, assigning different processing priorities to different chapters, prioritizing high-risk chapters to ensure critical issues are not delayed. Third, visual tools are invoked again to organize the MinerU tool for layout detection of chapter pages, confirming the expected inclusion of tables, charts, or other elements, and preparing strategies for extracting these elements individually. Finally, the output organization and execution phase task list is generated, integrating the above planning into a structured task list while maintaining the entire chapter image and OCR information, paragraph-level clause images and OCR information, and MinerU-planned area and chart information as a multi-scale input strategy. Each task includes: target page number, clause number recognition rules, MinerU and other visual tool calling parameters, and multi-scale input preparation strategies.
[0110] Execution Phase (Scanning Chapter-Level Content Based on a Structured Task List): The system strictly follows the task list generated during the planning phase, executing visual analysis and clause location tasks one by one, translating the strategies from the planning phase into actual tool calls and data processing. First, it performs page-by-page visual large-scale model layout detection. Based on the elements indicated in the task list, it performs deep layout analysis on the image to identify the types of different elements on the page (Text Blocks, Headings, Tables, Figures, Signature Areas, etc.), outputting precise bounding box coordinates [x1, y1, x2, y2] for each element, and also identifying the specific element content. Second, it performs clause-level analysis based on the layout results. Based on the output element information and the clause numbering recognition rules designed during the planning phase, it identifies whether each text block is a clause, while also marking key elements. Finally, it organizes the content by cropping the image according to the coordinates, for use in organizing multi-scale visual input for the analysis phase. The output results include: a complete page image, cropped clause area images, extracted table / figure images, and OCR text.
[0111] The aggregation phase (structural integration based on the output of the previous phase): The system structurally integrates the visual understanding results generated in the execution phase, producing structured clauses and a complete visual evidence chain. By integrating the clause hierarchy tree and parent-child relationship mapping, the output of the execution phase is organized into complete metadata: unique clause identifier, hierarchy depth, parent clause reference, list of child clauses, clause text content, and visual location information. This metadata is also stored as a clause-level precise evidence chain. Finally, the system completes the encapsulation of multi-scale visual input.
[0112] As a preferred embodiment, according to the complete evidence chain, the task of the chapter set is decomposed to generate a structured task list, which specifically includes the following steps:
[0113] Determine the page number range to be processed according to the complete evidence chain;
[0114] Use the MinerU tool to perform a preliminary layout detection on all page images within the page number range to be processed, identify the macro region types in the pages, and obtain the preliminary layout detection results; including: text regions, table regions, chart regions, signature / seal regions, etc., and output the corresponding bounding box coordinates for each region;
[0115] Based on the preliminary layout inspection results, by analyzing the continuous text regions and the corresponding bounding box coordinate relationships, predict the possible paragraph divisions within the chapter to obtain the clause structure estimation information;
[0116] Given a clause number pattern rule library, which contains regular expression patterns sorted by priority or typicality; for example:
[0117] Pattern A (chapter level): r"Article [one, two, three, four, five, six, seven, eight, nine, ten, hundred, zero]+" (matches "Article 1", "Article 12")
[0118] Pattern B (sub-clause level): r"^[0-9]+\.[0-9]+\s" (matches "1.1 ", "2.15 " at the beginning of the line)
[0119] Pattern C (numeric item): r"^\([0-9]+\)" (matches "(1)", "(2)" at the beginning of the line)
[0120] Pattern D (alphabetic item): r"^\([a-zA-Z]\)" (matches "(a)", "(B)" at the beginning of the line)
[0121] Pattern E (Chinese numeric item): r"^([one, two, three, four, five, six, seven, eight, nine, ten]+)" (matches "(一)", "(三)" at the beginning of the line).
[0122] According to the clause structure estimation information and the context information of the current chapter, select a regular expression pattern from the clause number pattern rule library to obtain the clause number recognition rule;
[0123] Analyze whether the chapter in the page number range to be processed spans pages to determine the task strategy; if the chapter does not span pages, the task strategy takes the current chapter as a whole processing task; if the chapter spans pages, the task strategy divides it into multiple subtasks according to the number of pages it spans, and each subtask is responsible for processing the content of the current chapter within a specific single page;
[0124] Based on the chapter risk identifier and confidence score in the current final chapter evidence chain, a processing priority is generated for each task strategy, resulting in a priority list.
[0125] The initial layout detection results are used to identify complex elements, and corresponding extraction and parsing strategies are set according to the type of complex elements. If the complex element is a table, the extraction and parsing strategy is to call MinerU to perform fine table structure recognition, determine rows and columns, and associate the table cell content with the structured document. If the complex element is a chart, the extraction and parsing strategy is to treat the chart as an independent image element, perform high-precision cropping, and prepare it for subsequent specialized analysis by the visual big data model.
[0126] The clause number identification rules, preliminary layout detection results, priority list, and extraction and parsing strategies are combined and encapsulated to obtain a structured task list.
[0127] The review and analysis layer, comprising a review management agent and several contract review agents, is used for:
[0128] The review stance is set according to the contract subject, and several mutually exclusive review perspectives are generated using the review management agent based on the review stance and structured documents.
[0129] Assign a contract review agent to each review perspective, and review the structured clauses in parallel. Each contract review agent outputs at least one review opinion, resulting in a multi-perspective review opinion set.
[0130] The multi-angle review opinion set is integrated and deduplicated from both semantic and vector directions to obtain the final review report. Based on the final review report, visualized labeled data is generated and interactive navigation is performed.
[0131] As shown in Figure 4, in this embodiment, the review and analysis layer is the core intelligent decision-making part of the system. It adopts a multi-intelligent agent collaborative working mode and generates a high-quality review report through three stages: planning, execution, and aggregation. This layer makes full use of the structured clause data and multi-scale visual input provided by the second layer, combined with the semantic understanding ability of the large language model and the deduplication ability of vector clustering, to achieve a comprehensive, accurate, and traceable review of contract clauses.
[0132] Planning Phase (Planning Review Angles Based on Text): The system is responsible for planning review angles and task decomposition strategies by the review management agent. The review management agent is a specially trained review planning expert. Its input includes the full text of the contract, the seed angles generated in the first layer, and the review position (such as the name of the main company). After interaction with the organized prompt words and the large language model, the output is a list of review angles. Each review angle includes: review angle name, explanation, clause type, problem type, matching risk pattern, and similarity score. The system requires the review management agent to output at least 8-10 review angles, and these angles must be mutually exclusive and non-overlapping, covering three types of problems: institutional deficiencies, legal risks, and business risks. In order to improve the quality of angles, the system also verifies and deduplicates the output of the review management agent: (1) verifying whether each angle contains complete necessary fields; (2) using a text similarity algorithm to detect duplicates between angles. Angles with a similarity of more than 0.92 will be merged; (3) further merging semantically similar angles based on vector similarity. The threshold is configurable (such as 0.86). Finally, these review angles are assigned to multi-scale visual inputs, added to the input content, and prepared for the parallel strategy of the execution phase.
[0133] Execution phase (parallel review with multi-scale visual input): The system creates multiple contract review agents to assign large visual models for task processing. Each agent is responsible for in-depth analysis of a review perspective. All agents work in parallel to improve efficiency. The workflow of each contract review agent is as follows: (1) Receive input: The contract review agent receives the full text of the contract, the current review perspective information, and the structured clauses and multi-scale visual input provided by the second layer; (2) Understand the task: Based on the explanation of the review perspective, the contract review agent understands which aspect of the problem the current task is to analyze; (3) Multimodal analysis: The contract review agent reads the contract text, views the page images and cropped images of the relevant clauses, and refers to key elements (such as time, amount, obligations, etc.) to comprehensively judge whether the problem corresponding to the perspective actually exists; (4) Force original text citation. The system mandates that the contract review agent must include a complete chain of evidence when generating review opinions: problem description (clearly explaining the specific problems with the clause), original clause text (precisely quoting the corresponding clause content in the original contract text, indicating the clause number and quoting the original text; if there is no relevant clause in the original text, this field value is "none"), modification plan (proposing modification direction, avoiding specific values / times), and modification result (the modified clause content, maintaining a consistent style with the original text). The contract review agent cannot speculate on problems out of thin air; it must have specific original text evidence. (5) The system calls the coordinate consistency tool to record precise visual coordinates for each clause. When the contract review agent quotes the original text, the system will automatically associate the coordinate information of the original text. (6) Generate review opinions: The contract review agent outputs one or more review opinions, each opinion containing four fields: {problem description, original clause text, modification plan, modification result}.
[0134] The aggregation phase (dual-path intelligent integration based on the output of the previous phase): Multiple contract review agents may generate different candidate review opinions for the same clause or the same issue, or even give different risk assessments or modification suggestions for the same issue. The system adopts a dual-path integration strategy: one path uses LLM for semantic integration, and the other path uses an embedding model for vector clustering. Then, the results of the two paths are merged and finally deduplicated. Integration path 1: LLM semantic integration, the input of which is the list of review opinions generated by all contract review agents, identifying duplicate opinions, merging similar opinions, resolving conflicts, or removing duplicates. Integration path 2: Embedding vector clustering, the system uses the EmbeddingIntegrator tool to perform vector similarity-based clustering integration. This is a deterministic and efficient integration method. First, the opinion list is flattened, then the opinions are distinguished and clustered, and then merged within the clusters. The outputs of the two paths are unified into the original review opinion format and the content is merged. Finally, the review opinions and the corresponding clause inputs are associated to form evidence verification results. The system merges the list of review opinions and the list of evidence verification results to form the final review report.
[0135] As a preferred embodiment, the process of setting review positions based on the contract parties and generating several mutually exclusive review perspectives using a review management agent based on these review positions and structured documents specifically includes the following steps:
[0136] The review stance is set according to the contract parties;
[0137] The role is defined as a contract review planning expert; the task objective is to generate a list of review angles based on the contract content, seed angles, and review perspective; the output format is clearly defined as each review angle must include the review angle name, explanation, clause type, and question type; the quality requirement is to output at least 8-10 review angles, which must be mutually exclusive, non-overlapping, and collectively cover the above three types of questions, resulting in a review prompt word template.
[0138] The structured document, seed perspective set, and reviewer's stance are used as the basis for analysis, and are assembled with the review prompt word template to obtain the review prompt words;
[0139] Input the review prompts into the large language model to generate a structured initial review perspective list;
[0140] Calculate the text similarity of all review angle names in the structured initial review angle list;
[0141] A preset text similarity threshold is set, and the text similarity threshold is compared with the text similarity of all structured initial review angles. Review angles with text similarity exceeding the text similarity threshold are merged into one review angle to obtain the first angle list.
[0142] The names and explanations of the review angles are concatenated and converted into vector representations using the Embedding model to obtain angle vectors.
[0143] A semantic similarity threshold is preset, the cosine similarity between all angle vectors is calculated, and the semantic similarity threshold is compared with the cosine similarity between all angle vectors. The angle pairs that exceed the semantic similarity threshold are merged into one review angle to obtain the second angle list.
[0144] The first and second perspective lists together form the final review perspective list.
[0145] In a preferred embodiment, a contract review agent is assigned to each review perspective to review the structured clauses in parallel. Each contract review agent outputs at least one review opinion, resulting in a multi-perspective review opinion set. The specific steps include the following:
[0146] Create an independent contract review agent for each review angle in the final review angle list;
[0147] The role of the contract review agent is defined as a contract review expert focused on analyzing specified review angles; the agent is instructed to comprehensively read the full text of the contract, examine images in multi-scale visual input data packets to understand the context and layout, and refer to key elements in structured clause data as a second task instruction; the output must be a structured JSON object, and each object must strictly contain a problem description, original clause references, modification suggestions, and modification results as the output format specification, and all conclusions must be supported by original texts, resulting in contract review prompts;
[0148] The contract review prompts are assembled with the visual evidence chain and input into the corresponding contract review agent to obtain one or more structured review opinions from each review perspective, forming a multi-perspective review opinion set.
[0149] As a preferred embodiment, the integration and deduplication of the multi-angle review opinion set from both semantic and vector directions to obtain the final review report specifically includes the following steps:
[0150] The third task instruction is to identify duplicate opinions, merge similar opinions, resolve conflicts, and remove invalid opinions. The third task instruction is combined with the multi-angle review opinion set and input into the LLM large language model to obtain a semantically integrated opinion list.
[0151] The problem description and the original text of the clause for each review comment in the multi-angle review comments are concatenated and input into the Embedding model to be converted into the corresponding vector representation, thus obtaining the opinion vector representation;
[0152] Clustering is performed based on the cosine similarity of all opinion vector representations to obtain several opinion clusters;
[0153] The opinion with the most complete, accurate and confident description of the problem is selected from the opinion clusters as the representative opinion of the cluster, and a list of clustering results is obtained;
[0154] The semantic integration opinion list and the clustering result list are merged, and the union is taken to form the merged opinion list;
[0155] The merged opinion list is then subjected to a deduplication operation based on the embedding vector to obtain the final refined opinion list.
[0156] The final refined list of comments is precisely linked to the original visual coordinates and clause numbers corresponding to the multi-angle review comments to obtain the final review report.
[0157] It should be understood that although the steps in the flowcharts of the various embodiments of the present invention are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the various embodiments may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.
[0158] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0159] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0160] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
Claims
1. A contract intelligent review system based on multi-agent collaborative tools and enhanced orchestration, characterized in that, The system comprises a layered, progressive architecture: a contract processing layer, a chapter location layer, a clause location layer, and a review and analysis layer. The contract processing layer parses a given contract document and extracts textual and visual layout information to obtain a structured document. The chapter location layer sets a chapter retrieval strategy based on the semantic information, document structure, and contract type of the contract document. Based on the chapter retrieval strategy, a large language model is used to perform parallel preliminary retrieval and identification of the structured document. The union of the preliminary retrieval and identification results yields a set of chapters and a complete chain of evidence. The chapter evidence chain includes the following complete fields: standardized chapter title, page number range, title position coordinates, evidence identification basis, confidence score, and chapter risk identifier. The clause location layer is used to: decompose the chapter set into tasks based on a complete chain of evidence, generating a structured task list. Specifically, this includes: determining the page range to be processed based on the complete chain of evidence; using the MinerU tool to perform preliminary layout detection on all page images within the page range to be processed, identifying the types of macro-regions on the pages, and obtaining preliminary layout detection results; based on the preliminary layout detection results, analyzing the coordinate relationships of continuous text regions and their corresponding bounding boxes to predict possible paragraph divisions within the chapters, obtaining clause structure estimation information; and providing a clause numbering pattern rule base, which contains regular expression patterns sorted by priority or typicality. Based on the estimated information of the clause structure and the context information of the current chapter, a regular expression pattern is selected from the clause numbering pattern rule base to obtain the clause numbering identification rule; the chapters in the page range to be processed are analyzed to determine whether they span multiple pages to determine the task strategy; if the chapters do not span multiple pages, the task strategy treats the current chapter as a whole for processing; if the chapters span multiple pages, the task strategy is divided into multiple sub-tasks according to the number of page headers spanning multiple pages, and each sub-task is responsible for processing the content of the current chapter within a specific single page; based on the chapter risk identifier and confidence score in the current final chapter's evidence chain, a processing priority is generated for each task strategy to obtain a priority list; the preliminary layout detection results are then processed using complex elements. The system identifies and sets corresponding extraction and parsing strategies based on the type of complex elements. If the complex element is a table, the extraction and parsing strategy involves calling MinerU for refined table structure recognition, determining rows and columns, and associating the table cell content with the structured document. If the complex element is a chart, the extraction and parsing strategy involves treating the chart as an independent image element and performing high-precision cropping. The clause numbering recognition rules, preliminary layout detection results, priority list, and extraction and parsing strategies are combined and encapsulated to obtain a structured task list. Based on the structured task list, a large visual model is used to analyze the layout of the corresponding chapters, locate the clauses and their corresponding key elements, and perform visual analysis. The analysis and structured integration yield structured clauses and a visual evidence chain. The review analysis layer includes a review management agent and several contract review agents, used to: set review positions based on the contract parties, and generate several mutually exclusive review perspectives based on the review positions and structured documents using the review management agent; assign a contract review agent to each review perspective to review the structured clauses in parallel, with each contract review agent outputting at least one review opinion, resulting in a multi-angle review opinion set; integrate and deduplicate the multi-angle review opinion set from semantic and vector directions to obtain the final review report, and generate visualized labeled data and interactive navigation based on the final review report.
2. The contract intelligent review system based on multi-agent collaborative tools and enhanced orchestration as described in claim 1, characterized in that, Parsing a given contract document and extracting text and visual layout information to obtain a structured document specifically includes the following steps: parsing the given contract document and converting it into page images to obtain an array of page images; using an OCR tool to perform text recognition on each page image in the page image array, extracting the text and corresponding rectangular regions, and generating text blocks and text block coordinate information; based on the text block coordinate information, concatenating the text blocks of all page images in reading order to generate a complete plain text contract; Establish a complete mapping relationship between plain text contracts and text block coordinate information to obtain structured documents.
3. The intelligent contract review system based on multi-agent collaborative tools and enhanced orchestration as described in claim 1, characterized in that, The chapter retrieval strategy based on the semantic information, document structure, and contract type of the contract document includes the following steps: using sliding window technology to segment the structured document into multiple overlapping paragraph segments; using the Embedding model to convert the multiple overlapping paragraph segments into corresponding vector representations; given a risk pattern vector library containing common contract risk patterns, calculating the cosine similarity between each text segment vector and each risk pattern vector in the risk pattern vector library to obtain a similarity score. A first similarity threshold is preset. The similarity scores of all risk patterns are compared with the first similarity threshold. If the similarity score exceeds the first similarity threshold, the current risk pattern is identified as a seed angle, and a set of seed angles is obtained. Given a verification rule base, which predefines common contract clause types, the structured document is matched with each clause type in the verification rule base using keyword matching. If no clause type is detected in the full text of the contract, the current clause type is determined to be missing, and a corresponding missing record is generated. All identified missing clauses constitute a set of missing clauses. Given a contract type matching rule base, keyword matching is performed on the structured document to obtain the keyword matching results. Based on the keyword matching results, the contract type is determined. According to the contract type, retrieval rules associated with the contract type are loaded from the type-based retrieval strategy base to obtain contract association rules. The first task instruction is to require the large language model to perform chapter-level review of the contract and identify chapters with potential risks. The structured document is used as context information. The seed perspective set, the missing clause set, the contract type, and the contract association rules are used as three retrieval modes to be executed and interpreted, and prompt word templates for the corresponding retrieval modes are obtained. The seed perspective set, missing clause set, contract type, and contract association rules are filled into the prompt word template of the corresponding search mode to obtain the chapter search strategy.
4. The contract intelligent review system based on multi-agent collaborative tools and enhanced orchestration as described in claim 3, characterized in that, Based on the chapter retrieval strategy, the parallel preliminary retrieval and identification of structured documents using a large language model includes the following steps: Three parallel retrieval branches are set up: branch A, branch B, and branch C. The chapter retrieval strategy and text fragments of multiple overlapping paragraph segments are input into branch A. The large language model is required to identify relevant chapters in the text fragments of multiple overlapping paragraph segments based on a seed angle set, obtaining a list of potentially risky chapters. The list of potentially risky chapters records the chapter title, semantic matching risk identifier, evidence identification basis, and confidence score. The chapter retrieval strategy and text fragments of multiple overlapping paragraph segments are input into branch B. The large language model is required to refer to the set of missing clauses to retrieve... The process begins by checking for missing clauses in the contract and analyzing the completeness of relevant chapters to obtain a list of missing chapters. This list includes chapter titles, structural missing markers, and evidence for identification. Branch C then inputs the chapter retrieval strategy and text fragments from multiple overlapping paragraphs. The large language model, based on the contract type, applies specific rules to focus on the most relevant typical chapters, resulting in a list of typical chapters. This list includes chapter titles, typified risk markers, and evidence for identification. The union of the potential risk chapter list, the missing chapter list, and the typical chapter list yields the sampling results for this round. After N rounds of sampling, preliminary retrieval and identification results are obtained.
5. A contract intelligent review system based on multi-agent collaborative tools and enhanced orchestration as described in claim 4, characterized in that, The union of the preliminary search and identification results yields a set of chapters and a complete chain of evidence. This process includes the following steps: merging all chapter entries from the preliminary search and identification results into a single initial candidate chapter list to obtain a list of chapter titles; using an Embedding model to vectorize the chapter titles to obtain chapter title vector representations; and calculating the cosine similarity between all chapter title vector representations to form a similarity matrix. A second similarity threshold is preset. All chapter titles are clustered based on the second similarity threshold and the similarity matrix to form groups. Each group is represented by a standardized chapter title to obtain similar chapter groups. For similar chapter groups, evidence identification is performed sequentially, including completeness assessment, confidence comparison, and sampling frequency comparison, in order to select an optimal entry from the similar chapter groups. Based on the optimal entry, evidence fusion is performed to obtain the chapter set and the complete evidence chain.
6. A contract intelligent review system based on multi-agent collaborative tools and enhanced orchestration as described in claim 5, characterized in that, Based on the contract parties, a review stance is set, and based on the review stance and structured documents, a review management agent is used to generate several mutually exclusive review perspectives. The specific steps include: setting the review stance based on the contract parties; defining the role as a contract review planning expert; and generating a list of review perspectives based on the contract content, seed perspectives, and review stances as the task objective. The output format should clearly specify that each review perspective must include the review perspective name, explanation, clause type, and question type. The quality requirement is to output at least 8-10 review perspectives, which must be mutually exclusive and non-overlapping, and collectively cover three types of issues: institutional deficiencies, legal risks, and business risks. This is the basis for the review prompt template. The structured document, seed perspective set, and reviewer's stance are used as the basis for analysis, and are assembled with the review prompt word template to obtain the review prompt words; Input the review prompts into the large language model to generate a structured initial review perspective list; Calculate the text similarity of all review angle names in the structured initial review angle list; preset a text similarity threshold and compare the text similarity threshold with the text similarity of all structured initial review angles; merge review angle pairs with text similarity exceeding the text similarity threshold into one review angle to obtain the first angle list; concatenate the review angle name and explanation of the review angle and convert it into a vector representation using an embedding model to obtain angle vectors; preset a semantic similarity threshold, calculate the cosine similarity between all angle vectors, and compare the semantic similarity threshold with the cosine similarity between all angle vectors; merge review angle pairs with cosine similarity exceeding the semantic similarity threshold into one review angle to obtain the second angle list; the first angle list and the second angle list together form the final review angle list.
7. A contract intelligent review system based on multi-agent collaborative tools and enhanced orchestration as described in claim 6, characterized in that, Assign a contract review agent to each review angle and review the structured clauses in parallel. Each contract review agent outputs at least one review opinion, resulting in a multi-angle review opinion set. The specific steps include: creating an independent contract review agent for each review angle in the final review angle list; defining the role of the contract review agent as a contract review expert focused on analyzing the specified review angle; and instructing the contract review agent to comprehensively read the full text of the contract, view the images in the multi-scale visual input data package to understand the context and layout, and refer to the key elements in the structured clause data as a second task instruction. The output must be a structured JSON object, and each object must strictly contain a problem description, the original text of the clause, the proposed modification, and the modification results as the output format specifications. In addition, all conclusions must be supported by the original text, and contract review prompts are obtained. The contract review prompts are assembled with the visual evidence chain and input into the corresponding contract review agent to obtain one or more structured review opinions from each review perspective, forming a multi-perspective review opinion set.
8. A contract intelligent review system based on multi-agent collaborative tools and enhanced orchestration as described in claim 7, characterized in that, The final review report is obtained by integrating and deduplicating the multi-angle review opinion set from both semantic and vector directions. The specific steps include the following: using the third task instruction to identify duplicate opinions, merge similar opinions, resolve conflicts, and remove invalid opinions, and then combining the third task instruction with the multi-angle review opinion set into the LLM large language model to obtain the semantically integrated opinion list. The problem description and the original text of each clause in the multi-angle review opinion set are concatenated and input into the Embedding model to be converted into the corresponding vector representation, thus obtaining the opinion vector representation; clustering is performed based on the cosine similarity of all opinion vector representations to obtain several opinion clusters; the opinion with the most complete, accurate and confident problem description is selected from the opinion clusters as the cluster representative opinion, thus obtaining the cluster result list; The semantic integration opinion list and the clustering result list are merged, and the union is taken to form the merged opinion list; The merged opinion list is then subjected to a deduplication operation based on the embedding vector to obtain the final refined opinion list. The final refined opinion list is precisely linked with the original visual coordinates and clause numbers corresponding to the multi-angle review opinion set to obtain the final review report. Based on the final review report, visualized annotation data is generated and interactive navigation is performed.
Citation Information
Patent Citations
Contract review method and device based on artificial intelligence, equipment and storage medium
CN113887195A
Contract review method and device based on element extraction and storage medium
CN114118098A
Contract compliance examination method and platform based on multi-agent cooperation
CN120337880A
Intelligent file editing and auditing system and method and storage medium
CN120996008A