A state machine driven multi-agent document review method and system
The state machine-driven multi-agent document review method solves the problems of weak state control and unreliable review results in the existing technology, realizes a rigorous and controllable document review process, improves the reliability and consistency of review results, and supports complex operations and process traceability.
Patent Information
- Application Number
- CN202611387362.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-08
- Publication Date
- 2026-11-20
AI Technical Summary
Existing intelligent document processing technologies suffer from several problems, including insufficient hierarchical status control, lack of separation between review and verification, incomplete human-machine collaboration loop, unclear version management of review checklists, fragmented switching between automatic and manual modes, and weak concurrent scheduling and consistency control. These issues result in unreliable and difficult-to-trace review results.
A state machine-driven multi-agent document review method is adopted. The hierarchical state machine realizes the state linkage constraint of tasks, review items and rounds, introduces the separation mechanism of review and verification, supports human-machine collaborative closed loop, adopts a concurrent scheduling mechanism to advance review items in parallel, provides a re-review recovery mechanism, ensures that state changes follow preset rules, and generates a structured review report.
It has implemented a rigorous and controllable document review process, improved the reliability and interpretability of review results, ensured the consistency and traceability of the review process, and supported complex operations such as continuing review, stopping a single item, and re-reviewing a single item, avoiding problems such as duplicate processing and inaccurate counting.
Smart Images

