A large model-based contract text intelligent review method and system

CN122528879APending Publication Date: 2026-08-07CHINA GEZHOUBA GRP THREE GORGES CONSTR ENG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA GEZHOUBA GRP THREE GORGES CONSTR ENG CO LTD
Filing Date
2026-04-30
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0005]本发明旨在解决现有技术中审查效率低、风险识别不准、结论不可追溯及规则适配性差的问题,提供一种基于大模型的合同文本智能审查方法及系统,实现多格式兼容、长文本处理、立场化规则适配、语义级风险识别与结论可追溯,显著提升审查效率、准确率与一致性,适用于法务、商务、工程等多场景合同智能审查

Benefits of technology

1.与现有技术直接将PDF、Word等合同文档转为纯文本而易导致格式丢失、表格错乱、非文本元素无法识别的缺陷不同,本发明将原始异构合同文档统一转换为结构化轻量级标记语言(如Markdown),并结合OCR技术处理图片等非文本内容,完整保留原文档的标题层级、列表、表格等逻辑结构,为大语言模型提供具备完整语义与结构信息的规范输入,显著提升合同条款识别准确率,有效改善大模型处理复杂版式文档时易出现的幻觉与语义误解问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122528879A_ABST
    Figure CN122528879A_ABST
Patent Text Reader

Abstract

The application provides a kind of big model-based contract text intelligent review method and system, belong to artificial intelligence, natural language processing and contract risk control technical field, this method includes: contract text is uniformly converted into Markdown format;Based on contract type and review position, load review rules from rule base;Call big language model to perform item-by-item review on contract text, output structured review opinion;Each review opinion is executed evidence positioning, through candidate window generation, semantic similarity calculation and context expansion, locate supporting evidence in the original text;Generate a review report containing review opinion, risk level, evidence location and modification suggestion.The application solves the problems of insufficient understanding of complex clauses, poor evidence traceability and insufficient rule flexibility of traditional contract review systems through Markdown format uniformity, dynamic rule base loading, big model semantic understanding and evidence positioning mechanism, significantly improves the accuracy, traceability and adaptability of contract review.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence, natural language processing, and contract risk control, and in particular to an intelligent method and system for reviewing contract texts based on a large model, rule base, and evidence location mechanism. Background Technology

[0002] In legal, procurement, engineering, and business management scenarios, contract text review is a high-frequency and critical task. Existing contract review methods typically include several approaches: manual clause-by-clause review (where reviewers read the entire contract and provide their opinions), keyword-based search (using preset keywords to locate clauses such as "payment," "breach of contract," and "dispute resolution"), and fixed rule template-based methods (matching the contract for specific fields or expressions).

[0003] While the existing review method of "keyword matching + fixed rule verification" can improve the speed of location to some extent, the following problems still exist: insufficient ability to handle long contracts, attached contracts, and tabular contracts, and difficulty in uniformly analyzing different text formats; lack of semantic understanding of complex clauses, implicit risks, and contextual dependencies, making it easy to overlook non-explicit risks; lack of stable evidence location relationship between review results and original text, resulting in poor traceability of conclusions; review rules are usually fixed in code or static templates, making it difficult to flexibly adjust according to contract type, review stance, and rigor; review results output is text-based, lacking structured results and visual evidence annotations, which is not conducive to subsequent review, archiving, and statistics.

[0004] Therefore, how to construct a technical solution that can handle multi-format contract texts, perform semantic-level review of contract terms, and stably link the review conclusions with the location of the original evidence is a technical problem that urgently needs to be solved in the existing technology. Summary of the Invention

[0005] This invention aims to solve the problems of low review efficiency, inaccurate risk identification, untraceable conclusions, and poor rule adaptability in existing technologies. It provides a method and system for intelligent review of contract texts based on a large model, which achieves multi-format compatibility, long text processing, position-based rule adaptation, semantic-level risk identification, and traceable conclusions. It significantly improves review efficiency, accuracy, and consistency, and is applicable to intelligent contract review in various scenarios such as legal affairs, business, and engineering.

