An error-driven adaptive research process rectification method and system
By modeling the research task as a directed acyclic graph and dynamically adjusting it, errors are identified and corrected, solving the problem of error accumulation in large language models in complex research tasks, and achieving adaptive reconstruction of the research path and improved accuracy of results.
Patent Information
- Application Number
- CN202610829976.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-10
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2046-06-10
AI Technical Summary
Existing large language models suffer from error accumulation problems in complex research tasks due to their reliance on linear or cyclic task chains. This leads to low error correction efficiency, inability to achieve nonlinear reprogramming, and affects the accuracy and reliability of research results.
The research task is modeled as a directed acyclic graph (DAG). Error types are identified through logical verification, and the DAG is dynamically adjusted according to the error type, including deleting erroneous branches, reconstructing the node order, or inserting new nodes, to achieve adaptive reconstruction and correction of the research path.
Through nonlinear programming and dynamic adjustment, directed acyclic graph systems can effectively avoid error accumulation, improve the error correction efficiency and result accuracy of complex research tasks, and ensure the reliability of research results.
Smart Images

Figure CN122363988B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of natural language processing technology, specifically to an error-driven adaptive research process correction method and system. Background Technology
[0002] With the improvement of the performance of Large Language Models (LLMs), information retrieval has evolved from static, single-round searches to multi-step, autonomous research agents. In existing technologies, Retrieval-Augmented Generation (RAG) methods retrieve relevant documents based on vector similarity and inject prompts to generate answers. However, these methods typically employ a static pipeline, lacking strategic planning and dynamic adjustment capabilities for the research process.
[0003] To reduce the illusion of generated content, some systems have introduced self-reflection mechanisms. For example, Self-RAG controls retrieval behavior through reflective tags, while MetaRAG utilizes metacognitive monitoring to adjust cognitive processes. Furthermore, researchers have developed automated evaluation models, such as RAG-Critic, which provides fine-grained error feedback to the generated results by constructing a multi-level error classification system.
[0004] While the aforementioned techniques have made progress in improving the quality of generated data, they still have significant limitations when dealing with complex, high-accuracy deep research tasks. Most deep research agents rely on linear or cyclic task chains, which can easily lead to error accumulation or infinite loops when an error occurs at an intermediate node, making nonlinear reprogramming impossible and resulting in low error correction efficiency. Summary of the Invention
[0005] This invention provides an error-driven adaptive research process correction method and system to address the problem of error accumulation caused by existing large language models in complex research tasks due to their reliance on linear or cyclic task chains, thereby improving the accuracy and reliability of results for long-chain research tasks.
[0006] This invention is achieved through the following technical solution:
[0007] A first aspect of the present invention provides an error-driven adaptive research process correction method, comprising:
[0008] S1, in response to a user request, decompose the research task submitted by the user into multiple subtasks with dependencies, and generate an initial directed acyclic graph based on the dependencies; the nodes of the directed acyclic graph represent subtasks, and the edges represent the execution order or dependencies between subtasks.
[0009] S2. Execute each subtask sequentially according to the execution order or dependency relationship of each subtask in the directed acyclic graph. During or after the execution of each subtask, perform logical verification on the intermediate results generated by the execution to identify whether there are any errors and the types of errors.
[0010] S3, when an error is identified, the error is mapped to a corrective action according to the type of the error;
[0011] S4, the directed acyclic graph is adjusted according to the correction action to obtain an updated directed acyclic graph; the adjustment includes at least one of deleting erroneous branches, reconstructing the node order, and inserting new nodes;
[0012] S5. Based on the updated directed acyclic graph, repeat S2 to S4 until the preset research task completion conditions are met, and generate a research report based on all verified intermediate results.
[0013] As a preferred embodiment, the step of decomposing the user-submitted research task into multiple sub-tasks with dependencies, and generating an initial directed acyclic graph based on the dependencies, includes:
[0014] Identify the key research questions in the research task;
[0015] Based on the logical structure and knowledge system of the key research questions, the research task is decomposed from top to bottom into multiple independently executable sub-problems, and each sub-problem is defined as a sub-task.
[0016] Analyze the dependencies between the input and output data of each subtask, determine the execution order or parallel relationship of each subtask, and generate the initial directed acyclic graph accordingly.
[0017] In a preferred embodiment, the step of logically verifying the intermediate results generated during execution to identify whether errors exist and the types of errors includes:
[0018] The intermediate results are input into a pre-trained critique model to obtain the error labels output by the critique model, and the error type is determined based on the error labels.
[0019] The training method for the critical model is as follows:
[0020] Construct a multi-level error classification system, which includes at least a first-level error category, a second-level error subcategory, and an atomic-level error label from top to bottom;
[0021] Obtain a training dataset containing multiple intermediate sample results, and label each intermediate sample result with one or more atomic error labels belonging to the multi-level error classification system;
[0022] Using the training dataset, the basic language model is trained through supervised fine-tuning and direct preference optimization techniques to obtain the critical model; the critical model is used to map the intermediate results of the input to one or more atomic error labels in the multi-level error classification system.
[0023] As a preferred embodiment, the method further includes, before inputting the intermediate results into a pre-trained critical model:
[0024] Obtain the intermediate results of the current subtask and the historical interaction information related to the current research task to form the interaction sequence to be processed;
[0025] The interaction sequence is processed using a task-aware context compression technique; the processing includes: calculating a retention probability for each token in the interaction sequence through a learnable linear projection layer, the retention probability being used to characterize the relevance of the token to the current research task;
[0026] Based on the retention probability, tokens with a retention probability higher than a preset threshold are selected from the interaction sequence, and the selected tokens are used to form compressed context information.
[0027] The compressed context information is then input into a pre-trained critical model.
[0028] As a preferred embodiment, mapping the error to a corrective action based on the type of the error includes:
[0029] Construct a library of correction actions containing multiple predefined correction functions; the atomic correction functions are used to perform specific correction operations, including: query rewriting operation, supplementary retrieval operation, information refinement operation, and source verification operation;
[0030] A mapping table is pre-established from the error type to the correction function. After the error and its type are identified, the mapping table is queried to determine one or more correction functions that need to be called.
[0031] One or more of the aforementioned correction functions are combined to generate an executable correction action.
[0032] As a preferred embodiment, adjusting the directed acyclic graph according to the correction action to obtain an updated directed acyclic graph includes:
[0033] The corrective actions are converted into executable code;
[0034] The executable code is executed to adjust the nodes and edges of the directed acyclic graph to obtain an updated directed acyclic graph.
[0035] In a preferred embodiment, the method further includes assigning an independent context window to each independent error when multiple independent errors are identified in step S2;
[0036] In different computing instances or threads, the error correction operation is executed in parallel based on their respective independent context windows;
[0037] The execution results of each parallel correction operation are collected and integrated by the supervisory coordinator, and the directed acyclic graph and intermediate result set are updated by the integrated execution results.
[0038] In a preferred embodiment, the method further includes: if, during the execution of each sub-task, evidence obtained from multiple different information sources concerning the same sub-task contains factual conflicts, then a consensus verification process is triggered.
[0039] The consensus verification process includes: performing consistency analysis and confidence assessment on multiple conflicting pieces of evidence; selecting the evidence with the highest confidence from the multiple pieces of evidence as valid evidence based on the assessment results, which will be used for subsequent sub-task execution or research report generation; and establishing a citation association between each statement in the generated research report and its source evidence.
[0040] As a preferred embodiment, the research completion conditions include: all subtasks are successfully executed and no new errors are detected, or the number of iterations reaches a preset upper limit.
[0041] A second aspect of the present invention provides an error-driven adaptive research process correction system, comprising:
[0042] The task planning unit is used to respond to user requests by decomposing the research task submitted by the user into multiple subtasks with dependencies, and generating an initial directed acyclic graph based on the dependencies; the nodes of the directed acyclic graph represent subtasks, and the edges represent the execution order or dependencies between subtasks.
[0043] The dynamic execution unit is used to execute each subtask sequentially according to the execution order or dependency relationship of each subtask in the directed acyclic graph.
[0044] The error correction triggering unit performs logical verification on the intermediate results generated during or after the execution of each subtask to identify whether errors exist and their types; when an error is identified, it maps the error to an error correction action according to the type of the error.
[0045] The path reconstruction unit is used to adjust the directed acyclic graph according to the correction action to obtain an updated directed acyclic graph; the adjustment includes at least one of deleting erroneous branches, reconstructing the node order, and inserting new nodes;
[0046] The iterative output unit is used to repeatedly drive the dynamic execution, correction triggering unit and path reconstruction unit based on the updated directed acyclic graph until the preset research task completion conditions are met, and to obtain all intermediate results that have passed logical verification.
[0047] The report generation unit is used to generate research reports based on all intermediate results that have passed logical verification.
[0048] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0049] This invention achieves nonlinear programming of the research process by modeling the research task as a directed acyclic graph (DAG), overcoming the shortcomings of existing technologies that rely on linear or cyclic task chains. By introducing logical verification and error identification during execution, the DAG is dynamically adjusted based on the error type when an error is detected (including deleting erroneous branches, reconstructing node order, or inserting new nodes), achieving adaptive reconstruction of the research path. This effectively avoids error accumulation, and through iterative execution, ensures the accuracy and reliability of the research results. Compared to existing technologies, this invention improves the error correction efficiency and execution quality of complex research tasks, reducing deviations caused by error accumulation. Attached Figure Description
[0050] To more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be considered as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort. In the drawings:
[0051] Figure 1 This is a flowchart of an error-driven adaptive research process correction method according to an embodiment of the present invention;
[0052] Figure 2 This is a flowchart of a method for generating a directed acyclic graph according to an embodiment of the present invention;
[0053] Figure 3 This is a comparison diagram of a directed acyclic graph before and after modification according to an embodiment of the present invention;
[0054] Figure 4 This is a schematic diagram of a loop execution based on correction triggering according to an embodiment of the present invention;
[0055] Figure 5 This is a flowchart illustrating the processing of an intermediate result according to an embodiment of the present invention. Detailed Implementation
[0056] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention.
[0057] It should be noted that the terms "comprising" and "having" and any variations thereof in the specification, claims, and accompanying drawings of this invention are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to other steps or units inherent in the device.
[0058] The terminology used in the various embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to limit the various embodiments of the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of the invention pertain. The terms (such as those defined in commonly used dictionaries) are to be interpreted as having the same meaning as in the context of the relevant technical field and are not to be interpreted as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of the invention.
[0059] The purpose of this invention is to provide an error-driven adaptive research process correction method and system that solves common problems such as error accumulation, factual conflicts, and information loss in in-depth research through automated diagnosis, strategy reconstruction, and closed-loop execution.
[0060] Please see Figure 1 , Figure 1 The present invention illustrates the execution flow of an error-driven adaptive research process correction method, which dynamically optimizes the research path by quantifying the prediction error between the expected target and the actual result, including the following steps.
[0061] S1, in response to the user's request, decomposes the research task submitted by the user into multiple sub-tasks with dependencies, and generates an initial directed acyclic graph (DAG) based on the dependencies.
[0062] In this directed acyclic graph, each node represents a subtask, and the edges represent the execution order or dependencies between subtasks.
[0063] S2 executes each subtask sequentially according to the execution order or dependency relationship of each subtask in the directed acyclic graph. During or after the execution of each subtask, it performs logical verification on the intermediate results to identify whether there are errors and the types of errors.
[0064] Logical verification of the intermediate results generated during execution mainly involves checking whether the intermediate results contain incomplete information, factual errors, logical contradictions, or missing relevance. Verification methods can be based on pre-defined rules or classification systems. For example, by using a pre-constructed error classification system, the intermediate results can be compared with error patterns in the system to identify whether errors exist and their types.
[0065] S3, Error-Driven Correction Trigger: When an error is identified, it is mapped to a correction action based on the type of error.
[0066] By pre-establishing an error type-correction action mapping table, error types are mapped to corrective actions. This mapping table records the correspondence between various error types and their corresponding corrective actions. For example, for an error of type "incomplete information," the mapped corrective action could be "supplementary retrieval"; for an error of type "factual error," the mapped corrective action could be "re-retrieve and verify the source." Once the error type is identified, the corrective action to be performed can be quickly determined by querying this mapping table.
[0067] In this step, the correction action can be a single operation or a combination of multiple operations.
[0068] S4. Adjust the directed acyclic graph according to the correction action to obtain the updated directed acyclic graph; the adjustment includes at least one of deleting erroneous branches, reconstructing the node order, and inserting new nodes.
[0069] Different corrective actions trigger different adjustment methods. For example, when the corrective action is "supplementary retrieval," the corresponding adjustment method is usually to insert a new node, that is, to add a sub-task node to perform the supplementary retrieval operation; when the corrective action is "delete erroneous node," the corresponding adjustment method is to delete the erroneous branch, that is, to remove the sub-task node that caused the error and its related edges; when the corrective action is "replan the path," the corresponding adjustment method is to reconstruct the node order, that is, to adjust the execution order or dependencies of nodes in the DAG.
[0070] The adjustment method can be to generate DAG modification instructions based on the correction action, and then add, delete, or modify the nodes and edges of the DAG through graph editing operations to obtain the updated DAG.
[0071] S5, based on the updated directed acyclic graph, repeat S2 to S4 until the preset research task completion conditions are met, and generate a research report based on all validated intermediate results.
[0072] The research task can be completed when all subtasks are successfully executed without detecting new errors, or when the number of iterations reaches a preset upper limit. Here, all validated intermediate results refer to the outputs of all logically verified error-free subtasks during multiple iterations. Since the DAG may be dynamically adjusted during iteration, and some old nodes may be deleted or replaced, the intermediate results used to generate the final research report should only include the results produced by all successfully executed and validated subtasks in the latest iteration.
[0073] All subtask outputs that have been logically verified to be error-free are stored in the state management module to ensure their accuracy and timeliness. For example, if a node produces an incorrect result in the first iteration but is corrected in the second iteration, the final report uses the corrected result.
[0074] This embodiment transforms a large language model from a simple text generator into an intelligent agent system with self-evaluation, error classification, and autonomous error correction capabilities through a closed-loop workflow of generation-critique-planning-execution. By modeling the research task as a directed acyclic graph (DAG), the system can perform nonlinear programming; by dynamically adjusting the DAG, the system can adaptively optimize the research path; during task execution, it automatically identifies errors, analyzes their causes, and performs corrective actions. Through iterative iteration, the system can continuously improve the accuracy and reliability of the results, significantly reducing the bias caused by error accumulation in long-chain tasks.
[0075] In a preferred embodiment, such as Figure 2 As shown, step S1 includes the following sub-steps:
[0076] S1-1, Identify the key research questions in the research task;
[0077] S1-2, based on the logical structure and knowledge system of the key research questions, decompose the research task from top to bottom into multiple independently executable sub-problems, and define each sub-problem as a sub-task;
[0078] S1-3 Analyze the dependencies between the input and output data of each subtask, determine the execution order or parallel relationship of each subtask, and generate an initial directed acyclic graph based on this.
[0079] Specifically, the core entities, relationships, and objectives in user requests can be extracted using natural language processing techniques to identify key research questions. For the research task of "the impact of climate change on grassland biodiversity," it can be broken down into four sub-questions: "the impact of climate change on grassland plant species richness," "the impact of climate change on grassland animal habitats," "the impact of climate change on grassland ecosystem functions," and "correlation analysis of various impact dimensions of grassland biodiversity." Each sub-question is defined as an executable subtask. The first three subtasks are independent and can be executed in parallel. The fourth subtask takes the outputs of the first three subtasks as input and therefore must be executed after the first three subtasks are completed. Based on this dependency relationship, an initial directed acyclic graph (DAG) is generated. This DAG contains four nodes (corresponding to the four subtasks), with the first three nodes being parallel nodes and the fourth node being a subsequent node. Edges represent the execution dependencies from the first three nodes to the fourth node.
[0080] In a practical system, step S1 can be executed by a research planning module (Planner Agent). This module, based on a large language model, guides the task decomposition and dependency analysis through specific prompts. For example, a prompt could be designed as: "Please decompose the research task 'The Impact of Climate Change on Grassland Biodiversity' into several independently executable subtasks and analyze the dependencies between them, outputting the results in the form of a directed acyclic graph (DAG)." The research planning module outputs a JSON-formatted DAG description, containing a list of nodes and edges.
[0081] In step S2, for the research task of "the impact of climate change on grassland biodiversity", the first three subtasks are executed in parallel by multi-threading according to the execution order of each subtask in the initial directed acyclic graph. After each subtask is completed, the intermediate results generated are logically verified.
[0082] The execution of subtasks involves invoking an Executor Agent, following a ReAct inference loop of "think-decision-action," and using tools such as Firecrawl or Tavily to search the internet, obtain external evidence, and generate intermediate results for each subtask. For example, the intermediate result of the subtask "Impact of Climate Change on Grassland Plant Species Richness" is "Climate change leads to a 10%-15% decrease in grassland plant species richness in Europe."
[0083] In a preferred embodiment, in step S2, the intermediate results are logically verified using a pre-trained critical model. The critical model is built upon an error label output from a multi-level error classification system, wherein the multi-level error classification system includes at least three levels of error labels built from top to bottom: a first-level error category, a second-level error subcategory, and an atomic-level error label, wherein:
[0084] Level 1 errors include 7 core categories: incomplete information, factual errors, redundant information, logical inconsistencies, context mismatch, and insufficient evidence.
[0085] Level 2 error subcategories further refine the Level 1 error categories into 19 categories, such as contextual comprehension errors, insufficient search coverage, temporal confusion, path deviation, improper evidence weighting, and multi-source conflicts.
[0086] Atomic-level error labeling (Level 3): Contains over 4,000 specific error labels, used to precisely locate micro-fault points in the research process.
[0087] Atomic-level tags are automatically summarized from a large number of error instances through hierarchical clustering algorithms and combined with manual verification, enabling them to accurately describe various specific problems. For example, the atomic-level error tag "insufficient geographical coverage" belongs to the second-level subcategory "insufficient search coverage," which is further classified into the first-level category "incomplete information."
[0088] Multiple intermediate sample results are obtained, and each intermediate sample result is labeled with one or more atomic error labels belonging to the multi-level error classification system, forming a training dataset. Specifically, LLM annotation and hierarchical clustering algorithms can be used to identify the original errors in the intermediate sample results, combined with manual summarization and correction of mechanical labels to ensure that the classification system covers fine-grained dimensions such as retrieval noise, factual conflicts, and logical drift.
[0089] By employing supervised fine-tuning and direct preference optimization techniques, a critical model is trained on a basic language model using intermediate sample results as input. This critical model maps intermediate input results to one or more atomic error labels within a multi-level error classification system. When a predefined error exists in the intermediate result, the model outputs one or more corresponding atomic error labels.
[0090] In the supervised fine-tuning phase, labeled training data is used to train the model to generate correct error labels by minimizing cross-entropy loss. In the direct preference optimization phase, contrastive sample pairs containing correct and incorrect labels are constructed. By optimizing the model's preference probability for correct labels, the accuracy of fine-grained error identification is further improved.
[0091] In this embodiment, the critical model outputs an error label of "incomplete information - insufficient geographic coverage" for the intermediate result of "the impact of climate change on grassland plant species richness" "climate change leads to a 10%-15% decrease in grassland plant species richness in Europe". That is, it identifies that the intermediate result of this subtask has an error of incomplete information (Level 1) and the specific error type is insufficient geographic coverage (Level 2).
[0092] In step S3, when an error is identified, the specific method for mapping the error to a corrective action based on the error type can be as follows: A corrective mapping table is pre-built to establish a mapping relationship between error types and corrective strategies. For a specific identified error type, a predefined corrective strategy is automatically matched. For example: for the "incomplete information" error type, "query rewriting" and "supplementary retrieval" are triggered; for the "fact conflict" error type, "multi-agent consensus verification" or "authoritative source priority" strategies are initiated; for the "information redundancy" error type, the "content refinement" corrective strategy is executed; and for the "ambiguous context" error type, the "delete specific fragment" corrective strategy is executed.
[0093] In a preferred embodiment, a correction action library is constructed, containing multiple predefined correction functions. These correction functions perform specific corrective operations, such as query rewriting, supplementary retrieval, information refinement, and source verification. A mapping table is pre-established from error types to various correction functions. Once an error and its type are identified, the mapping table is queried to determine one or more correction functions to be invoked. By combining these invoked functions, an executable correction action is generated.
[0094] Furthermore, adjusting the directed acyclic graph based on the correction actions can be achieved by converting the correction actions into executable code, running the code on the directed acyclic graph, adjusting the nodes and edges, and obtaining the updated directed acyclic graph.
[0095] Specifically, the correction actions are translated into executable Python code. For example, for the deficiency type of insufficient geographic coverage, a supplementary retrieval correction action is initiated. The execution logic of this code is as follows: a new node is inserted after the subtask node "Impact of Climate Change on Grassland Plant Species Richness". The new node corresponds to the subtask "Supplementary Retrieval and Analysis of the Impact of Global Grassland Plant Species Richness". This Python code is executed in a sandbox execution environment. During execution, the code calls the corresponding tools or modules, generates new intermediate results, or directly modifies the DAG description. If the correction action involves inserting a new node, the node list and edge list are updated; if it involves deleting a node, invalid nodes and their associated edges are removed; if it involves reconstructing the node order, the direction of the edges is adjusted. In this example, the original four nodes in the directed acyclic graph are retained, and a new node is inserted as the successor node to the "Impact of Climate Change on Grassland Plant Species Richness" node. The output of the new node is used as one of the input data for the original fourth node "Correlation Analysis of Various Impact Dimensions of Grassland Biodiversity", resulting in an updated directed acyclic graph.
[0096] like Figure 3The diagram shows a comparison of a directed acyclic graph (DAG) before and after modification. The original DAG contains nodes TaskA, TaskB, TaskC, TaskD, and TaskE, with edges from TaskA to TaskB, TaskB to TaskC, TaskC to TaskD, and TaskE to TaskB. TaskA and TaskE are parallel subtasks. When the critical model detects a serious factual error in the execution result of node TaskC, the system deletes node TaskC and its associated edges, inserts a new node TaskF (re-executing task C using a different retrieval strategy), and simultaneously establishes the edge from TaskB to TaskF to TaskD, resulting in the updated DAG.
[0097] In practical systems, a dedicated planning agent is introduced to autonomously arrange corrective action sequences based on critical feedback, generating an executable Python solution program.
[0098] If an error is detected, the system enters a state-driven closed-loop execution process. Based on the error type, the system dynamically adjusts the nodes of the directed acyclic graph, deletes erroneous branches, or inserts new exploration paths. The executing agent follows the ReAct inference loop of "think-decision-action," adjusting the retrieval strategy at each step based on intermediate discovery and correction instructions, rather than simply backtracking linearly.
[0099] Set research task completion conditions. The loop stops executing when the execution result meets these conditions. These conditions include: all subtasks executed successfully without detecting any new errors; or the number of iterations reaches a preset upper limit. Successful execution of all subtasks without detecting any new errors means that all subtasks corresponding to all nodes in the directed acyclic graph (DAG) have been completed, and the critique model did not output any error labels in the latest iteration. The number of iterations refers to the number of loops from step S2 to S4, i.e., the number of times the DAG is dynamically adjusted.
[0100] See Figure 4 , Figure 4 The diagram illustrates a loop execution method based on correction triggering according to the present invention, including the following process:
[0101] 1. After the system starts, it first executes the current subtask and generates intermediate results;
[0102] 2. Subsequently, the critique module performs logical checks on the intermediate results, detects one or more errors (such as incomplete information, factual conflicts, and information redundancy), outputs the errors and error types, generates an error report, and triggers the error-correction action mapping;
[0103] 3. Determine the corresponding correction action for each error based on the correction mapping table, pass the correction action to the planning agent, autonomously arrange the sequence of correction actions, generate an executable correction program, and send it to the execution module;
[0104] 4. The execution module adjusts the current directed acyclic graph to obtain the updated directed acyclic graph.
[0105] 5. Subsequently, based on the updated directed acyclic graph, the system continues to execute the next subtask or re-executes the adjusted subtask, entering a new loop. This process repeats until the research task completion conditions are met, and finally, a research report is generated based on all validated intermediate results.
[0106] An example of repeatedly performing operations S2 to S4 based on the updated directed acyclic graph is as follows:
[0107] 1. Execute the newly inserted subtask "Supplementary search and analysis of the impact of global grassland plant species richness" to generate new intermediate results (covering data on changes in grassland plant species richness in various regions of the world).
[0108] 2. Logical verification of the new intermediate results revealed no errors.
[0109] 3. If there are no errors, there is no need to generate correction actions or adjust the directed acyclic graph;
[0110] 4. Continue executing the original fourth subtask, "Correlation Analysis of Various Influencing Dimensions of Grassland Biodiversity." After execution, the logic verification showed no errors.
[0111] 5. At this point, all subtasks in the directed acyclic graph have been successfully executed and no new errors have been detected, satisfying the research task completion condition, and the iteration stops.
[0112] The intermediate states and correction records of each round of iterative execution are persistently stored by the state management module to ensure that information loss or redundant retrieval is avoided in long-term research tasks.
[0113] Finally, based on all the intermediate results that have passed logical verification, a research report is generated. Each statement in the report establishes a citation association with the source evidence, covering the impacts of climate change on various dimensions of global grassland biodiversity and the relationships between these dimensions.
[0114] If the number of iterations of the research task reaches the preset upper limit during the iteration process, the iteration will stop even if there are still a few non-core errors. A research report will be generated based on the existing verified intermediate results, and the uncorrected errors and related explanations will be marked in the report.
[0115] In a preferred embodiment, such as Figure 5As shown, during step S2, before inputting the intermediate results of each subtask into the pre-trained critical model, the intermediate results are further processed as follows:
[0116] S2-1: Obtain the intermediate results of the current subtask and the historical interaction information related to the current research task to form the interaction sequence to be processed;
[0117] S2-2 employs a task-aware context compression technique to process the interaction sequence: a learnable linear projection layer is used to calculate the retention probability for each token in the interaction sequence, which characterizes the relevance of the token to the current research task.
[0118] S2-3, based on the retention probability of each token, select tokens with a retention probability higher than a preset threshold from the interaction sequence, and use the selected tokens to form compressed context information.
[0119] Finally, the compressed contextual information is fed into the pre-trained critical model.
[0120] In this embodiment, historical interaction information refers to the intermediate results generated in previous rounds, the output of the critical model, records of corrective actions, and various contextual data stored in the state management module during the execution of the current research task. This information is organized in chronological order and together with the intermediate results of the current subtask, constitutes the interaction sequence to be processed.
[0121] In step S2-2, a learnable linear projection layer is used to linearly transform the embedding representation of each token in the interaction sequence to obtain the retention probability of that token. The parameters of the linear projection layer are obtained through training, with the training objective being to maximize the verification accuracy of the compressed context information on the critique model. The retention probability can be expressed as:
[0122] ;in For the first Embedding vectors of tokens, and For learnable weights and biases, This represents the sigmoid function, and its output value is... This is a probability estimate of the relevance of the token to the current research task.
[0123] Based on retention probabilities, tokens with retention probabilities higher than a preset threshold (e.g., 0.5) are selected from the interaction sequences, and these selected tokens are used to construct compressed context information. This compressed context information retains key details highly relevant to the current research task while filtering out noise and redundant information.
[0124] Tokens with high probability are often key information relevant to the task, and retaining them ensures that the context needed for correction is not lost; discarding tokens with low probability can reduce interference and computation, thereby reducing computational overhead and improving inference speed when inputting into the critical model.
[0125] In a preferred embodiment, when multiple independent errors are identified in step S2, an independent context window is assigned to each independent error for correction.
[0126] First, a separate context window is assigned to each individual error. The context window is an independent memory space used to store historical interaction information, intermediate results, critical model output, etc., related to the error, ensuring that the correction processes for different errors do not interfere with each other.
[0127] Secondly, in different computational instances or threads, error correction operations for each error are executed in parallel based on their respective independent context windows. These error correction operations include: inputting the intermediate results corresponding to the error into the critical model for further verification (optional), mapping error correction actions according to the error type, converting the error correction actions into executable code, and executing the code to perform local adjustments to the directed acyclic graph. That is, each parallel task is responsible for generating a local adjustment scheme for the directed acyclic graph for that error (e.g., inserting new nodes, deleting nodes, etc.), and may generate new intermediate results (such as supplementing the search results).
[0128] Then, a supervisory coordinator collects the execution results of each parallel correction operation. The supervisory coordinator integrates the local adjustment schemes of the directed acyclic graph (DAG) generated by multiple parallel tasks, resolves potential conflicts (e.g., two tasks simultaneously suggesting modifications to the same node or edge), and merges these adjustments according to preset priorities or rules to generate a globally consistent DAG update scheme. Simultaneously, the coordinator merges the new intermediate results generated by each task into the global state management module, updating the intermediate result set.
[0129] Finally, based on the coordinated global update scheme, the directed acyclic graph of the current research task is updated as a whole to obtain the updated directed acyclic graph. Subsequent loop execution will be based on the updated directed acyclic graph.
[0130] In this embodiment, the parallel error correction mechanism avoids interference between context information of different error correction tasks. Since each error has an independent context window, the processing of different errors will not be confused. At the same time, the supervisory coordinator ensures the consistency and integrity of the global update scheme, avoids conflicts between multiple local adjustments, and significantly improves error correction efficiency.
[0131] In a preferred embodiment, step S2 further includes: if, during the execution of each subtask, there is a factual conflict in the evidence content obtained from multiple different information sources concerning the same subtask, then a consensus verification process is triggered.
[0132] First, detect whether there are factual conflicts among multiple sources of evidence, which can be determined through natural language reasoning techniques or semantic similarity comparison.
[0133] The consensus verification process includes: consistency analysis and confidence assessment of multiple conflicting pieces of evidence. One approach is to use a multi-agent voting mechanism, where multiple independent agents (e.g., different language model instances) vote on the credibility of each piece of evidence, and the evidence with the highest confidence is selected as valid evidence based on the voting results (e.g., a 3 / 4 majority vote). Another approach is Bayesian confidence weighting, which calculates the posterior confidence of each piece of evidence based on prior information such as the authority of the information source and historical accuracy, combined with the consistency of the evidence content, and selects the evidence with the highest confidence.
[0134] The selected valid evidence will be used for subsequent subtask execution or research report generation. Specifically, if the current subtask is not yet completed, the valid evidence will be used as input for that subtask and participate in subsequent calculations; if the subtask has been completed, the valid evidence will be stored in the status management module as material for the final research report. When generating the research report, the report generation module will add source citations to each statement. The citations are the source information of the selected valid evidence (such as URLs, document IDs, etc.), ensuring the traceability and authority of the report.
[0135] By introducing a consensus verification mechanism, the method of this invention can effectively solve the problem of cross-source information conflict, avoid the model using erroneous or contradictory information, and significantly improve the stability and credibility of research conclusions. This mechanism can automatically filter low-quality sources and identify excessive correlation of irrelevant facts, thereby enhancing the authority of research reports.
[0136] Based on the same inventive concept, embodiments of the present invention also provide an error-driven adaptive research process correction system, comprising:
[0137] The task planning unit is used to respond to user requests, decompose the research task submitted by the user into multiple subtasks with dependencies, and generate an initial directed acyclic graph based on the dependencies; the nodes of the directed acyclic graph represent subtasks, and the edges represent the execution order or dependencies between subtasks.
[0138] The dynamic execution unit is used to execute each subtask sequentially according to the execution order or dependency relationship of each subtask in the directed acyclic graph.
[0139] The error correction triggering unit performs logical verification on the intermediate results generated during or after the execution of each subtask to identify whether errors exist and their types; when an error is identified, it maps the error to an error correction action based on the error type.
[0140] The path reconstruction unit is used to adjust the directed acyclic graph according to the correction action to obtain an updated directed acyclic graph; the adjustment includes at least one of deleting erroneous branches, reconstructing the node order, and inserting new nodes;
[0141] The iterative output unit is used to repeatedly drive the dynamic execution, correction triggering unit and path reconstruction unit based on the updated directed acyclic graph until the preset research task completion conditions are met, and to obtain all intermediate results that have passed logical verification.
[0142] The report generation unit is used to generate research reports based on all intermediate results that have passed logical verification.
[0143] Furthermore, the dynamic execution unit includes a critical model, which is trained using a pre-built multi-level error classification system and a training dataset, with the specific training method described above.
[0144] Furthermore, the dynamic execution unit also includes a context compression module, which performs task-aware context compression on the interaction sequence containing intermediate results and historical interaction information before inputting the intermediate results into the critical model, and filters out tokens that are highly relevant to the current research task to form compressed context information.
[0145] Furthermore, the error correction triggering unit includes an error correction action library and a mapping table. The error correction action library contains multiple predefined atomic error correction functions, and the mapping table establishes a mapping from error types to error correction functions.
[0146] Furthermore, the path refactoring unit includes a code generator and an execution sandbox, which are used to transform the correction actions into executable code and run it in the sandbox environment to achieve dynamic adjustment of the directed acyclic graph.
[0147] Furthermore, the system also includes a parallel error correction manager, which assigns an independent context window to each error when multiple independent errors are identified, performs error correction operations in parallel, and coordinates the integration of results.
[0148] Furthermore, the system also includes a consensus verification module, which is used to screen out valid evidence through consistency analysis and confidence assessment when there are factual conflicts in the evidence, and to establish citation associations for the final report.
[0149] The following examples illustrate the application of the present invention in specific long-chain research tasks.
[0150] Example 1: Automated Scientific Review Generation Based on a Generate-Critique-Plannext-Execution Closed Loop
[0151] This example demonstrates how the system can handle a complex scientific retrieval task, such as “analyzing the impacts of climate change on grassland biodiversity”, and perform autonomous correction.
[0152] 1. Task planning and DAG construction:
[0153] 1.1 Initial Planning: The planning agent receives the research task, decomposes it into 3-7 interrelated sub-problems (such as "change in species distribution", "impaired nutrient cycling", etc.), and generates a directed acyclic graph (DAG).
[0154] 1.2 Topology Execution: The system starts tasks according to the dependencies of the DAG, identifies parallel paths that can be processed in parallel, and executes the parallel paths in parallel.
[0155] 2. Multi-round iterative retrieval and execution:
[0156] 2.1 ReAct Inference Loop: The Executor Agent follows a think-decision-action loop, using tools such as Firecrawl and Tavily to perform internet searches;
[0157] 2.2 State Maintenance: The retrieved external information summary and intermediate inference results are written to the state management module to ensure the persistence of information across multiple rounds of search.
[0158] 3. Fine-grained error diagnosis:
[0159] 3.1 Diagnostic Interception: The Critic Agent intercepts intermediate output results and evaluates them using the three-level error system constructed in this invention (which includes 7 primary error categories, 19 secondary subcategories, and more than 4,000 atomic error labels).
[0160] 3.2 Error Example: If the system finds that the retrieved evidence only covers the European region, the critical agent will label it with the errors "incomplete information" and "insufficient geographical coverage".
[0161] 4. Adaptive Corrective Planning and Execution:
[0162] 4.1 Error-Action Mapping: The Planner Agent queries the action mapping table based on the diagnostic labels. For "Insufficient Geographic Coverage," it automatically matches a Rewrite Query and appends the retrieval action.
[0163] 4.2 Programmatic Revision: The Planner Agent generates a Python executable program (rewritten_query=Rewrite Query(question,"expand_geography")), which is run by the executor in a sandbox environment to obtain supplementary evidence from North America or Asia;
[0164] 5. Consensus Verification and Report Synthesis:
[0165] 5.1 Conflict Resolution: If evidence from different sources contradicts each other, the consensus verification module will output the most stable conclusion through multi-agent logical verification or confidence weighting.
[0166] 5.2 One-click generation: The synthetic agent (Writer Agent) extracts all verified "learnings" and generates a Markdown research report with sentence-level citation tags.
[0167] Example 2: Analysis task for "Patent Infringement Assessment of Small Molecule Drugs"
[0168] In fields with extremely low tolerance for error, such as patent analysis, a FactChecker agent is introduced in the adaptive correction planning and execution phase to achieve more stringent corrections, including:
[0169] Structure matching error: When the system mistakenly identifies a certain sulfur heterocyclic structure as a match, the fact-checking agent detects the error of a mismatched skeleton. The fact-checking agent is specifically responsible for verifying the consistency of chemical structures, identifying identification errors by comparing features such as the molecular skeleton and functional groups.
[0170] Forced rollback mechanism: The critical agent triggers "replanning", forcing the system to roll back to the feature extraction stage, re-identify the Markush structure in the patent (a general formula representing a group of chemical structures with common characteristics), the system re-extracts the Markush structure features in the patent claims and compares them with the target molecule until all the constraints of the claims are met, and accurately determines whether there is infringement.
[0171] Compared with the prior art, the present invention has the following beneficial technical effects:
[0172] 1. Significantly reduces generation error rate and illusion rate: Traditional RAG systems are mostly single-round "retrieval-generation" modes, lacking quality monitoring of intermediate results, which makes it easy for erroneous information to accumulate in the generation chain; This invention introduces the RAG-Critic framework, which realizes automated evaluation of best practices through a "generation-critique-planning-execution" closed loop, effectively suppressing factual errors and logical gaps.
[0173] 2. High precision in identifying micro-level errors: Existing systems typically only perform coarse-grained right-or-wrong judgments, lacking a deep understanding of the causes of errors; this invention constructs a multi-level error classification system, capable of accurately capturing subtle fault points in the research process. This fine-grained discrimination capability enables the system to automatically match the optimal remedial solution based on the specific error type.
[0174] 3. Achieving dynamic evolution and adaptive planning of research strategies: Existing intelligent agents mostly rely on hard-coded linear workflows, which will crash once they encounter errors that exceed the preset range; This invention introduces a dynamic reconstruction strategy based on directed acyclic graphs (DAGs). When a serious deviation is detected, the system will not simply backtrack, but will generate an error correction program that can be run by a Python executor, dynamically adjusting the research path or adding exploration branches, which greatly enhances the robustness of the system when dealing with open and complex topics.
[0175] 4. Improved computational efficiency and resource utilization: Existing technologies often lead to context window explosion during multi-round retrieval and correction, increasing inference latency and cost. This invention utilizes an alignment-trained correction model, which can surpass general-purpose large models with a scale of over 70 bytes in error recognition accuracy, achieving lightweight and efficient evaluation. It adopts task-aware context compression technology, which greatly reduces inference latency while retaining key correction clues, and can deliver cleaner background information to subsequent stages.
[0176] 5. Improved stability and traceability of cross-source information integration: When information from different sources such as the Internet and internal databases conflicts, the system's integrated consensus verification module uses multi-agent logic verification or Bayesian confidence weighting to ensure that each conclusion in the final output has an accurate sentence-level citation; through multiple rounds of verification, the system can automatically filter low-quality sources and identify excessive correlations of irrelevant facts, significantly improving the authority of research reports.
[0177] Embodiments of the present invention also provide an electronic device including a processor and a memory, wherein the number of processors may be one or more. The memory, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules. The processor executes various functional applications and data processing of the electronic device by running the software programs, instructions, and modules stored in the memory, thereby implementing an error-driven adaptive research process correction method according to any of the above embodiments of the present invention.
[0178] The memory may primarily comprise a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function; the data storage area may store data created based on terminal usage. Furthermore, the memory may include high-speed random access memory (RAM) and non-volatile memory, such as at least one disk storage device, flash memory, or other non-volatile solid-state storage device. In some instances, the memory may further include memory remotely located relative to the processor, which can be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks (LANs), mobile communication networks, and combinations thereof.
[0179] Embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements an error-driven adaptive research process correction method according to any embodiment of the present invention.
[0180] The computer storage medium of this invention can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0181] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0182] Embodiments of the present invention also provide a computer program product that, when run on a computer, causes the computer to execute an error-driven adaptive research process correction method according to any of the above embodiments of the present invention.
[0183] The above embodiments are merely preferred embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the appended claims.
Claims
1. An error-driven adaptive research process correction method, characterized in that, include: S1, in response to the user request, decompose the research task submitted by the user into multiple sub-tasks with dependencies, and generate an initial directed acyclic graph based on the dependencies; The nodes of the directed acyclic graph represent subtasks, and the edges represent the execution order or dependencies between subtasks. S2. Execute each subtask sequentially according to the execution order or dependency relationship of each subtask in the directed acyclic graph. During or after the execution of each subtask, perform logical verification on the intermediate results generated by the execution to identify whether there are any errors and the types of errors. S3, when an error is identified, the error is mapped to a corrective action according to the type of the error; S4, the directed acyclic graph is adjusted according to the correction action to obtain an updated directed acyclic graph; the adjustment includes at least one of deleting erroneous branches, reconstructing the node order, and inserting new nodes; S5. Based on the updated directed acyclic graph, repeat S2 to S4 until the preset research task completion conditions are met, and generate a research report based on all intermediate results that have passed logical verification. The logical verification of the intermediate results generated during execution, identifying whether errors exist and their types, includes: The intermediate results are input into a pre-trained critique model to obtain the error labels output by the critique model, and the error type is determined based on the error labels. The training method for the critical model is as follows: Construct a multi-level error classification system, which includes at least a first-level error category, a second-level error subcategory, and an atomic-level error label from top to bottom; Obtain a training dataset containing multiple intermediate sample results, and label each intermediate sample result with one or more atomic error labels belonging to the multi-level error classification system; Using the training dataset, the basic language model is trained through supervised fine-tuning and direct preference optimization techniques to obtain the critical model; the critical model is used to map the intermediate results of the input to one or more atomic error labels in the multi-level error classification system.
2. The error-driven adaptive research process correction method according to claim 1, characterized in that, The process of decomposing the user-submitted research task into multiple sub-tasks with dependencies, and generating an initial directed acyclic graph based on these dependencies, includes: Identify the key research questions in the research task; Based on the logical structure and knowledge system of the key research questions, the research task is decomposed from top to bottom into multiple independently executable sub-problems, and each sub-problem is defined as a sub-task. Analyze the dependencies between the input and output data of each subtask, determine the execution order or parallel relationship of each subtask, and generate the initial directed acyclic graph accordingly.
3. The error-driven adaptive research process correction method according to claim 1, characterized in that, The method further includes, before feeding the intermediate results into a pre-trained critical model: Obtain the intermediate results of the current subtask and the historical interaction information related to the current research task to form the interaction sequence to be processed; The interaction sequence is processed using a task-aware context compression technique; the processing includes: calculating a retention probability for each token in the interaction sequence through a learnable linear projection layer, the retention probability being used to characterize the relevance of the token to the current research task; Based on the retention probability, tokens with a retention probability higher than a preset threshold are selected from the interaction sequence, and the selected tokens are used to form compressed context information. The compressed context information is then input into a pre-trained critical model.
4. The error-driven adaptive research process correction method according to claim 1, characterized in that, The step of mapping the error to a corrective action based on the type of the error includes: Construct a library of correction actions containing multiple predefined correction functions; the correction functions are used to perform specific correction operations, including: query rewriting, supplementary retrieval, information refinement, and source verification; A mapping table is pre-established from the error type to the correction function. After the error and its type are identified, the mapping table is queried to determine one or more correction functions that need to be called. One or more of the aforementioned correction functions are combined to generate an executable correction action.
5. The error-driven adaptive research process correction method according to claim 1 or 4, characterized in that, The step of adjusting the directed acyclic graph according to the correction action to obtain an updated directed acyclic graph includes: The corrective actions are converted into executable code; The executable code is executed to adjust the nodes and edges of the directed acyclic graph to obtain an updated directed acyclic graph.
6. The error-driven adaptive research process correction method according to claim 1, characterized in that, The method further includes assigning an independent context window to each independent error when multiple independent errors are identified in step S2. In different computing instances or threads, the error correction operation is executed in parallel based on their respective independent context windows; The execution results of each parallel correction operation are collected and integrated by the supervisory coordinator, and the directed acyclic graph and intermediate result set are updated by the integrated execution results.
7. The error-driven adaptive research process correction method according to claim 1, characterized in that, The method further includes: if, during the execution of each sub-task, there is a factual conflict in the evidence content obtained from multiple different information sources concerning the same sub-task, then a consensus verification process is triggered. The consensus verification process includes: performing consistency analysis and confidence assessment on multiple conflicting pieces of evidence; selecting the evidence with the highest confidence from the multiple pieces of evidence as valid evidence based on the assessment results, which will be used for subsequent sub-task execution or research report generation; and establishing a citation association between each statement in the generated research report and its source evidence.
8. The error-driven adaptive research process correction method according to claim 1, characterized in that, The conditions for completing the research task include: all subtasks are successfully executed and no new errors are detected, or the number of iterations reaches a preset upper limit.
9. An error-driven adaptive research process correction system, characterized in that, The system is used to perform the error-driven adaptive research process correction method according to any one of claims 1-8, the system comprising: The task planning unit is used to respond to user requests by decomposing the research task submitted by the user into multiple subtasks with dependencies, and generating an initial directed acyclic graph based on the dependencies; the nodes of the directed acyclic graph represent subtasks, and the edges represent the execution order or dependencies between subtasks. The dynamic execution unit is used to execute each subtask sequentially according to the execution order or dependency relationship of each subtask in the directed acyclic graph. The error correction triggering unit performs logical verification on the intermediate results generated during or after the execution of each subtask to identify whether errors exist and their types; when an error is identified, it maps the error to an error correction action according to the type of the error. The path reconstruction unit is used to adjust the directed acyclic graph according to the correction action to obtain an updated directed acyclic graph; the adjustment includes at least one of deleting erroneous branches, reconstructing the node order, and inserting new nodes; The iterative output unit is used to repeatedly drive the dynamic execution, correction triggering unit and path reconstruction unit based on the updated directed acyclic graph until the preset research task completion conditions are met, and to obtain all intermediate results that have passed logical verification. The report generation unit is used to generate a research report based on all intermediate results that have passed logical verification.
Citation Information
Patent Citations
Large language model reasoning error correction method and device, equipment and medium
CN120197703A
Information processing method and related product
CN121901457A