Figure CN123139997A_ABST
Abstract
Description
Technical Field
[0001] This invention mainly relates to the field of intelligent document processing technology, and in particular to a state machine-driven multi-agent document review method and system. Background Technology
[0002] Currently, AI-based document review methods mainly revolve around document parsing, rule expression, model invocation, and result output. Common technical solutions fall into the following categories: The first category is a single-round large language model direct review solution. This involves inputting the review checklist and target document into the model all at once to generate a review conclusion. While simple, it lacks round-by-round decomposition, verification, and manual control nodes, resulting in weak stability and traceability. The second category is a rule engine and model concatenation solution. The rule engine handles explicit checks such as format and keywords, while the model handles complex semantic issues. However, it lacks multi-round follow-up questions and iterative convergence mechanisms. The third category is a multi-agent collaborative solution. Multiple agents are responsible for different review dimensions and execute as needed. Some solutions introduce manual confirmation nodes, but the agents primarily engage in task division rather than iterative collaboration, failing to form a multi-round closed loop of review, verification, manual correction, and re-review. Manual correction results are also not versioned and incorporated into subsequent contexts. The fourth category is a distributed toolchain solution. Uploading, parsing, reviewing, revising, and exporting are scattered across different systems, resulting in fragmented states and difficulties in process traceability. The fifth type is the serial automatic review scheme, which proceeds sequentially item by item. However, its efficiency decreases significantly as the number of review items increases.
[0003] Existing intelligent document processing technologies have the following drawbacks: 1. Lack of hierarchical status control. Most systems only record start, completion, or failure status at the task level, lacking linkage status management at the task level, audit item level, and round level. This makes it difficult to strictly constrain complex actions such as continuing audits, stopping individual items, terminating tasks, and re-auditing individual items.
[0004] 2. Lack of a mechanism for separating review and verification. Most existing solutions directly output a one-time conclusion, lacking a dedicated verification stage to cross-check the initial judgment.
[0005] 3. Lack of a complete human-machine collaboration loop. Manual modifications usually only cover the text results, without creating an independent version or becoming the formal context for the next round of review, resulting in a disconnect between manual processing and subsequent model review.
[0006] 4. Lack of evidence anchoring and source explanation mechanisms. Audit opinions often return summary conclusions, making it difficult to pinpoint the specific location in the original text, resulting in insufficient interpretability and audit capability.
[0007] 5. Lack of checklist freezing and version management. The review checklist lacks clear version boundaries between parsing, manual revision, and formal confirmation, which can easily lead to drift in the review criteria.
[0008] 6. Disjointed switching between automatic and manual modes. Existing technology separates automatic and manual review processes, making it difficult to revert individual review items to a manual pending state and continue processing after full automation is complete.
[0009] 7. Lack of concurrent scheduling and consistency control. Serial solutions are inefficient, while simple parallel solutions are prone to concurrency and consistency problems such as duplicate processing of the same audit item and inaccurate completion counts.
[0010] 8. Lack of failure recovery, individual review, and unified export capabilities. When a round fails or an individual review is required, the entire process often needs to be rerun, and the web page results are often inconsistent with the final exported document. Summary of the Invention
[0011] This invention provides a state machine-driven multi-agent document review method and system, aiming to solve the problems of fragmented processes, weak state control, unreliable review results, and difficulty in traceability in existing document review methods.
[0012] The technical solution adopted by the present invention to solve the above-mentioned technical problems is as follows: On one hand, the present invention provides a state machine-driven multi-agent document review method, comprising: S1. Receive the review list and target document; extract text and segment paragraphs from the target document to generate document slices with chapter positioning information; S2. Call the list parsing agent to perform structured parsing of the review list and generate a draft review item; freeze the draft review item after user confirmation as the basis for formal review, and generate a review item instance for each review requirement; S3. Maintain task-level status, audit item-level status, and round-level status for each audit item instance, and define the transition conditions between each status. S4. Under the constraints of the state, perform multiple rounds of auditing for each audit item instance: Check if the current audit item instance's audit item-level status is a valid status that allows auditing to be started; if not, refuse to execute. The auditing agent is invoked to generate the current round of audit conclusions and evidence based on the audit requirements and document slices corresponding to the current audit item instance. After execution, the audit item-level status and round-level status are updated according to the jump conditions. The review agent is invoked to cross-validate the review conclusions based on document slices, output review opinions and the criteria for determining whether to continue to the next round, and after execution, the review item-level status and round-level status are updated according to the jump conditions; Based on the judgment of the review agent, decide whether to continue to the next round or end the current review item according to the jump conditions, and update the review item level status accordingly; S5. After all audit item instances are completed, summarize the audit results of each audit item instance and generate an audit structured report.
[0013] Furthermore, S1 divides the target document into paragraph blocks with overlapping contexts and automatically identifies chapter titles and paragraph numbers; when reviewing evidence output by the intelligent agent, it automatically supplements the evidence with descriptions of the source chapter and paragraph number.
[0014] Furthermore, during the S2 process of generating audit item instances, users can edit and save the audit item draft multiple times, with each save generating a new version and preventing concurrent overwriting; after user confirmation, the list freeze module freezes the draft as the basis for formal audit.
[0015] Furthermore, task-level states are used to constrain the scope of actions that can be invoked throughout the entire lifecycle of the task; audit item-level states are used to constrain the progress of a single audit item instance in multiple iterations; and round-level states are used to constrain the execution progress of each step within a single round of an audit item instance. Task-level statuses should include at least: Under Review, Review Completed, Terminated; Review item-level statuses should include at least: Pending Review, Review in Progress, Review in Progress, Completed, Stopped; Round-level statuses should include at least: In Progress of This Round, Review and Review Completed in This Round, Adopted in This Round. Task-level status, review item-level status, and round-level status are interconnected or constrained through jump conditions.
[0016] Furthermore, under the constraints of state, S4 performs multiple rounds of audits on each audit item instance, including: Check if the current audit item instance's audit item level status is "Pending Audit". If so, allow execution and update the status to "Audit in Progress". The review agent generates review conclusions and evidence based on the review requirements and document slices corresponding to the current review item instance, and updates the review item-level status to "review in progress" and the round-level status to "review of this round has been completed". The review agent cross-validates the output of the audit agent based on document slices, and outputs review opinions and the basis for determining whether to continue; If the review agent determines that no further review is needed, the review item status will be updated to "Completed"; if it determines that further review is needed, the review item status will be updated to "Pending Review" to start the next round.
[0017] On the other hand, the present invention also provides a state machine-driven multi-agent document review system, the system comprising: The task receiving module is used to receive the review list and target document input by the user; The document parsing module is used to extract text and segment paragraphs from the target document, generating document slices with chapter location information; The checklist parsing module is used to call the checklist parsing agent to perform structured parsing of the audit checklist and generate audit item drafts; The checklist freeze module is used to freeze the draft of the review items after user confirmation as the basis for formal review, and to generate a review item instance for each review requirement; The audit execution module calls the audit agent to generate the current audit conclusion and evidence based on the current audit item instance and document slices, and calls the review agent to cross-validate the audit conclusion based on the document slices and output the criteria for whether to continue. The status control module is used to maintain the task-level status, audit item-level status, and round-level status for each audit item instance, and to define the jump conditions between each status. Before the audit is executed, the validity of the status is checked, and after the execution, the corresponding status is updated according to the jump conditions. The results summary module is used to summarize the audit results of each audit item instance after all audit item instances are completed, and generate a structured audit report.
[0018] Furthermore, when the results summary module generates the structured review report, if the review agent determines that no further review is needed, the output of the review agent is used as the final adopted draft; when the preset maximum number of review rounds is reached, the output of the review agent is used as the final adopted draft.
[0019] Furthermore, the system also includes a concurrent scheduling module, which is used for: Control different audit item instances to proceed in parallel, and allow each round within the same audit item instance to proceed sequentially; Mutual exclusion tags ensure that the same audit item instance is occupied by only one execution unit. When an audit item instance is completed, the completion count is updated using an atomic database increment operation. Once all audit item instances have entered the final state, the status control module will update the task-level status to "audit completed".
[0020] Furthermore, the system also includes a re-examination and recovery module, which is used for: When initiating a single item re-review, first archive the historical round records of the review item instance, then generate a new round based on the existing content, and set the review item level status of the review item instance to pending review. When a round fails, recovery or rollback logic is executed to avoid a single point of failure causing the entire task to be interrupted.
[0021] Furthermore, the system also includes a data persistence layer, which uses a relational database to store task-level status, audit item-level status, round-level status, audit item instance records, and output version records for each round; and uses object storage to store original files, parsed text, frozen list snapshots, and the final exported structured audit report.
[0022] The beneficial effects of this invention are: This invention implements state linkage constraints across three levels—task, review item, and round—using a hierarchical state machine. It supports complex operations such as continuing review, stopping a single item, terminating a task, and re-reviewing a single item. All state changes follow preset rules, ensuring a rigorous and controllable process. By setting up dedicated separate execution phases for review and verification, with different agents performing initial judgments and cross-validations, the probability of missed or false judgments is effectively reduced, improving the reliability of review results. The invention achieves a complete human-machine collaborative closed loop. Manually corrected content generates an independent version and serves as the formal context for the next round of review, bridging the gap between manual processing and model review, and fully combining the advantages of human experience and model capabilities. All review conclusions are anchored to the corresponding chapters and paragraphs in the target document, and review comments are accompanied by clear source explanations, significantly improving the interpretability and auditability of the review results. The review checklist, from parsing and editing to formal confirmation, achieves clear boundaries through version management. Once confirmed by the user, it is frozen as the formal review basis, preventing the drift of review basis and ensuring the consistency of the review process.
[0023] This invention improves efficiency by enabling parallel processing of different review items through a concurrent scheduling mechanism. Simultaneously, it ensures concurrency consistency through mutual exclusion control and atomic counting, avoiding issues such as duplicate processing of the same review item and inaccurate completion counts. It supports single-item re-review and failure recovery, allowing for single-point correction and anomaly recovery without requiring a complete rerun. Furthermore, it provides a unified result export capability, ensuring complete consistency between exported reports and system conclusions, thus resolving the problems of difficult process traceability and inconsistent results. Attached Figure Description
[0024] Figure 1 This is a block diagram of a state machine-driven multi-agent document review system according to the present invention. Detailed Implementation
[0025] This invention provides a state machine-driven multi-agent document review system, whose overall architecture comprises three components: an interactive interface, a service orchestration layer, and a data persistence layer. The interactive interface facilitates information exchange between the user and the system; the service orchestration layer controls and schedules the main review process; and the data persistence layer is responsible for the persistent storage of various state data, version records, and file objects. Figure 1As shown, the service orchestration layer is further subdivided into multiple functional modules, such as task receiving module, document parsing module, list parsing module, list freezing module, audit execution module, status control module, concurrency scheduling module, result aggregation module, and re-audit recovery module. Each module is uniformly scheduled by the service orchestration layer to collaboratively complete the entire business process from document upload to audit report export.
[0026] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings and the workflow of each module of the system. The workflow of a state machine-driven multi-agent document review system according to the present invention includes the following steps.
[0027] S1, the document parsing module performs task initialization and document preprocessing.
[0028] After the user uploads the review checklist file and the target document file through the interactive interface, the task receiving module receives the files and triggers the task initialization process. While creating the task record, the task receiving module initializes the task-level status to "Under Review" through the status control module.
[0029] The document parsing module performs text extraction and standardization on the target document. For source files of different formats, the module calls the corresponding parser to extract the main text and converts the extracted results into a standardized text format. Subsequently, the module performs paragraph segmentation on the standardized text. During paragraph segmentation, it automatically identifies chapter titles and paragraph numbers, constructs a chapter hierarchy, and generates a unique identifier for each paragraph. To maintain contextual coherence, overlapping content between adjacent paragraphs is preserved during document segmentation; the overlap length can be pre-configured based on the actual document type and business requirements. After the above processing, the module generates a set of document slices with chapter location information and paragraph identifiers for use in subsequent review stages. The correspondence between the document slice set and the original target document is fully recorded to ensure that the review conclusion can be accurately traced back to the original text location.
[0030] S2, the list parsing module parses the audit list.
[0031] The checklist parsing module invokes a checklist parsing agent to perform structured parsing on the user-uploaded review checklist file. Based on natural language understanding, the checklist parsing agent extracts several structured review requirements from the unstructured checklist text. Each review requirement includes at least the following fields: review item name, review description, review requirements, and judgment criteria. The parsing results are returned as a draft review item to the interactive interface for user review and confirmation.
[0032] S3, the list freeze module freezes the audit items.
[0033] Users can edit draft review items one by one through the interactive interface, including modifying the content of review requirements, adding or deleting review items, and adjusting the order of review items. Each time a user edits and saves a draft, the list freezing module generates a new version number for the current draft and saves the version history to the data persistence layer, while preventing concurrent overwriting through a version verification mechanism. After the user completes all editing and confirms, the list freezing module freezes the current version of the review item draft as the basis for formal review. After the freezing operation is completed, the list freezing module creates a review item instance for each review requirement. Each review item instance contains the complete definition information of the review requirement and inherits the task-level state. At the same time, the list freezing module exports the frozen list snapshot to the object storage in the data persistence layer for subsequent traceability and auditing. The review item-level state of all review item instances is initialized to "pending review" by the state control module.
[0034] S4. The status control module defines three levels of audit status and status transition conditions.
[0035] The status control module maintains three levels of audit status for each audit item instance: task-level status, audit item-level status, and round-level status. The task-level status applies to the entire audit task, constraining the scope of actions that can be invoked throughout the task's overall lifecycle. Task-level status includes at least three states: auditing in progress, auditing completed, and terminated. When the task-level status is "auditing in progress," the system allows audit operations for each audit item instance to be executed; when the task-level status is "auditing completed," all audit operations are prohibited, and the system only allows viewing and exporting results; when the task-level status is "terminated," the system stops all operations on all audit item instances under that task.
[0036] The review item level status operates on a single review item instance, constraining the precise progress of that instance across multiple iterations. Review item level statuses include at least five states: Pending Review, Review in Progress, Review in Progress, Completed, and Stopped. When the review item level status is Pending Review, the system allows a new round of review to begin; when the review item level status is Review in Progress, the system is invoking the review agent to execute the review operation for the current round; when the review item level status is Review in Progress, the system is invoking the review agent to execute the review operation for the current round; when the review item level status is Completed or Stopped, the review item instance terminates and no further review actions are performed.
[0037] Round-level status operates within a single round of an audit item instance, expressing the execution progress and result adoption status of each step within that round. Round-level status includes at least three states: "In Progress," "Review and Review Completed," and "Adopted." When the round-level status is "In Progress," it indicates that the audit or review operation for the current round is in progress; when the round-level status is "Review and Review Completed," it indicates that both the audit and review for the current round have been completed, awaiting result adoption; when the round-level status is "Adopted," it indicates that the result of the current round has been adopted as the final result for this audit item instance.
[0038] Before system operation, the status control module predefines the transition conditions between each status, including conditions for the audit item level status to transition from "Pending Audit" to "Auditing in Progress," from "Auditing in Progress" to "Review in Progress," and from "Review in Progress" to "Completed" or "Pending Audit." These three levels of status are linked and constrained by these transition conditions. Specifically, when the audit item level status is "Auditing in Progress," the corresponding round-level status must be "In Progress in This Round"; when the audit item level status is "Review in Progress," the corresponding round-level status must be "In Progress in This Round" and the audit operation in that round must be completed; when the audit item level status is "Completed," the corresponding round-level status must be "Adopted in This Round." Any change in the status of an audit item instance triggers the status control module to perform linked checks on the relevant levels of status, ensuring logical consistency across the three levels. When all audit item instances' audit item level statuses have entered the "Completed" or "Stopped" state, the status control module updates the task-level status to "Audit Completed" according to the transition conditions.
[0039] S5, the multi-round audit process of the audit execution module.
[0040] The audit execution module independently performs multiple rounds of auditing for each audit item instance until the audit item-level status of that instance enters the completed or stopped final state. A complete audit round includes four sequentially executed processing stages: status check, audit agent invocation, review agent invocation, and round determination.
[0041] During the status check phase, the audit execution module initiates a status query to the status control module to confirm whether the audit item-level status of the current audit item instance is "Pending Audit". If the status check passes, the audit execution module notifies the status control module to update the audit item-level status of the audit item instance to "Auditing in Progress", and simultaneously updates the round-level status to "In Progress for This Round". If the status check fails, the audit execution module refuses to execute this round of auditing and returns an error message.
[0042] During the review agent invocation phase, the review execution module invokes the review agent to perform review operations. The review execution module provides the review agent with the review requirement definition information corresponding to the current review item instance, including fields such as review item name, review description, review requirements, and judgment criteria. It also provides a pre-generated set of document slices from the document parsing module and the context information from the previous review round. For the first round of review, the previous round context information is empty.
[0043] Based on the above input, the review agent examines each item within the document slice that falls within the review scope, generating the review conclusion for the current round. The review conclusion is structured data, including at least four fields: conclusion type, issue summary, reason for judgment, and modification suggestions. The conclusion type is divided into three categories: passed, failed, and questionable. When generating the conclusion, the review agent must provide corresponding supporting evidence for each judgment. Evidence is output in the form of evidence anchors, each containing at least two fields: fragment identifier and original text excerpt, pointing to the specific paragraph and original text content within the document slice. After the review agent is invoked, the review execution module notifies the status control module to update the review item-level status to "under review," while the round-level status remains unchanged as "under execution in this round."
[0044] During the review agent invocation phase, the audit execution module invokes the review agent to perform the review operation. The review agent and the audit agent are two independently deployed agent services. The audit execution module provides the review agent with the same audit requirement definition information and document slice set as the audit agent, and additionally provides the audit conclusion and evidence anchor point set output by the audit agent in this round, as well as the context information of the previous round of review.
[0045] The responsibility of the review agent is to perform independent cross-validation of the output of the audit agent, rather than re-executing the initial audit. The review agent focuses on checking whether there are any omissions in the audit conclusions, whether there are any misjudgments, whether the evidence sufficiently supports the judgment reasons, whether the judgment reasons are consistent with the conclusion type, and whether the modification suggestions are complete and usable. Based on the above analysis, the review agent generates review opinions, which are structured data including at least five fields: a list of risk points, a list of confirmation points, a list of omissions, modification suggestions, and a "continue" flag. The "continue" flag indicates whether the system needs to initiate the next round of auditing: if the review agent finds clear issues to be corrected or potential risks, it sets the flag to "continue"; if no further issues are found and the modification suggestions are empty, it sets the flag to "do not continue." After the review agent is invoked, the audit execution module notifies the status control module to update the round-level status to "the current round of audit review is complete."
[0046] During the round determination phase, the review execution module reads the "continue" flag output by the review agent. If the flag indicates "no need to continue," the review execution module notifies the status control module to update the review item-level status of the review item instance to "completed" and the round-level status to "adopted in this round," thus ending the review process for the current review item instance. If the flag indicates "need to continue," the review execution module further checks whether the current round number has reached the system's preset maximum round limit. If the maximum round limit has been reached, the review execution module notifies the status control module to update the review item-level status of the review item instance to "completed" and the round-level status to "adopted in this round," ending the review process for the current review item instance. The results summary module uses the review conclusion output by the review agent in this round as the final adopted draft in subsequent processing. If the maximum round limit has not been reached, the review execution module notifies the status control module to roll back the review item-level status to "pending review" to start the next round of review. When starting the next round, the review conclusion, review comments, and manually edited version records of the current round will be passed as historical context information to the review agent invocation phase of the next round.
[0047] In scenarios where multiple audit item instances need to be executed in parallel, the concurrent scheduling module is responsible for uniformly scheduling and controlling the execution order and resource allocation of each audit item instance. The concurrent scheduling module executes a scheduling strategy that allows different audit item instances to proceed in parallel, while each round within the same audit item instance is executed sequentially.
[0048] Specifically, the concurrent scheduling module maintains a set of mutex occupancy markers, which records the identifiers of currently executing audit item instances. When any execution unit prepares to perform an operation on an audit item instance, the concurrent scheduling module first checks whether the identifier of that audit item instance already exists in the mutex occupancy marker set. If it already exists, it means that the audit item instance is being processed by another execution unit, and the execution unit must wait for or skip the instance; if it does not exist, the concurrent scheduling module adds the audit item instance identifier to the mutex occupancy marker set and then allows the execution unit to begin processing. After the audit item instance is processed, the concurrent scheduling module removes the instance identifier from the mutex occupancy marker set. This mechanism ensures that the same audit item instance is held by only one execution unit at any given time, thereby guaranteeing that the rounds within the same audit item instance are executed strictly in sequential order.
[0049] Concurrent execution is allowed between different audit item instances. The concurrent scheduling module scans the audit item instances currently in a processable state according to a preset order, and assigns the instances that can be processed in parallel to different execution units to proceed simultaneously. When the audit item-level status of any audit item instance is updated to "completed" or "stopped" by the status control module, that audit item instance enters the final state. The concurrent scheduling module uses atomic auto-increment operations in the database to update the task completion count, avoiding count loss in concurrent scenarios. After each atomic auto-increment operation, the concurrent scheduling module checks whether the current completion count value is equal to the total number of audit item instances. If they are equal, it means that all audit item instances have entered the final state, and the concurrent scheduling module notifies the status control module to update the task-level status to "audit completed".
[0050] S6. Output the document review results.
[0051] Once the task-level status is updated to "Review Completed" by the status control module, the result aggregation module initiates the result aggregation process. The result aggregation module reads the review records of all review item instances and determines the final adopted version for each instance according to the following rules: If the review item instance converges normally because the review agent determines it does not need to continue, the version of the review conclusion pointed to by the correction suggestions in the review comments output by the last review agent is used as the final adopted version; if the review item instance ends because it has reached the preset maximum round limit, the review conclusion output by the last review agent is used as the final adopted version.
[0052] The results summary module assembles the final adopted drafts of each audit item instance according to the original order of the audit checklist, generating a complete structured audit report. The structured audit report is a hierarchical data structure, with each audit item presented as a first-level heading, which includes fields such as a problem summary, judgment reasons, modification suggestions, and final conclusion for that audit item, as well as the corresponding set of evidence anchors and automatically supplemented chapter sources and paragraph number explanations.
[0053] In round-failure scenarios, if the review agent call or verification agent call fails due to network timeout, model service anomalies, or other reasons, the re-review recovery module marks the round's status as failed and automatically executes recovery or rollback logic. The recovery logic is as follows: the re-review recovery module retains the current review item instance's review item-level status and completed context information unchanged, and re-executes the failed operation steps. If continuous recovery attempts fail after reaching a preset threshold, the re-review recovery module updates the review item instance's review item-level status to "stopped" and records the reason for failure for user viewing, without affecting the normal execution of other review item instances. This mechanism avoids the problem of a single point of failure causing the entire task to be interrupted.
[0054] In a single-item re-review scenario, users can initiate a single-item re-review request for any completed review item instance on the results summary page. Upon receiving the re-review request, the re-review recovery module first reads all historical round records for that review item instance from the data persistence layer, including the review conclusions, review opinions, and evidence anchors for each round, and archives and saves the complete historical record to object storage. Subsequently, the re-review recovery module generates a new round instance based on the existing content, resetting the review item-level status of that instance from "completed" to "pending review," while retaining the corresponding review requirement definition information and document slice references. The review context of the new round contains all historical round records for reference during subsequent review execution. After the review item-level status is reset to "pending review," the review execution module can re-execute the multi-round review process for that review item instance. This single-item re-review process achieves the re-review of a specific review item while retaining a complete historical record, meeting the re-review business requirements in formal review scenarios.
Claims
1. A state machine-driven multi-agent document review method, characterized in that, include: S1. Receive the audit checklist and target documents; The target document is subjected to text extraction and paragraph segmentation to generate document slices with chapter location information; S2. Call the list parsing agent to perform structured parsing of the review list and generate a draft review item; freeze the draft review item after user confirmation as the basis for formal review, and generate a review item instance for each review requirement; S3. Maintain task-level status, audit item-level status, and round-level status for each audit item instance, and define the transition conditions between each status. S4. Under the constraints of the state, perform multiple rounds of auditing for each audit item instance: Check if the current audit item instance's audit item-level status is a valid status that allows auditing to be started; if not, refuse to execute. The auditing agent is invoked to generate the current round of audit conclusions and evidence based on the audit requirements and document slices corresponding to the current audit item instance. After execution, the audit item-level status and round-level status are updated according to the jump conditions. The review agent is invoked to cross-validate the review conclusions based on document slices, output review opinions and the criteria for determining whether to continue to the next round, and after execution, the review item-level status and round-level status are updated according to the jump conditions; Based on the judgment of the review agent, decide whether to continue to the next round or end the current review item according to the jump conditions, and update the review item level status accordingly; S5. After all audit item instances are completed, summarize the audit results of each audit item instance and generate an audit structured report.
2. The state machine-driven multi-agent document review method according to claim 1, characterized in that, S1 divides the target document into paragraph blocks with overlapping contexts and automatically identifies chapter titles and paragraph numbers; when the auditing agent outputs evidence, it automatically supplements the evidence with descriptions of the source chapter and paragraph number.
3. The state machine-driven multi-agent document review method according to claim 1, characterized in that, During the S2 process of generating audit item instances, users can edit and save the audit item draft multiple times. Each save generates a new version and prevents concurrent overwriting. After user confirmation, the list freeze module freezes the draft as the basis for formal audit.
4. The state machine-driven multi-agent document review method according to claim 1, characterized in that, Task-level states constrain the scope of actions that can be invoked throughout the entire lifecycle of a task; audit item-level states constrain the progress of a single audit item instance in multiple iterations. Round-level states are used to constrain the execution progress of each step within a single round for an audit item instance; Task-level statuses should include at least: Under Review, Review Completed, Terminated; Review item-level statuses should include at least: Pending Review, Review in Progress, Review in Progress, Completed, Stopped; Round-level statuses should include at least: In Progress of This Round, Review and Review Completed in This Round, Adopted in This Round. Task-level status, review item-level status, and round-level status are interconnected or constrained by jump conditions.
5. The state machine-driven multi-agent document review method according to claim 1, characterized in that, Under state constraints, S4 performs multiple rounds of audits on each audit item instance, including: Check if the current audit item instance's audit item level status is "Pending Audit". If so, allow execution and update the status to "Audit in Progress". The review agent generates review conclusions and evidence based on the review requirements and document slices corresponding to the current review item instance, and updates the review item-level status to "review in progress" and the round-level status to "review of this round has been completed". The review agent cross-validates the output of the audit agent based on document slices, and outputs review opinions and the basis for determining whether to continue; If the review agent determines that no further review is needed, the review item status will be updated to "Completed"; if it determines that further review is needed, the review item status will be updated to "Pending Review" to start the next round.
6. A state machine-driven multi-agent document review system, characterized in that, The system includes: The task receiving module is used to receive the review list and target document input by the user; The document parsing module is used to extract text and segment paragraphs from the target document, generating document slices with chapter location information. The checklist parsing module is used to call the checklist parsing agent to perform structured parsing of the audit checklist and generate audit item drafts; The checklist freeze module is used to freeze the draft of the review items after user confirmation as the basis for formal review, and to generate a review item instance for each review requirement; The audit execution module calls the audit agent to generate the current audit conclusion and evidence based on the current audit item instance and document slices, and calls the review agent to cross-validate the audit conclusion based on the document slices and output the criteria for whether to continue. The status control module is used to maintain the task-level status, audit item-level status, and round-level status for each audit item instance, and to define the jump conditions between each status. Before the audit is executed, the validity of the status is checked, and after the execution, the corresponding status is updated according to the jump conditions. The results summary module is used to summarize the audit results of each audit item instance after all audit item instances are completed, and generate a structured audit report.
7. A state machine-driven multi-agent document review system according to claim 6, characterized in that, When the results summary module generates the audit structured report, if the review agent determines that no further round of review is needed, the output of the review agent will be used as the final adopted draft. When the preset maximum number of audit rounds is reached, the output of the audit agent will be used as the final adopted draft.
8. A state machine-driven multi-agent document review system according to claim 6, characterized in that, The system also includes a concurrent scheduling module, which is used for: Control different audit item instances to proceed in parallel, and allow each round within the same audit item instance to proceed sequentially; Mutual exclusion tags ensure that the same audit item instance is occupied by only one execution unit. When an audit item instance is completed, the completion count is updated using an atomic auto-increment operation in the database. Once all audit item instances have entered the final state, the status control module will update the task-level status to "audit completed".
9. A state machine-driven multi-agent document review system according to claim 6, characterized in that, The system also includes a re-examination and recovery module, which is used for: When initiating a single item re-review, first archive the historical round records of the review item instance, then generate a new round based on the existing content, and set the review item level status of the review item instance to pending review. When a round fails, recovery or rollback logic is executed to avoid a single point of failure causing the entire task to be interrupted.
10. A state machine-driven multi-agent document review system according to claim 6, characterized in that, The system also includes a data persistence layer, which uses a relational database to store task-level status, audit item-level status, round-level status, audit item instance records, and output version records for each round; and uses object storage to store original files, parsed text, freeze list snapshots, and the final exported structured audit report.