[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows: The first aspect of this invention provides a method for intelligent review of contract text based on a large model, comprising the following steps: Receive the original document to be reviewed, perform multi-format parsing and structured reconstruction on the original document, and convert it into structured lightweight markup language text; Based on the review scenario parameters input by the user, dynamically load the target review rule set from the rule base; Based on the set of target review rules and the structured lightweight markup language text, review prompt words are constructed; The large language model is invoked to infer the review prompt words and perform semantic review, generating a structured review opinion containing risk levels; Evidence localization is performed on the structured review opinion by locating supporting evidence fragments in the original document or the structured lightweight markup language text through semantic matching; Based on the structured review comments and the supporting evidence fragments, a visual review report is generated.

[0007] Preferably, the step of performing multi-format parsing and structured reconstruction on the original document further includes: When the original document contains non-text elements, OCR technology is used to identify the non-text elements, and the identification results are converted into text descriptions in the structured lightweight markup language text to ensure that the large language model understands the non-text content. The structured lightweight markup language text retains the original document's heading hierarchy, list structure, table structure, and image description information.

[0008] Preferably, the step of dynamically loading the target review rule set based on the review scenario parameters input by the user includes: Receive the contract type, review stance, and review rigor specified by the user; The basic rule set is retrieved based on the contract type, and the position rule set is retrieved based on the review position. The target review rule set is generated by adjusting the priority or trigger threshold of the rules in the basic rule set and the position rule set according to the review rigor.

[0009] Preferably, the step of performing evidence localization on the structured review opinion includes: Extract core semantic keywords from the structured review comments; Generate a candidate evidence window containing the core semantic keywords in the structured lightweight markup language text; Calculate the semantic similarity between the structured review opinion and each of the candidate evidence windows, and select the candidate evidence window with the highest similarity as the supporting evidence fragment.

[0010] Preferably, the method further includes the step of segmenting the long text into blocks: When the length of the structured lightweight markup language text exceeds a preset threshold, the text is divided into multiple text blocks according to semantic boundaries, and an overlap area of ​​a preset length is retained between adjacent text blocks. Contract elements are extracted from each of the text blocks to generate a structured set of elements for use by the large language model.

[0011] Another aspect of the present invention provides a contract text intelligent review system based on a large model, the system being used to implement the aforementioned contract text intelligent review method based on a large model, comprising: The document parsing module is used to receive the original document to be reviewed and convert it into structured lightweight markup language text. The rule management module is used to store the review rule library and dynamically load the target review rule set according to the review scenario parameters input by the user; The semantic review module is used to construct prompt words based on the target review rule set, call the large language model to reason about the structured lightweight markup language text and perform semantic review, and generate structured review opinions; The evidence location module is used to perform semantic matching on the structured review opinion and locate supporting evidence fragments in the original text. The report generation module is used to generate visual review reports that include review comments, risk levels, and evidence locations.

[0012] Preferably, the file parsing module includes: Format recognition unit, used to recognize PDF, DOC, DOCX or image formats; The structural reconstruction unit is used to convert the identified headings into Markdown heading syntax, lists into Markdown list syntax, and tables into Markdown table syntax, and to process image content using OCR technology.

[0013] Preferably, the evidence location module includes: The candidate window generation unit is used to generate candidate evidence windows based on keyword matching. The semantic ranking unit is used to calculate and rank the semantic similarity between the review comments and the candidate windows. The context expansion unit is used to expand the context of the initially located evidence location to generate a final evidence fragment containing complete semantics.

[0014] Preferably, the report generation module supports exporting the review report as Markdown, Word, or PDF format, and provides risk distribution statistics and visualization charts.

[0015] In another aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the intelligent review method for contract text based on a large model.

[0016] This invention, through its technical architecture of multi-format structured reconstruction, dynamic rule-driven approach, large-scale model semantic review, and precise evidence localization, offers the following significant advantages compared to existing technologies: 1. Unlike existing technologies that directly convert contract documents such as PDF and Word into plain text, which easily leads to format loss, table disorder, and the inability to recognize non-text elements, this invention uniformly converts the original heterogeneous contract documents into a structured lightweight markup language (such as Markdown) and combines it with OCR technology to process non-text content such as images. It fully preserves the original document's logical structure, such as heading hierarchy, lists, and tables, providing a standardized input with complete semantic and structural information for large language models. This significantly improves the accuracy of contract clause recognition and effectively improves the illusion and semantic misunderstanding problems that easily occur when large models process complex formatted documents.

[0017] 2. To address the shortcomings of existing review tools, such as rigid rules and difficulty in adapting to different business review perspectives, this invention employs a multi-dimensional dynamic rule loading mechanism based on contract type, review perspective (client / vendor / neutral), and review rigor. This mechanism adaptively adjusts rule priorities according to actual review needs, enabling flexible switching between advisory and mandatory rules, thus forming scenario-based and personalized review strategies. This mechanism allows the same system to seamlessly adapt to various business scenarios such as procurement, sales, and engineering, completing rule adaptation without modifying the underlying code, significantly reducing system maintenance costs and deployment cycles.

[0018] 3. To address the industry pain points of black-box output from large models and the difficulty in tracing and verifying review conclusions, this invention establishes a precise mapping relationship between review opinions and original text fragments through evidence localization technologies such as candidate window generation, semantic similarity calculation, and context expansion. While outputting risk points, it automatically locates and highlights the corresponding original text evidence, enabling AI review conclusions to have traceable and verifiable supporting evidence, significantly improving users' credibility of AI review results, and increasing the efficiency of review conclusion verification several times over.

[0019] 4. To address the issue that long contracts exceeding 10,000 words can easily exceed the context window of a large model and cause the loss of key information, this invention adopts an overlapping block processing method based on semantic boundaries. It prioritizes paragraphs or headings as segmentation boundaries, retains a preset length of overlapping area between adjacent text blocks, and combines this with structured contract element extraction. This satisfies the input length constraints of the large model while preventing key clauses from being truncated at the block division, ensuring the continuity of contextual semantics and the integrity of information. This fundamentally solves the problem of information omission in the review of long contracts and ensures the comprehensiveness and accuracy of the review.

[0020] 5. This invention can generate a visual review report containing structured risk levels, modification suggestions, and risk distribution statistical charts, providing an intuitive presentation of review results. Compared with traditional manual review or keyword search tools, this invention reduces the average review time for a single contract from several hours to minutes, significantly improves the accuracy of risk identification, effectively reduces corporate legal compliance costs, and facilitates quick understanding of key contract risk points by non-professionals, demonstrating high practical value and promising prospects for widespread adoption. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 The overall flowchart of the intelligent contract text review method based on a large model provided in the embodiments of the present invention is shown.

[0023] Figure 2 The structural block diagram of the intelligent contract text review system based on a large model provided in the embodiments of the present invention.

[0024] Figure 3 The flowchart of the evidence location module provided in the embodiment of the present invention is shown.

[0025] Figure 4 A flowchart illustrating the dynamic loading mechanism for review rules provided in this embodiment of the invention. Detailed Implementation

[0026] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0027] Example 1: See Figure 1-4 This embodiment provides a method for intelligent review of contract text based on a large model, including the following steps: Step 1, Original Document Reception and Structured Reconstruction: Receive the original document to be reviewed, perform multi-format parsing and structured reconstruction on the original document, and convert it into structured lightweight markup language text; The specific process is as follows: The system receives the original construction contract document to be reviewed, supporting multiple input formats such as PDF, DOC, DOCX, XLS, and XLSX. The system performs format recognition, text extraction, and structural reconstruction on the document, uniformly converting it into structured lightweight markup language (Markdown) text. The converted Markdown text fully retains heading level information, paragraph boundary information, list information, table information, and page numbers or original fragment source identification information.

