A multi-agent collaborative processing method and device and computing equipment
By introducing a closed-loop processing mechanism and a directed cyclic graph structure into multi-agent collaborative processing, the task execution plan is dynamically adjusted, solving the problems of accuracy and reliability of task execution results in multi-agent collaborative processing, and realizing automatic adjustment and result optimization.
Patent Information
- Application Number
- CN202611402833.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-10
- Publication Date
- 2026-11-24
AI Technical Summary
How to achieve multi-agent collaborative processing to improve the accuracy and reliability of task execution results.
By introducing a first intelligent agent to evaluate the task execution results obtained by the second intelligent agent, and driving the first intelligent agent to dynamically adjust the task execution plan based on the evaluation results, a closed-loop processing mechanism of task decomposition, execution, result evaluation and feedback adjustment is formed. The task execution plan is automatically adjusted using a directed cyclic graph structure and evaluation feedback mechanism until the preset termination condition is reached.
It improves the accuracy and reliability of task execution results, avoids distortion of final results caused by deviations in the execution of a single subtask, and realizes an automatic adjustment process for multi-agent collaborative processing.
Smart Images

Figure CN123157384A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent agent technology, and in particular to a multi-agent collaborative processing method, apparatus and computing device. Background Technology
[0002] Multi-agent collaborative processing refers to a method of completing complex tasks through cooperation among multiple agents with independent decision-making capabilities. Its technical essence lies in breaking down complex tasks into multiple independently executable sub-tasks, and achieving the collaborative completion of the overall task through information exchange and task scheduling between agents. Therefore, how to implement multi-agent collaborative processing and how to improve the accuracy and reliability of task execution results have become unresolved technical problems. Summary of the Invention
[0003] This application provides a multi-agent cooperative processing method, apparatus, and computing device for realizing multi-agent cooperative processing and improving the accuracy and reliability of task execution results.
[0004] Firstly, this application provides a multi-agent cooperative processing method. This method can be executed by a computing device with data processing capabilities, or by a cluster of computing devices including multiple computing devices; this application does not limit the execution in this regard. The method includes the following steps: In response to receiving a task request, the first intelligent agent is invoked to decompose the task request and generate a task execution plan corresponding to the task request; The task execution plan is a directed cyclic graph, where the nodes of the task execution plan indicate the executable subtasks obtained by decomposing the task request, the edges between the nodes indicate the dependencies between the executable subtasks, and the task execution plan is configured to support the cyclic iteration of the execution process. According to the task execution plan, the second agent corresponding to the executable subtask is invoked to process the executable subtask and obtain the task execution result; the first agent is invoked to evaluate the task execution result and obtain the evaluation result. If the evaluation result indicates that the task execution result is passed, output the task execution result; If the evaluation result indicates failure, the first agent is invoked to adjust the task execution plan to generate an updated task execution plan. Based on the updated task execution plan, the second agent and the first agent are invoked again to perform task execution and evaluation operations in sequence until the preset termination condition is met.
[0005] Optionally, the preset termination condition includes at least one of the following conditions: the evaluation result indicates that the test is passed, the preset number of iterations is reached, the preset execution time is reached, or a user-initiated termination instruction is received.
[0006] Optionally, the step of invoking the second agent corresponding to the executable subtask according to the task execution plan to process the executable subtask and obtain the task execution result includes: The business intelligence agent is invoked to perform extraction subtasks and obtain key elements, which include at least one of dimensions, indicators, calculation logic, or filtering conditions; based on the key elements, a preset database operation tool is invoked to perform data query and aggregation calculations and obtain processing results. The code is called to generate an intelligent agent, and the processing results of the business intelligence agent are processed to generate executable code; and the execution process information of the executable code is recorded, including at least one of the following: intermediate data during processing, calling parameters, or execution logs.
[0007] Invoke the causal analysis agent to execute the causal analysis subtask and obtain the causal analysis results; The conclusion agent is invoked to execute the conclusion generation subtask, generating conclusion information corresponding to the task request.
[0008] Optionally, the step of invoking the first intelligent agent to decompose the task request and generate a task execution plan corresponding to the task request includes: Invoke the first intelligent agent to perform the following operations: The task request is subjected to intent recognition to obtain intent recognition results; wherein, the intent recognition results indicate at least one of the following: task type, target indicator, comparison benchmark, interpretation direction, or analysis dimension corresponding to the task request; Based on the intent recognition result, the task request is decomposed to obtain at least one executable subtask, and the dependency relationship of each executable subtask is determined. The task execution plan is generated based on the executable subtasks and their dependencies.
[0009] Optionally, the method further includes: Update the state information to the global state, wherein the state information includes at least one of the following: intent recognition result, task execution plan, and agent matching relationship; During the update process of the status information, if the length of a field in the status information exceeds a preset threshold, a predefined processing mechanism is invoked to process the information in the field. The predefined processing mechanism includes at least one of key information extraction or redundant content compression based on a large language model; After the global state is updated, persistent storage is triggered. The content of the persistent storage includes at least one of the field values or metadata information in the global state.
[0010] Optionally, the step of invoking the first intelligent agent to evaluate the task execution result and obtain the evaluation result includes: Invoke the first intelligent agent to perform the following operations: Based on at least one of the task request, the execution process information of the executable subtask, or the task execution result, at least one evaluation dimension is determined; For each evaluation dimension, the decomposition direction of the executable subtask is checked for ambiguity, at least two candidate decomposition directions exist in the task request, and at least one of the following is determined: definition difference, application scenario difference, or historical correlation difference of each candidate decomposition direction. Based on at least one of the aforementioned definitional differences, application scenario differences, or historical correlation differences, a qualitative evaluation is performed on each candidate decomposition direction to obtain a qualitative evaluation result. A preset reward function is invoked to convert the qualitative evaluation result into a quantitative evaluation score. The reward function dynamically adjusts the evaluation weight based on at least one of the expected goals of the task request or historical interaction records. Based on the quantitative evaluation score, the evaluation result is determined, wherein the evaluation result indicates whether the task execution result passes or fails.
[0011] Optionally, the method further includes: The evaluation results are updated to the global state, which stores at least one of the task request, the task execution plan, the execution process information of the executable subtask, or the evaluation results. After the global state is updated, persistent storage is triggered. The content of the persistent storage includes at least one of the field values or metadata information in the global state.
[0012] Secondly, embodiments of this application provide a multi-agent cooperative processing device, the device comprising: A response unit is used to respond to a received task request by calling a first intelligent agent to decompose and process the task request and generate a task execution plan corresponding to the task request. The task execution plan is a directed cyclic graph, where the nodes of the task execution plan indicate the executable subtasks obtained by decomposing the task request, the edges between the nodes indicate the dependencies between the executable subtasks, and the task execution plan is configured to support the cyclic iteration of the execution process. The task processing and evaluation unit is used to, according to the task execution plan, call the second intelligent agent corresponding to the executable subtask to process the executable subtask and obtain the task execution result; and call the first intelligent agent to evaluate the task execution result and obtain the evaluation result. If the evaluation result indicates that the task execution result is passed, output the task execution result; If the evaluation result indicates failure, the first agent is invoked to adjust the task execution plan to generate an updated task execution plan. Based on the updated task execution plan, the second agent and the first agent are invoked again to perform task execution and evaluation operations in sequence until the preset termination condition is met.
[0013] Optionally, the preset termination condition includes at least one of the following conditions: the evaluation result indicates that the test is passed, the preset number of iterations is reached, the preset execution time is reached, or a user-initiated termination instruction is received.
[0014] Thirdly, this application provides a computing device, the computing device including a processor and a memory, the memory storing computer program instructions, and the processor executing the computer program instructions causing the computing device to perform the method as described in the first aspect or any possible implementation of the first aspect.
[0015] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method as described in the first aspect or any possible implementation thereof.
[0016] Fifthly, this application provides a computer program product that, when run on a computer, causes the computer to perform the method as described in the first aspect or any possible implementation thereof.
[0017] Beneficial effects: This application provides a multi-agent collaborative processing method, apparatus, and computing device. When executing the method, the application first invokes a first agent to decompose and process the received task request, generating a task execution plan. Then, according to the task execution plan, a second agent is invoked to process the executable sub-tasks, obtaining the task execution result; the first agent is invoked to evaluate the task execution result, obtaining the evaluation result; if the evaluation result indicates a pass, the task execution result is output; if the evaluation result indicates a fail, the first agent is invoked to adjust the task execution plan, generating an updated task execution plan, and the second and first agents are invoked again to perform the task execution and evaluation operations until a preset termination condition is met.
[0018] This application's embodiments introduce a first intelligent agent to evaluate the task execution results obtained by the second intelligent agent, and drive the first intelligent agent to dynamically adjust the task execution plan based on the evaluation results. This forms a closed-loop processing mechanism of task decomposition, task execution, result evaluation, and feedback adjustment. This approach enables multi-agent collaborative processing and can automatically trigger the adjustment process when there are deviations in the task execution results, improving the accuracy and reliability of the task execution results. Furthermore, this application configures the task execution plan as a directed cyclic graph structure that supports iterative loops, and combines it with an evaluation feedback mechanism. This allows the system to automatically execute an iterative process of adjusting the task execution plan, re-executing the task, and re-evaluating when the evaluation result indicates failure, until a preset termination condition is met. This avoids the problem of distortion of the final result due to deviations in the execution of a single sub-task, and helps to improve the accuracy and reliability of the final output task execution results. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a schematic diagram of the structure of an intelligent agent collaborative processing system provided in an embodiment of this application; Figure 2 A flowchart of a multi-agent cooperative processing method provided in an embodiment of this application; Figure 3 This is a schematic diagram of a task execution plan provided in an embodiment of this application; Figure 4 This application also provides a schematic diagram of the structure of a multi-agent collaborative processing device. Detailed Implementation
[0021] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0022] This application provides a multi-agent cooperative processing method, applied to an agent cooperative processing system, hereinafter referred to as the processing system. See appendix. Figure 1As shown in the figure, this is a schematic diagram of the structure of an intelligent agent collaborative processing system provided in an embodiment of this application. Figure 1 As shown, the processing system includes a first agent 10 and a second agent 20. In one example, the processing system may also include a conversational interface 30.
[0023] A conversational interactive interface serves as the entry point for interaction between the system and the user, allowing the user to input task requests in natural language and receive responses from the processing system. In this embodiment, the conversational interactive interface is directly connected to the first intelligent agent to receive and respond to user intentions. In one specific implementation, the conversational interactive interface may include one or more of the following: a dialogue window, a visual chart style switching mechanism, voice input, or multi-turn dialogue interaction. The dialog window is used to present the user's input task request and the response results returned by the processing system in text form. It supports users to input task requests in natural language by keyboard input or copy and paste, and displays the analysis results or execution reports returned by the processing system in structured or unstructured text form.
[0024] The visualization chart style switching feature allows users to flexibly switch the presentation style of the response results returned by the processing system according to their actual needs. In one example, the processing system can present the same analysis result in multiple styles such as tables, bar charts, line charts, pie charts, card summaries, or natural language paragraphs. Users can select the presentation style most suitable for the current analysis scenario through the switching controls in the dialog-based interactive interface, without having to resubmit the task request.
[0025] Multi-turn dialogue interaction supports multiple rounds of dialogue between the user and the processing system during the processing of a single task request. In one example, after the user inputs the task request in the first round of dialogue, the system returns an initial response. In subsequent rounds, the user can ask follow-up questions, add conditions, or modify requirements based on this initial response. The processing system dynamically adjusts the task execution plan based on the user's added dialogue content and the historical dialogue context, and returns an updated response. This feature helps to achieve progressive refinement and iterative optimization of complex tasks, improving the flexibility of interaction and the accuracy of task processing.
[0026] The first intelligent agent, also known as the central intelligent agent, receives task requests input by the user through a conversational interface and generates a corresponding task execution plan. In this embodiment, for simple query tasks, the first intelligent agent can achieve immediate response through a lightweight inference chain. For complex analysis tasks, the first intelligent agent can initiate a multi-step deep inference mechanism to ensure the comprehensiveness and accuracy of the conclusions. For example, the first intelligent agent can perform multi-step deep inference, including intent recognition, question rewriting, task planning, and effect evaluation.
[0027] Among them, intent recognition is used to identify the user's core intent and task type from the natural language task request input by the user, including determining the type of operation the user wants to perform and the data scope and analysis dimensions involved in the task.
[0028] Question rewriting is used to transform user-input natural language task requests into a structured expression that the system can process internally. In one example, question rewriting includes processing colloquial, ambiguous, or incomplete user input, supplementing missing key information, disambiguating, and generating a standardized task description.
[0029] Task planning is used to break down a task request into multiple executable subtasks based on the results of intent recognition and question rewriting, and to determine the execution order and dependencies between the subtasks, thereby generating a task execution plan. In one example, the task execution plan is configured as a directed cyclic graph structure that supports iterative loops, where nodes indicate executable subtasks and edges indicate dependencies between subtasks.
[0030] The second intelligent agent, also known as the execution intelligent agent, is used to execute sub-tasks in the task execution plan. It should be noted that in the embodiments of this application, the number of second intelligent agents can be one or more; this application is not limited. In one specific implementation, the second intelligent agent provided in the embodiments of this application can be one or more of a business intelligence intelligent agent, a causal analysis intelligent agent, a conclusion intelligent agent, or a code generation intelligent agent.
[0031] A business intelligence agent is responsible for business intelligence tasks. It possesses a rich toolkit of business intelligence tools, focusing on in-depth data analysis and computation. Leveraging its professional data processing logic and algorithm adaptation capabilities, it serves as a data intelligence expert supporting the entire business intelligence process. In one implementation, the business intelligence agent can perform database operations such as data selection, grouping, sorting, joint queries, limiting, deduplication, and joins, as well as analytical capabilities such as conditional branching, dimension switching, and aggregation calculations.
[0032] The causal analysis agent is responsible for data indicator drill-down and indicator root cause analysis, supporting fine-grained interpretation of indicator changes and business code values. By constructing a multi-level indicator association network and business semantic mapping model, it achieves penetrating reasoning from indicator changes to root cause elements.
[0033] The conclusion agent, as the output link of business intelligence analysis conclusions, is responsible for systematically summarizing the analysis and processing processes and results of other agents, forming a logical and complete summary response; it provides basic support for the language interaction tasks of the entire system, ensuring the smoothness and consistency of human-computer interaction and collaboration between agents, while improving the efficiency and understandability of transmitting complex analysis results. In the embodiments of this application, the conclusion agent can be used for summarizing and generalizing, etc.
[0034] The code-generating agent possesses specialized capabilities in code generation and execution. When handling customizable business intelligence tasks, it achieves efficient processing through the automated execution of programmed scripts. In conventional analysis scenarios, the business intelligence agent relies on preset logic to complete standardized indicator calculations and visualization outputs. However, when faced with complex data transformations and custom algorithm implementations, the code-generating agent performs secondary processing on the output results of the business intelligence agent. In this embodiment, the code-generating agent can be used to generate Python code for complex data calculations.
[0035] Furthermore, in this application example, the first intelligent agent is also used to evaluate the task execution result of the second intelligent agent. The first intelligent agent provided in this application embodiment can perform the evaluation in one or more of the following evaluation methods: Example 1 employs a deterministic task evaluation method. Specifically, based on the exact matching principle, it is suitable for quantifiable and unambiguous task scenarios, including multiple-choice or fill-in-the-blank questions. In the data query verification of the question-answering system, the accuracy is calculated by comparing the model output with the benchmark value. The advantages of this method are that it facilitates large-scale data collection and has low generation costs, and it can provide stable supervision signals during the parameter fine-tuning stage.
[0036] Example 2 employs a reward modeling evaluation method based on human feedback. Specifically, it judges right or wrong, good or bad through human scoring, then learns a reward function to mimic the principles of human scoring, and finally scores the results using the reward function. This method offers good flexibility and authority, but it relies on the quantity of human scoring samples and the quality of the reward function. In practical applications, a dedicated scoring model needs to be trained to rigorously evaluate highly flexible problems. Since the quality of the first agent's problem planning and decomposition is crucial, a reward function is needed to evaluate the results of the planning and decomposition.
[0037] Example 3 employs a distributed voting evaluation method. Specifically, distributed voting is used to judge the outcome of the problem, similar to peer review within a group. Group members may be of similar skill levels, but each has different perspectives and strengths; collective voting can lead to a better conclusion. This approach avoids finding a highly capable individual as a judge, as such individuals are costly. Therefore, a distributed voting mechanism is designed based on a large language model to ensure the quality of the results. In practice, if resources limit the deployment of multiple large models, the large models can independently reason multiple times to generate multiple answers, and the final result can be selected through distributed voting.
[0038] Example 4 employs a rule-based assertion evaluation method. Specifically, a strict verification mechanism is built based on preset rules to quickly identify obviously unreasonable answers, including agent call failures, lack of access permissions, and JSON parsing errors. Although this method cannot select the optimal result, it can efficiently filter invalid outputs, significantly reduce the risk of system anomalies, and plays an important role in improving overall stability. Due to its simple implementation and rapid response, this method is embedded in various modules of the system, forming a basic protection network across the entire chain.
[0039] For different types of task requests, the processing system can adopt differentiated evaluation strategies: for simple tasks, including indicator calculation, a deterministic task evaluation method is used, comparing the calculation results with the accuracy of benchmark data; for complex tasks, including correlation analysis, a reward modeling evaluation method based on human feedback or a distributed voting evaluation method is used. The reward modeling evaluation method based on human feedback scores the rationality of the analysis logic through a pre-trained reward model, while the distributed voting evaluation method votes on the results by calling multiple independent large language models.
[0040] The following description, in conjunction with the accompanying drawings, introduces a multi-agent cooperative processing method provided by an embodiment of this application. (See attached drawings.) Figure 2 A flowchart of a multi-agent cooperative processing method provided in this application embodiment is shown. The method includes the following steps: S210, in response to receiving a task request, the first intelligent agent is invoked to decompose the task request and generate a task execution plan corresponding to the task request.
[0041] The task request is a business requirement input by the user in natural language through a conversational interface. For example, the task request might be: Why did Branch A's annual fee revenue increase in 2024 compared to last year? The first intelligent agent receives this task request and breaks it down for processing.
[0042] The task execution plan is a directed cyclic graph. The nodes of this directed cyclic graph indicate executable subtasks derived from the task request. Each node corresponds to an independent processing unit that can be assigned to a second agent for execution. For example, a node can represent specific operations such as data querying, causal analysis, conclusion generation, or code execution. Edges between nodes indicate dependencies between executable subtasks. The direction of the edges indicates the execution order, i.e., from the preceding task to the following task. For example, an edge from the data query node to the causal analysis node indicates that causal analysis can only be performed after the data query is completed. The task execution plan is also configured to support iterative execution of the execution flow. That is, the directed cyclic graph of this application allows backward movement from the following node to the preceding node, forming a feedback loop. This loop is used to trigger adjustments and re-execution of the task execution plan when the evaluation result fails.
[0043] To facilitate understanding, the following is in conjunction with the appendix. Figure 3 Further explanation. (Attached) Figure 3 This is a schematic diagram of a task execution plan provided in an embodiment of this application.
[0044] like Figure 3 As shown, the task execution plan includes the following nodes: Node A, Node B, Node C, Node D, Node E, and Node P. Node A indicates the data query subtask, used to extract raw data from the database. Node B indicates the year-on-year calculation subtask, used to calculate the year-on-year growth rate based on the raw data obtained from Node A. Node C indicates the causal analysis subtask, used to perform root cause analysis on the year-on-year calculation results. Node D indicates the conclusion generation subtask, used to generate analysis conclusions. Node E indicates the evaluation subtask, used to evaluate the task execution results. Node P indicates the generation of the updated task execution plan.
[0045] The edges between nodes are as follows: Edge A→B indicates that after the data query is completed, year-on-year calculation is performed; Edge B→C indicates that after the year-on-year calculation is completed, causal analysis is performed; Edge C→D indicates that after the causal analysis is completed, conclusion generation is performed; Edge D→E indicates that after the conclusion is generated, evaluation is performed.
[0046] In addition, Figure 3 In the described embodiment, node E is also connected to planning node P via a feedback edge. When the evaluation result of the evaluation subtask indicates failure, the process moves from node E to node P along the feedback edge. The central control agent then re-plans the task execution plan at node P, generating an updated task execution plan. The updated task execution plan may start from node A and execute subsequent nodes sequentially from the starting node according to the updated plan until a preset termination condition is met.
[0047] In this embodiment, after receiving a task request, the processing system can invoke a first intelligent agent to decompose the task request and generate a task execution plan corresponding to the task request. In one specific implementation, the first intelligent agent can perform the following steps to obtain the task execution plan: Step A1: Perform intent recognition on the task request to obtain the intent recognition result.
[0048] The intent recognition stage involves a large language model performing global semantic parsing on the task request to determine at least one of the following: task type, target metric, benchmark, explanatory direction, or analytical dimension. For example, for the task request "Why did Branch A's annual fee revenue increase in 2024 compared to last year?", the intent recognition stage identifies the user's core need as explaining the reasons for the year-on-year increase in annual fee revenue, further refining the task type to a time-based attribution analysis. Based on this, the intent recognition results are output. These results can be structured language and include the following: Task type: Time-based attribution analysis; Comparison benchmark: 2024 vs. 2023; Target metric: Annual fee revenue; Analysis dimension: A-line; Explanation direction: It is necessary to identify the key factors driving growth, including but not limited to: card issuance channels, data types, and card issuance channel classifications.
[0049] Furthermore, the processing system accepts business intelligence tasks input by users in natural language. First, it performs standardization processing on the input statements, including word segmentation, part-of-speech tagging, domain-specific named entity recognition, referential resolution, and stop word filtering. Then, using a context fusion mechanism, it semantically merges the current input with historical dialogues, achieving parameter inheritance, logical completion, and intent continuity modeling. For abbreviated or referential expressions, the system can automatically recover the complete semantic structure. The system uses a question rewriting module to transform the user's original expression into a logically complete, clearly structured, and standardized query statement suitable for subsequent processing. After completing the standardization processing of the input statement and the standardized question rewriting, the first intelligent agent is invoked to perform intent recognition, obtaining the intent recognition result.
[0050] Step A2: Based on the intent recognition results, the processing system breaks down the task request to obtain at least one executable subtask and determines the dependencies between the subtasks.
[0051] Specifically, based on the intent recognition result obtained in step A1, the first agent breaks down the task request into multiple executable sub-tasks and determines the execution order and dependencies between the sub-tasks.
[0052] Continuing with the example above, the task request for "Why did Branch A's annual fee income increase in 2024 compared to last year?" can be broken down into the following subtasks: Subtask 1: Query Branch A's annual fee income data for 2024; Subtask 2: Query Branch A's annual fee income data for 2023; Subtask 3: Calculate the year-on-year growth rate of annual fee income; Subtask 4: Identify the key factors driving growth; Subtask 5: Generate attribution analysis conclusions.
[0053] Subtask 1 and Subtask 2 are parallel tasks, and after completion, they become the prerequisite tasks for Subtask 3, respectively. Subtask 3 becomes the prerequisite task for Subtask 4 after completion, and Subtask 4 becomes the prerequisite task for Subtask 5 after completion, forming a dependency chain.
[0054] Step A3: The processing system generates a task execution plan based on the executable subtasks and the dependencies between them.
[0055] S220: According to the task execution plan, the second intelligent agent corresponding to the executable subtask is invoked to process the executable subtask and obtain the task execution result.
[0056] Specifically, after the first intelligent agent generates the task execution plan, the processing system matches a corresponding second intelligent agent for each executable subtask according to the plan, and the corresponding second intelligent agent performs the task processing to finally obtain the task execution result corresponding to the task request.
[0057] To better illustrate the embodiments of this application, the following description takes the second intelligent agent as including a business intelligence intelligent agent, a causal analysis intelligent agent, a conclusion intelligent agent, and a code generation intelligent agent as an example.
[0058] In this embodiment, the task request is broken down into subtasks A, B, and C. Subtask A is a data extraction subtask, subtask B is a causal analysis subtask, and subtask C is a conclusion generation subtask. The dependencies between the subtasks are as follows: the execution of subtask B depends on subtask A, and the execution of subtask C depends on subtask B.
[0059] Specifically, after the processing system obtains the task execution plan, it performs the following operations in sequence: Step B1: Invoke the business intelligence agent to execute subtask A.
[0060] Subtask A is a data extraction subtask. In this subtask, the business intelligence agent first parses the task request and extracts key elements. These key elements include at least one of the following: dimension, metric, calculation logic, or filtering conditions. Then, based on the extracted key elements, it invokes a pre-defined database operation tool to perform data queries and aggregation calculations to obtain the processing results.
[0061] For example, for the subtask of querying sales data for each region in the previous quarter, the business intelligence agent first extracts key elements: the dimension is region, the indicator is sales, the calculation logic is summation, and the filtering condition is the time period of the previous quarter. Based on these key elements, the business intelligence agent further calls database operation tools to perform data queries and aggregation calculations to obtain the processing results, namely the sales figures for each region in the previous quarter.
[0062] Step B2: Invoke the causal analysis agent to execute subtask B.
[0063] Subtask B is a causal analysis subtask, used to perform data indicator drill-down and root cause analysis on the processing results of step B1. The causal analysis agent identifies the core factors causing indicator changes by constructing a multi-level indicator association network, such as through year-on-year / month-on-month analysis and tree-structured drill-down analysis, to locate the root cause of the problem.
[0064] For example, in the subtask of analyzing the root causes of declining sales in certain regions, the causal analysis agent calculates the month-on-month change rate based on sales figures for each region, identifies the regions where sales have declined, and then uses drill-down analysis to pinpoint the core factor as reduced marketing activities in a particular region.
[0065] Step B3: Invoke the conclusion agent to execute subtask C.
[0066] Subtask C is the conclusion generation subtask, used to systematically summarize the analysis and processing process and results of the preceding agent, forming a summary response that is both logical and complete. The conclusion agent, as the output link of the business intelligence analysis conclusion, summarizes and organizes the causal analysis results of step B2, selects the conclusion information most relevant to the task request, and generates the conclusion in natural language form.
[0067] For example, the conclusion agent summarizes the processing results of the business intelligence agent and the analysis results of the causal analysis agent, and concludes that the sales of region A decreased by 20% in the previous quarter, mainly due to the reduction in marketing activities.
[0068] In this embodiment, a business intelligence agent performs data queries, and a code generation agent processes the output of the business intelligence agent to generate executable code. Specifically, the code generation agent processes the output of step B1 to generate executable code, and obtains the final task execution result through the automated execution of a programmed script.
[0069] Optionally, the processing system may also perform step B4 to record execution process information.
[0070] Furthermore, the processing system also records execution process information for executable subtasks, including at least one of the following: intermediate data during subtask processing, calling parameters, or execution logs. This execution process information will be used for subsequent evaluation and adjustment steps.
[0071] In a specific example, the first agent can update the global state in real time with intent recognition results, task execution planning information, agent matching relationships, execution status of each subtask, and intermediate results. For instance, the first agent can update the global state in real time with intent tags from time-based attribution analysis, decomposed subtasks, and matched agent information.
[0072] During the state update process, if the length of information in a field exceeds a preset threshold, or if other predefined triggering conditions are met, the processing system will process the information in the field through a predefined mechanism. This predefined mechanism includes, but is not limited to: key information extraction based on a language model, redundant content compression, or other adapted methods.
[0073] At the same time, the state update is atomic; a single update either takes full effect or rolls back to the state before the update, thus avoiding data inconsistency.
[0074] After the state is updated, the processing system triggers persistent storage. In addition to the values of each field in the state, the stored content can also include metadata information of the state for fault recovery and audit traceability; the stored content can also be processed by predefined rules before storage, such as extracting key information about the user from a large language model and storing it to realize the system's cross-session memory function for users.
[0075] The above embodiments are for illustrative purposes only. In actual use, the type of the second intelligent agent, the granularity of the subtasks, and the execution order of each subtask can be adjusted as needed.
[0076] S230, the first intelligent agent is invoked to evaluate the task execution result and obtain the evaluation result.
[0077] In this embodiment, after the processing system generates the task execution result, it calls a first intelligent agent to evaluate the task execution result and obtain the evaluation result. In this embodiment, the first intelligent agent is also referred to as a reflective evaluation intelligent agent.
[0078] Specifically, the first intelligent agent can perform the following evaluation operations: Step C1: Determine at least one evaluation dimension based on at least one of the following: task request, execution process information of executable subtasks, or task execution results.
[0079] For example, evaluation dimensions include "task completion", "data accuracy", "logical rationality", and "intent matching".
[0080] Step C2 involves performing ambiguity checks on the decomposition directions of executable subtasks for each evaluation dimension. This identifies at least two candidate decomposition directions in the task request and determines at least one of the following differences: definitional differences, application scenario differences, or historical correlation differences. For example, for the task request to query the average balance of customers across branches, there are two candidate decomposition directions: customer current account balance and performance assessment balance. The first agent identifies the differences between the two candidate decomposition methods. Specifically: Definitional differences: Current account balance refers to the customer's actual available funds, while performance assessment balance is a performance statistic adjusted by business rules. Application scenario differences: Current account balance is often used for customer liquidity analysis, while performance assessment balance is often used for internal performance accounting. Historical correlation differences: The system checks whether the user has made similar queries in the past to clarify the type of balance they are interested in.
[0081] Step C3 triggers a retrieval of short-term and long-term memories, and based on the above differences, a qualitative evaluation is performed on each candidate decomposition direction to obtain the qualitative evaluation results.
[0082] For example, the search revealed that the user's last three balance inquiries all revolved around the current account withdrawal limit and current account interest, without involving any performance evaluation scenarios. This indicates that the user is more concerned with the actual usable current account balance. Based on this, two qualitative judgments are formed. Qualitative judgment A, concerning the current account balance, matches the user's historical intent, has high scenario adaptability, and the indicator definition is clear. Qualitative judgment B, concerning the performance evaluation balance, has low scenario adaptability, conflicts with historical interactions, and the indicator definition is ambiguous.
[0083] Step C4: Call the preset reward function to convert the qualitative evaluation results into quantitative evaluation scores.
[0084] The reward function dynamically adjusts the evaluation weights based on either the expected goal of the task request or at least one of the historical interaction records.
[0085] For example, assign weights to dimensions such as user intent matching, scenario adaptability, and the clarity of indicator definition, for example, 40%, 30%, and 30% respectively, and then score them according to their performance: Qualitative judgment A: 90 points, 85 points, and 95 points respectively, with a weighted total score of 90 points. Qualitative judgment B: 40 points, 30 points, and 50 points respectively, with a weighted total score of 40 points.
[0086] Step C5: Based on the quantitative evaluation score, determine the evaluation result, where the evaluation result indicates whether the task execution result is passed or failed.
[0087] For example, if the quantitative score is higher than a preset threshold, the evaluation result is considered passed; otherwise, it is considered failed. In this example, qualitative judgment A scores 90 points, qualitative judgment B scores 40 points, and the preset threshold is 80 points. Therefore, qualitative judgment A passes, and qualitative judgment B fails. The first agent selects the direction A with the highest score as the final decomposition direction and outputs the evaluation result.
[0088] Furthermore, in this embodiment of the application, after the processing system completes the evaluation, it updates the evaluation information, including the evaluation results, quantitative scores, and reasons for failure, to the global state.
[0089] S240, if the evaluation result indicates that the task execution result is passed, output the task execution result.
[0090] Specifically, when the first intelligent agent evaluates the task execution result and indicates that it is satisfactory, the system outputs the task execution result to the user as the final response through a conversational interface. For example, it may be presented in the form of a report, chart, or natural language paragraph.
[0091] For example, if the assessment is successful, the processing system will output the query results of the average current account balance of customers in each branch. For example, the average current account balance of customers in each branch is as follows: Branch A 12,000 yuan, Branch B 8,000 yuan, and Branch C 15,000 yuan.
[0092] S250, if the evaluation result indicates failure, the first intelligent agent is invoked to adjust the task execution plan to generate an updated task execution plan, and steps S220 and S230 are executed based on the updated task execution plan.
[0093] Specifically, when the evaluation result indicates failure, the processing system calls the first intelligent agent to adjust the original task execution plan, generate an updated task execution plan, and re-execute the task execution and evaluation operations based on the updated plan until the preset termination conditions are met.
[0094] In this embodiment of the application, the preset termination condition includes at least one of the following conditions: the evaluation result indicates that the evaluation has passed, the preset number of iterations has been reached, the preset execution time has been reached, or a user-initiated termination instruction has been received.
[0095] This application receives a task request, invokes a first intelligent agent to decompose the task request, and generates a task execution plan corresponding to the task request. Based on the task execution plan, a second intelligent agent corresponding to the executable sub-task is invoked to process the executable sub-task and obtain a task execution result. The first intelligent agent is invoked to evaluate the task execution result and obtain an evaluation result. If the evaluation result indicates a pass, the task execution result is output. If the evaluation result indicates a fail, the first intelligent agent is invoked to adjust the task execution plan to generate an updated task execution plan, and based on the updated task execution plan, the task execution and evaluation operations are re-executed. This embodiment of the application introduces a first intelligent agent to evaluate the task execution result obtained by the second intelligent agent, and drives the first intelligent agent to dynamically adjust the task execution plan based on the evaluation result. This forms a closed-loop processing mechanism of task decomposition, task execution, result evaluation, and feedback adjustment. This approach enables multi-agent collaborative processing and can automatically trigger the adjustment process when there are deviations in the task execution result, improving the accuracy and reliability of the task execution result. Furthermore, this application configures the task execution plan as a directed cyclic graph structure that supports iterative loops, and combines it with an evaluation feedback mechanism, so that when the evaluation result indicates that the task execution plan is not passed, the system can automatically execute an iterative process of adjusting the task execution plan, re-executing the task, and re-evaluating until the preset termination condition is met. This avoids the problem of distortion of the final result due to the execution deviation of a single subtask, and helps to improve the accuracy and reliability of the final output task execution result.
[0096] Furthermore, this application also provides a multi-agent cooperative processing device for executing the above-described multi-agent cooperative method.
[0097] Appendix Figure 4 This application also provides a schematic diagram of the structure of a multi-agent cooperative processing device, the device 400 including: The response unit 401 is used to respond to receiving a task request by calling the first intelligent agent to decompose the task request and generate a task execution plan corresponding to the task request. The task execution plan is a directed cyclic graph, where the nodes of the task execution plan indicate the executable subtasks obtained by decomposing the task request, the edges between the nodes indicate the dependencies between the executable subtasks, and the task execution plan is configured to support the cyclic iteration of the execution process. The task processing and evaluation unit 402 is configured to, according to the task execution plan, call the second intelligent agent corresponding to the executable subtask to process the executable subtask and obtain the task execution result; and call the first intelligent agent to evaluate the task execution result and obtain the evaluation result. If the evaluation result indicates that the task execution result is passed, output the task execution result; If the evaluation result indicates failure, the first agent is invoked to adjust the task execution plan to generate an updated task execution plan. Based on the updated task execution plan, the second agent and the first agent are invoked again to perform task execution and evaluation operations in sequence until the preset termination condition is met.
[0098] The preset termination conditions include at least one of the following: the evaluation result indicates that the evaluation has passed, the preset number of iterations has been reached, the preset execution time has been reached, or a user-initiated termination instruction has been received.
[0099] Optionally, according to the task execution plan, a second intelligent agent corresponding to the executable subtask is invoked to process the executable subtask and obtain the task execution result, including: The business intelligence agent is invoked to perform extraction subtasks and obtain key elements, which include at least one of dimensions, indicators, calculation logic, or filtering conditions; based on the key elements, a preset database operation tool is invoked to perform data query and aggregation calculations and obtain processing results. The code is called to generate an intelligent agent, and the output of the business intelligence agent is processed in a secondary manner to generate executable code.
[0100] Invoke the causal analysis agent to execute the causal analysis subtask and obtain the causal analysis results; The conclusion agent is invoked to execute the conclusion generation subtask, generating conclusion information corresponding to the task request.
[0101] Optionally, the step of invoking the first intelligent agent to decompose the task request and generate a task execution plan corresponding to the task request includes: Invoke the first intelligent agent to perform the following operations: The task request is subjected to intent recognition to obtain intent recognition results; wherein, the intent recognition results indicate at least one of the following: task type, target indicator, comparison benchmark, interpretation direction, or analysis dimension corresponding to the task request; Based on the intent recognition result, the task request is decomposed to obtain at least one executable subtask, and the dependency relationship of each executable subtask is determined. The task execution plan is generated based on the executable subtasks and their dependencies.
[0102] Optionally, the task processing and evaluation unit 402 is also used for: Update the state information to the global state, wherein the state information includes at least one of the following: intent recognition result, task execution plan, and agent matching relationship; During the update process of the status information, if the length of a field in the status information exceeds a preset threshold, a predefined processing mechanism is invoked to process the information in the field. The predefined processing mechanism includes at least one of key information extraction or redundant content compression based on a large language model; After the global state is updated, persistent storage is triggered. The content of the persistent storage includes at least one of the field values or metadata information in the global state.
[0103] Optionally, the step of invoking the first intelligent agent to evaluate the task execution result and obtain the evaluation result includes: Invoke the first intelligent agent to perform the following operations: Based on at least one of the task request, the execution process information of the executable subtask, or the task execution result, at least one evaluation dimension is determined; For each evaluation dimension, the decomposition direction of the executable subtask is checked for ambiguity, at least two candidate decomposition directions exist in the task request, and at least one of the following is determined: definition difference, application scenario difference, or historical correlation difference of each candidate decomposition direction. Based on at least one of the aforementioned definitional differences, application scenario differences, or historical correlation differences, a qualitative evaluation is performed on each candidate decomposition direction to obtain a qualitative evaluation result. A preset reward function is invoked to convert the qualitative evaluation result into a quantitative evaluation score. The reward function dynamically adjusts the evaluation weight based on at least one of the expected goals of the task request or historical interaction records. Based on the quantitative evaluation score, the evaluation result is determined, wherein the evaluation result indicates whether the task execution result passes or fails.
[0104] Optionally, the task processing and evaluation unit 402 is also used for: The evaluation results are updated to the global state, which stores at least one of the task request, the task execution plan, the execution process information of the executable subtask, or the evaluation results. After the global state is updated, persistent storage is triggered. The content of the persistent storage includes at least one of the field values or metadata information in the global state.
[0105] Optionally, if the evaluation result indicates failure, the first intelligent agent is invoked to adjust the task execution plan to generate an updated task execution plan, including: Invoke the first intelligent agent to perform the following operations: Obtain the reasons for failure from the evaluation results in the global state; Based on the reasons for failure, at least one of the following adjustments shall be made to the task execution plan: adjust the execution order of the executable subtasks, add or delete executable subtasks, modify the second agent corresponding to the executable subtasks, or modify the execution parameters of the executable subtasks; Based on the adjusted task execution plan, the updated task execution plan is generated, and the first and second intelligent agents are invoked again to execute the task execution and evaluation operations in sequence.
[0106] The apparatus provided in this application introduces a first intelligent agent to evaluate the task execution results processed by the second intelligent agent, and drives the first intelligent agent to dynamically adjust the task execution plan based on the evaluation results. This forms a closed-loop processing mechanism of task decomposition, task execution, result evaluation, and feedback adjustment. This approach enables multi-agent collaborative processing and can automatically trigger the adjustment process when there are deviations in the task execution results, improving the accuracy and reliability of the task execution results. Furthermore, this application configures the task execution plan as a directed cyclic graph structure that supports iterative loops, and combines it with an evaluation feedback mechanism. This allows the system to automatically execute an iterative process of adjusting the task execution plan, re-executing the task, and re-evaluating when the evaluation result indicates that the task execution plan has failed, until a preset termination condition is met. This avoids the problem of distortion of the final result due to deviations in the execution of a single sub-task, and helps to improve the accuracy and reliability of the final output task execution results.
[0107] It should be understood that the above-described device can implement the functions of each unit through software, hardware, or a combination of software and hardware. Each unit can also be further used to execute the corresponding steps in the various embodiments of the aforementioned data processing method, which will not be elaborated here. It should be noted that the division of units in the above-described device embodiments is only a logical functional division; in actual implementation, there may be other division methods, such as combining or integrating multiple units into another system.
[0108] This application also provides a computing device, which includes a processor and a memory. The memory stores computer program instructions, and when the processor executes the computer program instructions, the computing device performs the aforementioned data processing method. The computing device may also be a cluster of computing devices, in which the multiple computing devices in the cluster collaboratively execute the aforementioned data processing method.
[0109] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the aforementioned data processing method. This application also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned data processing method. The computer-readable storage medium can be any available medium capable of being stored by a computing device, or a data storage device such as a data center integrating one or more available media.
[0110] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for the device and equipment embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments. The device and equipment embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components indicated as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the solution in this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0111] The above description is merely one specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A multi-agent cooperative processing method, characterized in that, The method includes: In response to receiving a task request, the first intelligent agent is invoked to decompose the task request and generate a task execution plan corresponding to the task request; The task execution plan is a directed cyclic graph, where the nodes of the task execution plan indicate the executable subtasks obtained by decomposing the task request, the edges between the nodes indicate the dependencies between the executable subtasks, and the task execution plan is configured to support the cyclic iteration of the execution process. According to the task execution plan, the second agent corresponding to the executable subtask is invoked to process the executable subtask and obtain the task execution result; the first agent is invoked to evaluate the task execution result and obtain the evaluation result. If the evaluation result indicates that the task execution result is passed, output the task execution result; If the evaluation result indicates failure, the first agent is invoked to adjust the task execution plan to generate an updated task execution plan. Based on the updated task execution plan, the second agent and the first agent are invoked again to perform task execution and evaluation operations in sequence until the preset termination condition is met.
2. The method according to claim 1, characterized in that, The preset termination conditions include at least one of the following conditions: the evaluation result indicates that the test is passed, the preset number of iterations is reached, the preset execution time is reached, or a user-initiated termination instruction is received.
3. The method according to claim 1, characterized in that, The step of invoking the second intelligent agent corresponding to the executable subtask according to the task execution plan to process the executable subtask and obtain the task execution result includes: The business intelligence agent is invoked to perform extraction subtasks and obtain key elements, which include at least one of dimensions, indicators, calculation logic, or filtering conditions; based on the key elements, a preset database operation tool is invoked to perform data query and aggregation calculations and obtain processing results. The code is invoked to generate an intelligent agent, and the processing results of the business intelligence agent are processed to generate executable code. Invoke the causal analysis agent to execute the causal analysis subtask and obtain the causal analysis results; The conclusion agent is invoked to execute the conclusion generation subtask, generating conclusion information corresponding to the task request.
4. The method according to claim 1, characterized in that, The step of invoking the first intelligent agent to decompose the task request and generate a task execution plan corresponding to the task request includes: Invoke the first intelligent agent to perform the following operations: The task request is subjected to intent recognition to obtain intent recognition results; wherein, the intent recognition results indicate at least one of the following: task type, target indicator, comparison benchmark, interpretation direction, or analysis dimension corresponding to the task request; Based on the intent recognition result, the task request is decomposed to obtain at least one executable subtask, and the dependency relationship of each executable subtask is determined. The task execution plan is generated based on the executable subtasks and their dependencies.
5. The method according to claim 4, characterized in that, The method further includes: Update the state information to the global state, wherein the state information includes at least one of the following: intent recognition result, task execution plan, and agent matching relationship; During the update process of the status information, if the length of a field in the status information exceeds a preset threshold, a predefined processing mechanism is invoked to process the information in the field. The predefined processing mechanism includes at least one of key information extraction or redundant content compression based on a large language model; After the global state is updated, persistent storage is triggered. The content of the persistent storage includes at least one of the field values or metadata information in the global state.
6. The method according to claim 1, characterized in that, The invocation of the first intelligent agent to evaluate the task execution result and obtain the evaluation result includes: Invoke the first intelligent agent to perform the following operations: Based on at least one of the task request, the execution process information of the executable subtask, or the task execution result, at least one evaluation dimension is determined; For each evaluation dimension, the decomposition direction of the executable subtask is checked for ambiguity, at least two candidate decomposition directions exist in the task request, and at least one of the following is determined: definition difference, application scenario difference, or historical correlation difference of each candidate decomposition direction. Based on at least one of the aforementioned definitional differences, application scenario differences, or historical correlation differences, a qualitative evaluation is performed on each candidate decomposition direction to obtain a qualitative evaluation result. A preset reward function is invoked to convert the qualitative evaluation result into a quantitative evaluation score. The reward function dynamically adjusts the evaluation weight based on at least one of the expected goals of the task request or historical interaction records. Based on the quantitative evaluation score, the evaluation result is determined, wherein the evaluation result indicates whether the task execution result passes or fails.
7. The method according to claim 6, characterized in that, The method further includes: The evaluation results are updated to the global state, which stores at least one of the task request, the task execution plan, the execution process information of the executable subtask, or the evaluation results. After the global state is updated, persistent storage is triggered. The content of the persistent storage includes at least one of the field values or metadata information in the global state.
8. A multi-agent collaborative processing device, characterized in that, The device includes: A response unit is used to respond to a received task request by calling a first intelligent agent to decompose and process the task request and generate a task execution plan corresponding to the task request. The task execution plan is a directed cyclic graph, where the nodes of the task execution plan indicate the executable subtasks obtained by decomposing the task request, the edges between the nodes indicate the dependencies between the executable subtasks, and the task execution plan is configured to support the cyclic iteration of the execution process. The task processing and evaluation unit is used to, according to the task execution plan, call the second intelligent agent corresponding to the executable subtask to process the executable subtask and obtain the task execution result; and call the first intelligent agent to evaluate the task execution result and obtain the evaluation result. If the evaluation result indicates that the task execution result is passed, output the task execution result; If the evaluation result indicates failure, the first agent is invoked to adjust the task execution plan to generate an updated task execution plan. Based on the updated task execution plan, the second agent and the first agent are invoked again to perform task execution and evaluation operations in sequence until the preset termination condition is met.
9. The apparatus according to claim 8, characterized in that, The preset termination conditions include at least one of the following conditions: the evaluation result indicates that the test is passed, the preset number of iterations is reached, the preset execution time is reached, or a user-initiated termination instruction is received.
10. A computing device, characterized in that, The computing device includes a processor and a memory, the memory storing computer program instructions, and when the processor executes the computer program instructions, it causes the computing device to perform the method according to any one of claims 1-7.
