A method and system for multi-agent collaborative operation of a large language model
By designing a multi-agent collaborative working method, including planning, tooling, and reflective agents, and decomposing tasks into sub-tasks and performing tool enhancement and evaluation, the problem of inefficiency of a single agent in complex tasks is solved, and efficient task processing and optimization are achieved.
Patent Information
- Application Number
- CN202510561902.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2045-04-30
AI Technical Summary
Existing single agents suffer from problems such as forgetting or confusing the current task when handling complex tasks, and lack the ability to cooperate among multiple agents, resulting in low task processing efficiency.
The design incorporates multiple agents to simulate social division of labor, including planning agents, tool agents, and reflective agents. Tasks are broken down into easily understandable subtasks through code and annotations. Tool agents enhance tools, while reflective agents evaluate and combine static and dynamic planning to ensure the accuracy and efficiency of tasks.
By working collaboratively with multiple agents, the processing power and accuracy of complex tasks are significantly improved, efficient task decomposition and optimization are achieved, and the ability of LLM to solve complex reasoning tasks is enhanced.
Smart Images

Figure CN120450059B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of large language model technology, specifically a method and system for multi-agent collaborative work of large language models. Background Technology
[0002] Existing research on LLM-driven agent planning strategies has achieved great success, and these studies can be divided into two types: static planning and dynamic planning. Static planning methods, such as thought chains and thought trees, allow LLM to decompose reasoning tasks into multiple intermediate steps or sub-problems. In dynamic planning methods, each step of the plan is derived through action- and feedback-based reasoning, thus possessing strong single-step invocation and planning capabilities. In 2022, the Princeton University and Google Brain team proposed "ReAct: Synergizing Reasoning And Acting In Language Models," which uses LLM to generate reasoning trajectories and task-specific actions in an interleaved manner, thereby achieving greater synergy between the two. By accessing external resource APIs to obtain additional business knowledge and generating human-like task-solving trajectories, it overcomes the illusion and error propagation problems commonly found in thought chain reasoning. Although it has the ability to invoke and execute tools, because it plans the next step during execution, it suffers from problems such as the model forgetting or confusing the task to be executed midway when handling multi-step reasoning tasks, and the inability to integrate historical calculation results to output the final answer.
[0003] In recent years, some studies have addressed complex problems by assigning a single agent multiple roles within a task. This agent, driven by a single LLM (Limited Learning Model), independently performs all reasoning, planning, and tool execution. However, this model lacks feedback mechanisms from other agents, limiting their potential to learn and improve performance through feedback from others. It's worth noting that just as humans are often limited by their own abilities and knowledge when handling complex tasks, LLM-based agents with human-like thinking face the same challenge. Fine-grained social division of labor can improve the accuracy and quality of task processing. Solving complex problems often requires cooperation and negotiation among team members, but a single agent lacks the ability to collaboratively execute tasks, and frequent role switching can reduce efficiency. Therefore, multi-agent architectures, comprising two or more agents, each with different roles and responsibilities, can effectively improve the overall performance of the solution task through communication and negotiation mechanisms among multiple agents. Summary of the Invention
[0004] The purpose of this invention is to provide a multi-agent collaborative working method for large language models. When handling complex reasoning tasks, this method solves the problem by calling external resource APIs, thereby improving the accuracy and quality of task execution and addressing the problems mentioned in the background art.
[0005] To achieve the above objectives, one aspect of the present invention provides the following technical solution:
[0006] A method for multi-agent collaborative operation of a large language model includes the following steps:
[0007] S1: Design multiple intelligent agents to simulate social division of labor and collaborative cooperation, enabling each intelligent agent to perform different professional capabilities. The multiple intelligent agents include planning intelligent agents, tool intelligent agents, and reflective intelligent agents.
[0008] S2: When task input is obtained, the planning agent filters the retrieved tools and decomposes the complex task into easy-to-understand subtasks using code and comments.
[0009] S3: The tool agent performs targeted tool enhancements on the filtered toolset and executes specific operations planned by the planning agent to obtain subtask results;
[0010] S4: Reflect on the agent's evaluation of subtask results, and combine static and dynamic programming to plan tasks from different perspectives;
[0011] S5: The planning agent summarizes the results based on the execution feedback of the sub-tasks.
[0012] Preferably, the filtering of the retrieved tools in step S2 specifically includes:
[0013] Given toolset It includes all tools, along with a brief description, relevant parameters, and function for each tool;
[0014] Before task planning, the planning agent will analyze the toolset. Execution tool filtering selects a subset of tools highly relevant to the task. The RTS representation is as follows:
[0015] ;
[0016] in, This represents the selection function for the planning agent. The "I" indicates a tooltip for the filtering tool, while "I" indicates information about complex tasks.
[0017] Preferably, step S2, which involves breaking down a complex task into easily understood subtasks using code and comments, specifically includes:
[0018] The planning agent analyzes a given complex task Q and performs task planning to obtain a logically related set of subtasks S, denoted as:
[0019] ;
[0020] ;
[0021] in, This indicates a task planning hint, where n represents the number of subtasks. This represents the subtasks that have been decomposed. Indicates the subtask objective. Indicates the tools that need to be called. Indicates parameter configuration. This indicates the result of the subtask.
[0022] Preferably, the tool agent in step S3 performs targeted tool enhancement on the filtered toolset, specifically including:
[0023] Tool agents achieve sub-task objectives Required tools and enhanced tool target description To determine the parameter configuration for calling the tool. Parameter configuration Represented as:
[0024] ;
[0025] in, The enhancement function representing the tool agent, This indicates a prompt for the generated tool parameters.
[0026] Preferably, the step S3, which involves executing the specific operation planned by the planning agent to obtain feedback results, specifically includes:
[0027] The tool agent determines the outcome based on the results obtained using external resources. Summarize the tasks and obtain the results of the subtasks. Subtask results Represented as:
[0028] ;
[0029] in, This is a prompt indicating a task summary. Indicates parameter configuration Use the configured interpreter to call the required tools. .
[0030] Preferably, the evaluation results of the reflective agent subtask in step S4 specifically include:
[0031] After the tool agent completes the subtask Then, the reflective agent, based on the tool description... And sub-task objectives Determine if the tool selected for the current subtask is correct; if not, generate a flag. <re-select>This indicates that the tool to be invoked for this subtask needs to be reselected. The tool agent needs to consider the feedback and the subtask objective. Select the tool again and execute;
[0032] The reflective agent determines the results of subtasks. Does it contain any error messages? If it does, generate a flag. <re-call>This indicates that the tool call failed and the parameter configuration for calling the tool needs to be reconsidered. The tool agent needs to re-analyze and select parameter configurations based on feedback. implement;
[0033] Reflective agents further define Whether or not If they are consistent, then generate a tag. <re-sum>This indicates that the tool agent needs to execute the sub-task again and summarize based on the feedback.
[0034] Preferably, step S4, which combines static and dynamic programming to plan the task from different perspectives, specifically includes:
[0035] The reflective agent combination has completed the sub-task. Use information to plan the next subtask The subtasks were specified using comments and code. The objectives and the operations to be performed;
[0036] Subtasks The corresponding subtask in the subtask set S Compare the two tasks and objectives. or the tools called If inconsistent, generate a flag. <re-plan>This indicates that subsequent tasks should be re-planned, and the intelligent agent should reflect on the information gathered and fed back to the planning intelligent agent.
[0037] Preferably, the planning agent summarizing the results based on the execution feedback of the sub-tasks in step S5 specifically includes:
[0038] After the tool agent has completed all subtasks At that time, and after the reflecting agent provides feedback that there are no errors, the planning agent plans based on the execution results R of all subtasks. The summary result of the complex task Q is summarized as follows:
[0039] ;
[0040] in, , A prompt indicating the summary results.
[0041] Preferably, step S5 further includes:
[0042] The results will be visualized.
[0043] Another aspect of the present invention provides a large language model multi-agent collaborative working system, the large language model multi-agent collaborative working system comprising:
[0044] A planning agent is used to control the overall direction of the task, filter the retrieved tools, and decompose complex tasks into easily understandable subtasks using code and comments.
[0045] A tool agent is used to perform targeted tool enhancement on the filtered toolset and execute specific operations planned by the planning agent to obtain subtask results.
[0046] A reflective agent is used to evaluate the results of subtasks, while combining static and dynamic programming to plan tasks from different perspectives.
[0047] Compared with the prior art, the beneficial effects of the present invention are:
[0048] This invention proposes a multi-agent collaborative working method for large language models. This method improves the task processing capabilities of each agent by simulating social division of labor and cooperation. The planning agent filters the retrieved tools and decomposes complex tasks into easily understandable sub-tasks using code and annotations. The tool agent performs targeted tool enhancement on the filtered toolset and executes specific operations planned by the planning agent to obtain sub-task results. The reflection agent evaluates the sub-task results and task planning. At the same time, static planning and dynamic planning are combined to plan tasks from different perspectives. Through a multi-agent task allocation mechanism, complex tasks are decomposed into independent sub-tasks, and each agent executes the corresponding sub-task based on its domain expertise, significantly improving the ability of LLM to solve complex reasoning tasks. Attached Figure Description
[0049] Figure 1 A flowchart illustrating the multi-agent collaborative working method for a large-scale language model provided in this embodiment of the invention;
[0050] Figure 2 A schematic diagram of the framework for a multi-agent collaborative working method for a large-scale language model provided in an embodiment of the present invention;
[0051] Figure 3 This is a schematic diagram illustrating how a planning agent decomposes a complex task into easily understandable sub-tasks in a multi-agent collaborative working method for a large-scale language model provided in this embodiment of the invention. Detailed Implementation
[0052] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0053] Figure 1 This is a flowchart illustrating the multi-agent collaborative working method for a large-scale language model provided in an embodiment of the present invention. Figure 2 This is a schematic diagram illustrating the framework of a multi-agent collaborative working method for a large language model provided by an embodiment of the present invention. The embodiment of the present invention provides a multi-agent collaborative working method for a large language model, such as... Figure 1 and Figure 2 As shown, it includes the following steps:
[0054] S1: Design multiple intelligent agents to simulate social division of labor and collaborative cooperation, enabling each intelligent agent to perform different professional capabilities. The multiple intelligent agents include planning intelligent agents, tool intelligent agents, and reflective intelligent agents.
[0055] S2: When task input is obtained, the planning agent filters the retrieved tools and decomposes the complex task into easy-to-understand subtasks using code and comments.
[0056] S3: The tool agent performs targeted tool enhancements on the filtered toolset and executes specific operations planned by the planning agent to obtain subtask results;
[0057] S4: Reflect on the agent's evaluation of subtask results, and combine static and dynamic programming to plan tasks from different perspectives;
[0058] S5: The planning agent summarizes the results based on the execution feedback of the sub-tasks.
[0059] Specifically, in one embodiment of the present invention, the filtering of the retrieved tools in step S2 specifically includes:
[0060] Given toolset It includes all tools, along with a brief description, relevant parameters, and function for each tool;
[0061] Before task planning, the planning agent will analyze the toolset. Execution tool filtering selects a subset of tools highly relevant to the task. The RTS representation is as follows:
[0062] ;
[0063] in, This represents the selection function for the planning agent. The "I" indicates a tooltip for the filtering tool, while "I" indicates information about complex tasks.
[0064] For example, in a specific example, where for:
[0065] You are an agent responsible for helping users select tools from the tool library to complete user commands;
[0066] Your task is to select the toolset that can be used to complete the user's instructions, based on the user's directives.
[0067] You should understand the user's instructions and determine which given tools are suitable for completing the instructions based on the description of each tool;
[0068] You need to pay attention to the following rules:
[0069] 1. When selecting a toolset to complete a user command, first generate a toolset start marker. <toollist>Then, select one or more tools from the given tool library to complete the user's instructions;
[0070] 2. Toolset start tag <toollist> "and toolset closing tag"< / toollist> The data type between the quotation marks is a list;
[0071] 3. Each tool in the TOOLLIST is separated by a comma. Please strictly follow the example format for output, otherwise errors may occur.
[0072] Figure 3 This is a schematic diagram illustrating how a planning agent decomposes a complex task into easily understandable sub-tasks in a multi-agent collaborative working method for a large-scale language model provided in this embodiment of the invention. For example... Figure 3 As shown, in one embodiment of the present invention, step S2, which decomposes a complex task into easily understandable sub-tasks using code and comments, specifically includes:
[0073] The planning agent analyzes a given complex task Q and performs task planning to obtain a logically related set of subtasks S, denoted as:
[0074] ;
[0075] ;
[0076] in, This indicates a task planning hint, where n represents the number of subtasks. This represents the subtasks that have been decomposed. Indicates the subtask objective. Indicates the tool that needs to be called. Indicates parameter configuration. This indicates the result of the subtask.
[0077] For example, in a specific example, where for:
[0078] You are an agent providing solutions for users' query planning;
[0079] You should provide your plan in natural language in the comments, along with the API call that generates the response in code form. Another model will receive your API call, execute it, and provide you with the results in natural language.
[0080] You need to pay attention to the following rules:
[0081] 1. When an API call is required, first generate a call start marker. <api>Then, select an API from the given API list and generate the exact API name and parameters. After the system identifies the API to be executed, it will extract the correct function call from the launch token and execution token, call the API, and return the desired result. After the end marker is complete, you can simply continue with the task planning.
[0082] 2. Please strictly follow the example output; this is a necessary condition for generating a complete plan.
[0083] For example, a planning agent plans for the following instruction Q:
[0084] I'm planning a trip to Paris next week and would like to generate a QR code for my flight ticket. Could you please generate a QR code for the following URL: "flight booking URL conforming to the HTTP protocol"? Also, I need to convert the date 2022-12-25 to the Islamic calendar to check if it falls on a holiday. Finally, I'd like to generate a random UUID for my hotel booking. Thank you!
[0085] Task planning:
[0086] #Understanding what the user is expressing:
[0087] 1. Generate a QR code for the provided flight ticket URL;
[0088] 2. Convert the date "2022-12-25" to the Islamic calendar to check if the date falls on a public holiday;
[0089] 3. Generate a random UUID for hotel booking.
[0090] #Step 1: Generate a QR code for the provided flight ticket URL
[0091] #To generate a QR code, you need to call Generate QR.
[0092] from tools import Generate QR,
[0093] QR_code= <api> Generate, QR(url="URL of flight booking conforming to the HTTP protocol")< / api> ,
[0094] #Step 1: End;
[0095] #Step 2: Convert the date "2022-12-25" to the Islamic calendar.
[0096] To convert the date "2022-12-25" to the Islamic calendar, you need to call Convert Date.
[0097] from tools import Convert Date,
[0098] Calendar_date= <api> Convert Date(to="Islamic",date="2022-12-25")< / api> ,
[0099] #Step 2: End;
[0100] #Step 3: Generate a random UUID for the hotel booking
[0101] To generate a random UUID, you need to call Generate UUID.
[0102] from tools import Generate UUID,
[0103] Random_UUID= <api> Generate UUID()< / api> ,
[0104] #Step 3: End;
[0105] #Final step: Summarize the above results
[0106] #Summarize the content and provide feedback to users on task completion status.
[0107] #Final step: The end.
[0108] In one embodiment of the present invention, the tool agent in step S3 performs targeted tool enhancement on the filtered toolset, specifically including:
[0109] Tool agents achieve sub-task objectives Required tools and enhanced tool target description To determine the parameter configuration for calling the tool. Parameter configuration Represented as:
[0110] ;
[0111] in, The enhancement function representing the tool agent, This indicates a prompt for the generated tool parameters.
[0112] For example, in a specific example, where for:
[0113] You are an agent responsible for generating parameters to invoke the tool based on the description in the tool documentation.
[0114] You will receive the objectives and information of the relevant instructions, as well as the selected tool and its description.
[0115] You need to pay attention to the following rules:
[0116] 1. Based on the given tool description, subtask objective, and selected tool, please re-recall the tool parameters in the specified format;
[0117] 2. You only need to confirm the parameters and types required to execute the tool; no additional operations are required.
[0118] For example, the original description of the tool used, Convert Date:
[0119] Name: Convert Date
[0120] Description: Converts dates to a specified calendar;
[0121] Parameter description:
[0122] Parameter 1: "to",
[0123] Description: "Convert the calendar for a specified date"
[0124] Required: true
[0125] Parameter 2: "date",
[0126] Description: "A date format",
[0127] Required: false
[0128] Parameter 3: "from",
[0129] describe:"",
[0130] Required field: false.
[0131] Based on the user command shown, the Convert Date tool has been enhanced. The enhanced tool is described below:
[0132] Name: Convert Date
[0133] Description: By using this tool, users can quickly convert Gregorian calendar dates to Islamic calendar (or other supported calendars) and accurately determine the meaning of the date in the target calendar.
[0134] Parameter 1: "to",
[0135] Description: "Specify the target calendar to convert to. In user scenarios, this parameter should be 'Islamic' to convert calendar dates to the Islamic calendar."
[0136] Required: true
[0137] Parameter 2: "date",
[0138] Description: "Specify the date to be converted. In the user manual, this parameter should be set to the specific calendar date the user wishes to convert."
[0139] Required: false
[0140] Parameter 3: "from",
[0141] Description: "Specifies the calendar to which the input date belongs. In user commands, this parameter should be the Gregorian calendar."
[0142] Required: false.
[0143] Furthermore, in one embodiment of the present invention, the step S3 of obtaining feedback results by executing the specific operation planned by the planning agent specifically includes:
[0144] The tool agent determines the outcome based on the results obtained using external resources. Summarize the tasks and obtain the results of the subtasks. Subtask results Represented as:
[0145] ;
[0146] in, This is a prompt indicating a task summary. Indicates parameter configuration Use the configured interpreter to call the required tools. .
[0147] For example, in a specific example, where for:
[0148] You are an agent responsible for executing the results of each subtask and summarizing them after task planning;
[0149] Your task is to generate the parameters for calling the tool to execute each subtask based on the user's instructions and task plan.
[0150] You need to pay attention to the following rules:
[0151] 1. You simply need to call the tool, enter the correct parameters, and the result will be returned by another model;
[0152] 2. Based on the returned results and the target of the current instruction, summarize the generated results.
[0153] In one embodiment of the present invention, the evaluation result of the reflective agent subtask in step S4 specifically includes:
[0154] After the tool agent completes the subtask Then, the reflective agent, based on the tool description... And sub-task objectives Determine if the tool selected for the current subtask is correct; if not, generate a flag. <re-select>This indicates that the tool to be invoked for this subtask needs to be reselected. The tool agent needs to consider the feedback and the subtask objective. Select the tool again and execute;
[0155] The reflective agent determines the results of subtasks. Does it contain any error messages? If it does, generate a flag. <re-call>This indicates that the tool call failed and the parameter configuration for calling the tool needs to be reconsidered. The tool agent needs to re-analyze and select parameter configurations based on feedback. implement;
[0156] The reflective agent further determines the results of subtasks. Is it related to the sub-task objective? If they are consistent, then generate a tag. <re-sum>This indicates that the tool agent needs to execute the sub-task again and summarize based on the feedback.
[0157] Furthermore, in one embodiment of the present invention, the step S4 of simultaneously combining static and dynamic programming to plan the task from different perspectives specifically includes:
[0158] The reflective agent combination has completed the sub-task. Use information to plan the next subtask The subtasks were specified using comments and code. The objectives and the operations to be performed;
[0159] Subtasks The corresponding subtask in the subtask set S Compare the two tasks and objectives. or the tools called If inconsistent, generate a flag. <re-plan>This indicates that subsequent tasks should be re-planned, and the intelligent agent should reflect on the information gathered and fed back to the planning intelligent agent.
[0160] The planning agent is responsible for static planning, while the reflexive agent is responsible for dynamic planning and adjusting the task plan. The main purpose of dynamic planning is to promptly correct errors in task planning and tool usage. This includes: when the tool agent completes each subtask, the reflexive agent checks whether the tool was selected correctly, and the subtask results... Are there any anomalies? Subtask results With sub-task objectives Whether they are consistent; dynamically adjust and reselect the tool, re-invoke the tool, and re-execute the subtask based on the above situation; subtask results. With sub-task objectives If they match, proceed to the next subtask.
[0161] In one embodiment of the present invention, the planning agent summarizing the results based on the execution feedback of the sub-tasks in step S5 specifically includes:
[0162] After the tool agent has completed all subtasks At that time, and after the reflecting agent provides feedback that there are no errors, the planning agent plans based on the execution results R of all subtasks. The summary result of the complex task Q is summarized as follows:
[0163] ;
[0164] in, , A prompt indicating the summary results.
[0165] For example, in a specific example, where for:
[0166] You are an agent responsible for summarizing the results of all subtasks.
[0167] Your task is to summarize the results of a complex problem based on the sub-tasks planned for the problem and their corresponding execution results.
[0168] You need to pay attention to the following rules:
[0169] 1. All the results you summarize must come from the execution results of each subtask;
[0170] 2. Only summarize the execution results; do not modify the original intent.
[0171] Furthermore, step S5 also includes:
[0172] The results will be visualized.
[0173] This invention also provides a large language model multi-agent collaborative working system, which is used to implement the large language model multi-agent collaborative working method described above, including:
[0174] A planning agent is used to control the overall direction of the task, filter the retrieved tools, and decompose complex tasks into easily understandable subtasks using code and comments.
[0175] A tool agent is used to perform targeted tool enhancement on the filtered toolset and execute specific operations planned by the planning agent to obtain subtask results.
[0176] A reflective agent is used to evaluate the results of subtasks, while combining static and dynamic programming to plan tasks from different perspectives.
[0177] This invention provides a multi-agent collaborative system for large language models. This system enhances the task-handling capabilities of each agent by simulating social division of labor and collaboration. The planning agent filters retrieved tools and decomposes complex tasks into easily understandable sub-tasks using code and annotations. The tool agent enhances the filtered toolset and executes specific operations planned by the planning agent to obtain sub-task results. The reflection agent evaluates the sub-task results and task planning. It combines static and dynamic planning to plan tasks from different perspectives. Through multi-agent collaboration, it achieves fully automated processing and dynamic optimization of complex tasks. It performs multi-level semantic parsing of user instructions, decomposes domain tasks into executable sub-task flows, and intelligently orchestrates available tools to acquire external resource information to assist in task resolution. Based on this, a dynamic optimization mechanism is introduced to reflect on and evaluate whether the task is completed efficiently.
[0178] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents. < / api> < / toollist>
Claims
1. A method for multi-agent collaborative operation of a large language model, characterized in that, Includes the following steps: S1: Design multiple intelligent agents to simulate social division of labor and collaborative cooperation, enabling each intelligent agent to perform different professional capabilities. The multiple intelligent agents include planning intelligent agents, tool intelligent agents, and reflective intelligent agents. S2: When task input is obtained, the planning agent filters the retrieved tools and decomposes the complex task into easy-to-understand subtasks using code and comments. S3: The tool agent performs targeted tool enhancements on the filtered toolset and executes specific operations planned by the planning agent to obtain subtask results; S4: Reflect on the agent's evaluation of subtask results, and combine static and dynamic programming to plan tasks from different perspectives; S5: The planning agent summarizes the results based on the execution feedback of the sub-tasks; The filtering of the retrieved tools in step S2 specifically includes: Given toolset It includes all tools, along with a brief description, relevant parameters, and function for each tool; Before task planning, the planning agent will analyze the toolset. Execution tool filtering selects a subset of tools highly relevant to the task. The RTS representation is as follows: ; in, This represents the selection function for the planning agent. This indicates a tooltip for the filtering tool; 'I' indicates information about complex tasks. Step S2, which uses code and comments to break down complex tasks into easily understandable subtasks, specifically includes: The planning agent analyzes a given complex task Q and performs task planning to obtain a logically related set of subtasks S, denoted as: ; ; in, This indicates a task planning hint, where n represents the number of subtasks. This represents the subtasks that have been decomposed. Indicates the subtask objective. Indicates the tools that need to be called. Indicates parameter configuration. Indicates the result of the subtask; The tool agent in step S3 performs targeted tool enhancement on the filtered toolset, specifically including: Tool agents achieve sub-task objectives Required tools and enhanced tool target description To determine the parameter configuration for calling the tool. Parameter configuration Represented as: ; in, The enhancement function representing the tool agent, This indicates a prompt for the generated tool parameters; Step S3, which involves executing the specific operations planned by the planning agent and obtaining feedback results, specifically includes: The tool agent determines the outcome based on the results obtained using external resources. Summarize the tasks and obtain the results of the subtasks. Subtask results Represented as: ; in, This is a prompt indicating a task summary. Indicates parameter configuration Use the configured interpreter to call the required tools. .
2. The method for multi-agent collaborative operation of a large language model according to claim 1, characterized in that, The results of the reflective agent evaluation subtask in step S4 specifically include: After the tool agent completes the subtask Then, the reflective agent, based on the tool description... And sub-task objectives Determine if the tool selected for the current subtask is correct; if not, generate a flag. <re-select>This indicates that the tool to be invoked for this subtask needs to be reselected. The tool agent needs to consider the feedback and the subtask objective. Select the tool again and execute; The reflective agent determines the results of subtasks. Does it contain any error messages? If it does, generate a flag. <re-call>This indicates that the tool call failed and the parameter configuration for calling the tool needs to be reconsidered. The tool agent needs to re-analyze and select parameter configurations based on feedback. implement; Reflective agents further define Whether or not If they are consistent, then generate a tag. <re-sum> This indicates that the tool agent needs to execute the sub-task again and summarize based on the feedback.< / re-sum> 3. The method for multi-agent collaborative work of a large language model according to claim 2, characterized in that, Step S4, which combines static and dynamic programming to plan the task from different perspectives, specifically includes: The reflective agent combination has completed the sub-task. Use information to plan the next subtask The subtasks were specified using comments and code. The objectives and the operations to be performed; Subtasks The corresponding subtask in the subtask set S Compare the two tasks and objectives. or the tools called If inconsistent, generate a flag. <re-plan> This indicates that subsequent tasks should be re-planned, and the intelligent agent should reflect on the information gathered and fed back to the planning intelligent agent.< / re-plan> 4. The method for multi-agent collaborative operation of a large language model according to claim 3, characterized in that, The planning agent in step S5 summarizes the results based on the execution feedback of the sub-tasks, specifically including: After the tool agent has completed all subtasks At that time, and after the reflecting agent provides feedback that there are no errors, the planning agent plans based on the execution results R of all subtasks. The summary result of the complex task Q is summarized as follows: ; in, , A prompt indicating the summary results.
5. The method for multi-agent collaborative work of a large language model according to claim 4, characterized in that, Step S5 also includes: The results will be visualized.
6. A multi-agent collaborative working system for a large language model, characterized in that, The large language model multi-agent collaborative working system is used to implement the large language model multi-agent collaborative working method according to any one of claims 1-5, including: A planning agent is used to control the overall direction of the task, filter the retrieved tools, and decompose complex tasks into easily understandable subtasks using code and comments. A tool agent is used to perform targeted tool enhancement on the filtered toolset and execute specific operations planned by the planning agent to obtain subtask results. A reflective agent is used to evaluate the results of subtasks, while combining static and dynamic programming to plan tasks from different perspectives.
Citation Information
Patent Citations
Intelligent agent construction method and system based on large language model, medium and equipment
CN119512523A
Complex task intelligent planning execution method and device, electronic equipment and storage medium
CN119645662A
Unmanned aerial vehicle inspection system and method based on multi-agent cooperation
CN119717889A