[0028] Different processing methods are used for different formats: text, page order, and page numbers are extracted from PDF files; heading styles, paragraphs, and table structures are extracted from Word files; and cell contents are converted into Markdown table fragments from Excel files. If the document contains non-text elements such as images, the system uses OCR technology to recognize them and convert them into text descriptions for insertion into Markdown text, ensuring that the large language model can fully understand them.

[0029] Using Markdown as the unified format balances structural preservation with natural language readability, facilitating semantic understanding and processing in large models and avoiding format loss and semantic errors caused by plain text conversion. Compared to purely structured formats such as JSON or XML, Markdown is closer to natural language, which is beneficial for the semantic understanding of large models.

[0030] Step 2, Long text overlapping block segmentation and contract element extraction: Based on the review scenario parameters input by the user, dynamically load the target review rule set from the rule base; The system detects the length of the structured Markdown text. When it exceeds the preset segmentation threshold, it segments the text into blocks according to semantic boundaries such as headings and paragraphs. The system retains a preset length overlap area between adjacent text blocks to maintain the semantic continuity of the context. It also records the start offset, end offset, and source page number of each text block.

[0031] The system extracts contract elements from each text block, including core elements such as payment terms, applicable law, dispute resolution, liability for breach of contract, contract term, quality standards, and safety responsibilities. After merging and deduplication, it generates a structured set of elements for contextual support in subsequent semantic review. This block-based and element extraction mechanism effectively solves the problem of information truncation and omission caused by long contracts exceeding the context window of a large model.

[0032] In this embodiment, the block threshold is set to 8000 characters by default, and the overlap length of adjacent text blocks is set to 200 characters by default. The 200-character overlap length is based on empirical statistics: the average length of contract clauses is 150-300 characters, and a 200-character overlap can cover the complete context of most clauses, preventing key information from being truncated at block boundaries. The structured element set is stored using a key-value mapping structure, and each field includes at least a field name, extracted content, confidence level, and source block identifier.

[0033] The information extraction model and the large language model can be different stages of the same large language model, or they can be two independent models. When using the same large language model, the information extraction stage uses structured output prompts, while the review stage uses rule-driven prompts. When using two independent models, the set of structured elements output by the information extraction model serves as the input context for the review model. By splitting long contracts into multiple controllable text blocks and extracting structured contract elements, the system solves the problems of limited context length in large models and the difficulty in consistently extracting key information from long texts.

[0034] Step 3, Review scene parameter input and target rule dynamic loading: Based on the target review rule set and the structured lightweight markup language text, construct review prompt words; The system constructs a contract review rule base, which includes at least a scenario layer and a rule layer. The scenario layer defines review scenarios, including types such as engineering contracts, procurement contracts, sales contracts, service contracts, and labor contracts. The rule layer defines specific review rules; each rule includes a rule name, rule description, applicable scenario, risk level, rule type, applicable stance, and priority. Based on the user-selected review scenario, review stance, and rigor, the system loads the target set of rules from the rule base.

[0035] The review stance includes the client's stance, the vendor's stance, and a neutral stance; the stringency level includes lenient, standard, and strict. The loading process of the target rule set follows a specific logic: the system filters rules that match the applicable scenario fields based on the review scenario, filters rules that do not match the applicable stance fields based on the review stance, and adjusts rule priority based on the stringency level. When the stringency level is "strict," advisory rules are promoted to mandatory rules; when the stringency level is "lenient," some mandatory rules are downgraded to advisory rules. The system sorts these rules from highest to lowest priority to form the target rule set. When multiple rules correspond to the same contract element, the system prioritizes the highest priority rules and uses the lower priority rules as supplementary review items. Through a scenario-based rule base and a dynamic rule loading mechanism, the system solves the problem that fixed templates are difficult to adapt to different contract types and risk preferences.

[0036] Step 4, rule-driven large-scale model semantic review: invoke the large language model to reason about the review prompt words and perform semantic review to generate structured review opinions containing risk levels; The system reviews each rule in the target rule set. The review process for each rule includes multiple steps: the system locates candidate clauses related to the current rule in the structured element set, constructs review prompts by combining the current rule description, the content of the candidate contract clauses, the review stance, and the level of strictness, calls the large language model to output structured review opinions, and saves the corresponding conclusion, risk statement, modification suggestions, and risk level for the rule.

[0037] The structured review opinion includes the rule number or name, the structured review opinion, risk statement, modification suggestions, and evidence fragment identifiers. The structured review opinion has three states: passed, risk present, and failed. The review prompts simultaneously include the rule text, original contract evidence, position constraints, and strictness constraints to ensure that the same rule outputs differentiated conclusions in different business scenarios. The review prompts include a role definition section, a rule description section, a contract clause section, a review constraint section, and an output format section. The role definition section defines the review roles in the large model; the rule description section contains a complete description of the current rule; the contract clause section contains the original text of the candidate clauses; the review constraint section contains the review position and strictness requirements; and the output format section requires the output of structured review opinions, risk statements, and modification suggestions. The review prompts are constructed using a template-based approach, reusing the same prompt template for different rules, only replacing the rule description and contract clause content. Through rule-driven semantic review of the large model, the system solves the problem that keyword matching alone cannot identify complex legal semantics, contextual dependencies, and implicit risks.

[0038] Step 5, Evidence Location and Precise Source Tracing: Perform evidence location on the structured review opinion, and locate supporting evidence fragments in the original document or the structured lightweight markup language text through semantic matching; The system aligns the extracted text from the structured element set with the execution position of the original contract text to obtain the evidence location result. The specific steps of position alignment are as follows: Based on the first N characters of the extracted fragment (default N=20), the system generates a set of candidate windows in the original text and calculates the matching similarity for each candidate window. When multiple candidate windows exist, the system prioritizes the candidate window that is closest to the page number of the text block where the extracted fragment is located. When the similarity of all candidate windows is less than 0.8, the system marks them as requiring manual confirmation.

[0039] Match similarity considers both character matching rate and positional continuity, and is calculated using the formula: similarity = α × char_match_ratio + β × continuity_score. Where char_match_ratio is the character matching rate, calculated as: matched_chars / max(len(extracted_text), len(original_text)); continuity_score is the percentage of consecutively matched characters; α = 0.7, β = 0.3. A similarity ≥ 0.8 is considered a successful match.

[0040] Based on the evidence location results, the system constructs a one-to-one mapping relationship between structured review opinions and original text fragments, and highlights high-risk, medium-risk, and low-risk clauses in the original contract text with different identifiers. When multiple rules provide different structured review opinions on the same contract element, the system handles it according to a specific strategy: if the conclusion is "Approved" and "Risk Exists," then "Risk Exists" is adopted; if the conclusion is "Risk Exists" and "Not Approved," then "Not Approved" is adopted; if multiple rules all result in "Not Approved" but the risk descriptions are different, then the risk descriptions are merged and the source rule is marked. Through evidence location and visual tracing, the system solves the problems of traditional review reports not being able to quickly review the original text evidence and having insufficient credibility of conclusions.

[0041] Step 6, Visual review report generation and export: Based on the structured review comments and the supporting evidence fragments, a visual review report is generated.

[0042] The system generates review reports based on the structured review comments of each rule. These reports include basic contract information, a review summary, detailed rule-level results, risk distribution statistics, and citations and location information of original evidence. The system exports the review reports to at least one of the following formats: Markdown, DOCX, or PDF. Simultaneously, the system writes the review task's process data into a review record database. This process data includes contract document information, review scenario, review parameters, rule result sets, review time, and reviewer or review task identifier. Through standardized reporting and persistent review records, the system solves the problems of archiving, reusing, and statistically analyzing review results.

[0043] The system supports statistical analysis of the review record database, including statistics on the number of review tasks and risk distribution trends by time, statistics on high-frequency risk points for different contract types by scenario, and statistics on the trigger frequency and pass rate of each rule by rule. The statistical analysis results can be used to optimize the rule base and guide contract management strategies.

[0044] The system supports a multi-person collaborative review mode: the lead reviewer initiates a review task and generates a preliminary review report, the reviewer can view the review report, original evidence and rule basis, and the reviewer can raise objections or supplementary opinions on the structured review opinions of specific rules. The system records all operations and opinions during the review process, forming a review trajectory.

[0045] Example 2: This embodiment takes a construction contract as an example to illustrate the specific implementation process of the intelligent review method for contract text based on a large model described in this invention.

[0046] Step 1: Receiving raw documents and reconstructing them into multi-format structures The user uploaded a construction contract in PDF format, with a file size of 15MB and a total of 45 pages.

[0047] After receiving the original document, the system performs multi-format parsing and structured reconstruction: full-text extraction, title recognition, table extraction, and page number positioning are performed on the document; the original document is uniformly converted into structured lightweight markup language (Markdown) text, with a total text length of approximately 32,000 characters after conversion, fully preserving the hierarchical structure such as the first-level heading "General Principles", the second-level heading "Project Overview", and the third-level clause numbering.

[0048] If the document contains non-text elements such as images, the system uses OCR technology to recognize and convert them into corresponding text descriptions to insert Markdown text, ensuring that the large language model can fully understand the non-text content.

[0049] The converted structured text fragment is as follows: Construction contract Chapter 1 General Provisions 1.1 Both parties to the contract Party A: XX Construction Group Co., Ltd. Party B: XX Construction Engineering Co., Ltd. 1.2 Project Overview Project Name: XX Commercial Complex Project Project Location: No. XX, XX Road, XX District, XX City Step 2: Long text segmentation and contract element extraction The system detected that the structured Markdown text length was 32,000 characters, exceeding the 8,000-character threshold. The text was then split into 5 text blocks based on semantic boundaries such as paragraphs and headings. A 200-character overlap was maintained between adjacent text blocks to preserve contextual continuity. The dimensions of each text block are as follows: Block 1: 0–8000 characters.

[0050] Block 2: 7800–15800 characters.

[0051] Block 3: 15600–23600 characters.

[0052] Block 4: Characters 23400–31400.

[0053] Block 5: 31200–32000 characters.

[0054] The system extracts contract elements from each text block, including payment terms, applicable law, dispute resolution, liability for breach of contract, contract term, quality standards, and safety responsibilities. After merging and deduplication, a structured set of elements is generated. The system extracts contract elements according to the following field configuration: CLAUSE_FIELDS={ "payment_terms":"Payment terms", "governing_law":"applicable law", "dispute_resolution":"Dispute resolution", "breach_liability":"Breach of Contract Liability", "contract_term":"Contract term", "quality_standard":"Quality Standard", "safety_requirements": "Safety responsibilities" } The extraction results are shown below: { "payment_terms":{ "content":"The project payment will be made in installments according to the progress. The first installment of 30% will be paid within 7 days after the contract is signed, the intermediate installment of 40% will be paid when the project progress reaches 50%, and the final installment of 30% will be paid within 30 days after the project is completed and accepted." "confidence":0.95, "source_block":"Block2" }, "breach_liability":{ "content":"If Party B fails to complete the project within the agreed timeframe, Party B shall pay Party A a penalty of 0.5‰ of the total contract price for each day of delay." "confidence":0.92, "source_block":"Block3" } } Step 3: Review scene parameter input and load target review rule set User inputs review scenario parameters: contract type is engineering contract, review stance is the client's stance, and review rigor is standard.

[0055] The system retrieves the basic rule set based on contract type, the position rule set based on review stance, adjusts rule priority and trigger thresholds according to review rigor, and merges them to generate the target review rule set. A total of 15 review rules were loaded this time, including: 1. The payment terms should clearly stipulate the payment time and payment percentage; 2. The quality standard clauses should clearly stipulate the acceptance criteria; 3. The liability clause for breach of contract should clearly stipulate the responsible party and the method of calculation; 4. The contract should include a dispute resolution clause; 5. The contract should include safety liability clauses.

[0056] Step 4: Construct review prompts and large-scale semantic review The system constructs rule-driven review prompts based on the target review rule set, structured Markdown text, review stance, and review rigor. It then calls a large language model to perform semantic reasoning and clause review, generating structured review opinions that include review conclusions, risk statements, modification suggestions, and risk levels.

[0057] { "rule_name":"Completeness of Payment Terms", "conclusion":"Passed", "risk_description":"", "suggestion": "It is recommended to add payment trigger conditions to the progress milestone acceptance criteria." "risk_level":"low" } The system constructs prompt words for the rule "liability for breach of contract should cover major breach of contract scenarios" and calls the large language model, obtaining the following results: { "rule_name":"Completeness of liability for breach of contract", "conclusion": "Risk exists" "risk_description":"The current terms only stipulate the liability of Party B for late completion, but do not stipulate the liability of Party A for late payment, which poses a risk of imbalance in the allocation of responsibilities." "suggestion": "It is recommended to add provisions regarding the calculation method for the buyer's liability for overdue payments and for penalties." "risk_level":"Medium" } Step 5: Locating Evidence in Structured Review Opinions The system performs evidence localization for each structured review opinion: extracting core semantic keywords from the review opinion; generating candidate evidence windows containing the core keywords in the structured Markdown text; calculating the semantic similarity between the review opinion and each candidate evidence window; selecting the window with the highest similarity and expanding its context to obtain supporting evidence fragments; and establishing a precise mapping between the review opinion and the original text.

[0058] The location results are as follows: The evidence related to the payment terms was located within the original character range [5230, 5312], with a semantic similarity of 0.98; Evidence related to breach of contract liability was located in the original text character range [18650, 18720], with a semantic similarity of 0.96.

[0059] The above location results are used for original text navigation and highlighting in the review report.

[0060] Step 6: Visual Review Report Generation and Export The system summarized the review results of all 15 rules: 8 passed, 5 had risks, and 2 failed.

[0061] Based on structured review comments and supporting evidence fragments, the system generates a visualized review report that includes a review summary, risk level, rule-level review results, evidence location information, and risk distribution statistics. The report is exported in DOCX format, while retaining process data such as review parameters, review time, and review results, supporting subsequent archiving, statistics, and collaborative review.

[0062] Example 3: Comparative Verification To verify the beneficial effects of the present invention, 50 contracts of different types (average length 8,000-15,000 words, including 20 engineering contracts, 15 procurement contracts, and 15 service contracts) were selected for comparative testing.

[0063] Test conditions: 1. The manual review was completed by three legal professionals with more than five years of experience.

[0064] 2. The method of this invention uses the same set of rules.

[0065] 3. The scores are calculated by taking the average of the scores given independently by 3 professional reviewers.

[0066] The comparison results are shown in Table 1. The results demonstrate that the method of this invention outperforms traditional manual review methods in terms of review efficiency, risk identification accuracy, and consistency of review standards. For example, the average review time is reduced from 4.2 hours to 8.5 minutes, and the risk identification accuracy rate is increased from 78% to 94%.

[0067] Table 1 Comparison of the effects of manual review and large-scale model review

[0068] The above results demonstrate that the method of the present invention can effectively improve the efficiency and quality of contract review.

[0069] This invention can be implemented based on a front-end and back-end separation architecture, wherein: 1. The backend uses FastAPI to provide an interface for review tasks.

[0070] 2. The document parsing and review process is uniformly scheduled by the workflow service.

[0071] 3. The rule base and audit records are stored in PostgreSQL.

[0072] 4. The original contract file is stored in object storage.

[0073] 5. The reporting module supports Markdown, DOCX, and PDF output.

[0074] Example 4: Another aspect of the present invention provides a contract text intelligent review system based on a large model, the system being used to implement the aforementioned contract text intelligent review method based on a large model, comprising: The document parsing module is used to receive the original document to be reviewed and convert it into structured lightweight markup language text. The rule management module is used to store the review rule library and dynamically load the target review rule set according to the review scenario parameters input by the user; The semantic review module is used to construct prompt words based on the target review rule set, call the large language model to reason about the structured lightweight markup language text and perform semantic review, and generate structured review opinions; The evidence location module is used to perform semantic matching on the structured review opinion and locate supporting evidence fragments in the original text. The report generation module is used to generate visual review reports that include review comments, risk levels, and evidence locations.

[0075] Preferably, the file parsing module includes: Format recognition unit, used to recognize PDF, DOC, DOCX or image formats; The structural reconstruction unit is used to convert the identified headings into Markdown heading syntax, lists into Markdown list syntax, and tables into Markdown table syntax, and to process image content using OCR technology.

[0076] Furthermore, the evidence location module includes: The candidate window generation unit is used to generate candidate evidence windows based on keyword matching. The semantic ranking unit is used to calculate and rank the semantic similarity between the review comments and the candidate windows. The context expansion unit is used to expand the context of the initially located evidence location to generate a final evidence fragment containing complete semantics.

[0077] Furthermore, the report generation module supports exporting review reports to Markdown, Word, or PDF formats, and provides risk distribution statistics and visualization charts.

[0078] Example 5: In another aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the intelligent review method for contract text based on a large model.

[0079] Although the preferred embodiments of the present invention have been described above in conjunction with the accompanying drawings, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many specific modifications under the guidance of the present invention without departing from the spirit of the invention and the scope of protection of the claims, and these modifications all fall within the scope of protection of the present invention.

Claims

1. A method for intelligent review of contract texts based on a large model, characterized in that, Includes the following steps: Receive the original document to be reviewed, perform multi-format parsing and structured reconstruction on the original document, and convert it into structured lightweight markup language text; Based on the review scenario parameters input by the user, dynamically load the target review rule set from the rule base; Based on the set of target review rules and the structured lightweight markup language text, review prompt words are constructed; The large language model is invoked to infer the review prompt words and perform semantic review, generating a structured review opinion containing risk levels; Evidence localization is performed on the structured review opinion by locating supporting evidence fragments in the original document or the structured lightweight markup language text through semantic matching; Based on the structured review comments and the supporting evidence fragments, a visual review report is generated.

2. The intelligent contract text review method based on a large model according to claim 1, characterized in that, The steps of performing multi-format parsing and structured reconstruction on the original document also include: When the original document contains non-text elements, OCR technology is used to identify the non-text elements, and the identification results are converted into text descriptions in the structured lightweight markup language text to ensure that the large language model understands the non-text content. The structured lightweight markup language text retains the original document's heading hierarchy, list structure, table structure, and image description information.

3. The intelligent contract text review method based on a large model according to claim 1, characterized in that, The steps for dynamically loading the target review rule set based on the review scenario parameters input by the user include: Receive the contract type, review stance, and review rigor specified by the user; The basic rule set is retrieved based on the contract type, and the position rule set is retrieved based on the review position. The target review rule set is generated by adjusting the priority or trigger threshold of the rules in the basic rule set and the position rule set according to the review rigor.

4. The intelligent contract text review method based on a large model according to claim 1, characterized in that, The steps for locating evidence in the structured review opinion include: Extract core semantic keywords from the structured review comments; Generate a candidate evidence window containing the core semantic keywords in the structured lightweight markup language text; Calculate the semantic similarity between the structured review opinion and each of the candidate evidence windows, and select the candidate evidence window with the highest similarity as the supporting evidence fragment.

5. The intelligent contract text review method based on a large model according to claim 1, characterized in that, The method also includes the step of segmenting long texts into blocks: When the length of the structured lightweight markup language text exceeds a preset threshold, the text is divided into multiple text blocks according to semantic boundaries, and an overlap area of ​​a preset length is retained between adjacent text blocks. Contract elements are extracted from each of the text blocks to generate a structured set of elements for use by the large language model.

6. A contract text intelligent review system based on a large model, characterized in that, The system is used to implement the intelligent contract text review method based on a large model as described in any one of claims 1-5, including: The document parsing module is used to receive the original document to be reviewed and convert it into structured lightweight markup language text. The rule management module is used to store the review rule library and dynamically load the target review rule set according to the review scenario parameters input by the user; The semantic review module is used to construct prompt words based on the target review rule set, call the large language model to reason about the structured lightweight markup language text and perform semantic review, and generate structured review opinions; The evidence location module is used to perform semantic matching on the structured review opinion and locate supporting evidence fragments in the original text. The report generation module is used to generate visual review reports that include review comments, risk levels, and evidence locations.

7. The intelligent contract text review system based on a large model according to claim 6, characterized in that, The file parsing module includes: The format recognition unit is used to recognize PDF, DOC, DOCX, or image formats. The structural reconstruction unit is used to convert the identified headings into Markdown heading syntax, lists into Markdown list syntax, and tables into Markdown table syntax, and to process image content using OCR technology.

8. The intelligent contract text review system based on a large model according to claim 6, characterized in that, The evidence location module includes: The candidate window generation unit is used to generate candidate evidence windows based on keyword matching. The semantic ranking unit is used to calculate and rank the semantic similarity between the review comments and the candidate windows. The context expansion unit is used to expand the context of the initially located evidence location to generate a final evidence fragment containing complete semantics.

9. The intelligent contract text review system based on a large model according to claim 6, characterized in that, The report generation module supports exporting review reports to Markdown, Word, or PDF formats, and provides risk distribution statistics and visualization charts.

10. A computer-readable storage medium storing computer instructions thereon, characterized in that, When executed by a processor, the computer instructions implement the steps of the method as described in any one of claims 1-5.