Multi-agent collaboration method, device, equipment and medium based on large language model

By introducing the collaborative cooperation between the main control agent, the task creation agent, the intention orchestration agent and the professional agent in the large language model agent autonomous system, the problem of difficult to achieve multi-agent collaboration is solved, and the natural language reasoning is improved Accuracy and accuracy of processing flow.

CN118551751BActive Publication Date: 2024-11-08ULTRAPOWER SOFTWARE

Patent Information

Application Number
CN202411009034.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2024-11-08
Estimated Expiration
2044-07-26

AI Technical Summary

Technical Problem

The existing technology cannot realize the division of labor and coordination of multiple agents, which leads to the inability of artificial intelligence systems to obtain accurate inference results and perform accurate processing processes in natural language reasoning, affecting the accuracy of the output inference conclusions.

Method used

By introducing the collaborative cooperation between the main control agent, task creation agent, intention orchestration agent and professional agent in the large language model agent autonomous system, we can realize the intention recognition, process reasoning, process decomposition, and process arrangement of natural language to be processed, so as to achieve the purpose of processing, process decomposition, and process arrangement of natural language to be processed. and process processing to ensure the accuracy of inference results.

Benefits of technology

Through the collaborative cooperation of the agent's autonomous system, accurate intention recognition and process processing of natural language to be processed is achieved, the accuracy of reasoning conclusions is improved, and the problem that multi-agent collaboration is difficult to achieve is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118551751B_ABST
    Figure CN118551751B_ABST
Patent Text Reader

Abstract

The present invention provides a multi-agent collaboration method, device, equipment and medium based on a large language model, which relates to the field of artificial intelligence technology, including: obtaining a natural language to be processed, inputting the natural language to be processed into a pre-trained large language model, the main control agent performing intent recognition, process reasoning and process decomposition on the natural language to be processed to obtain a reasoning result and a decomposition process; the task creation agent performs task creation based on the decomposition process to obtain a decomposition task; the intention arrangement agent performs process arrangement based on the reasoning result and the decomposition task to obtain a processing process; the target professional agent is determined from at least one professional agent, and the target professional agent performs process processing based on the corresponding processing process to obtain a processing result; the main control agent performs intention reasoning based on the processing result, obtains and outputs a reasoning conclusion. In this way, accurate reasoning results can be obtained and accurate processing processes can be executed, thereby improving the accuracy of the reasoning conclusion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a multi-agent collaboration method, device, equipment and medium based on a large language model. Background Art

[0002] As the digital transformation of society continues to deepen, computing power has exploded, greatly promoting the development of artificial intelligence technology. In particular, the rapid development of large artificial intelligence models represented by LLM (Large Language Model) has promoted the deep integration of artificial intelligence technology and application systems, and enabled application software to set off a climax in the development and application of large artificial intelligence models.

[0003] The technology of building application systems based on large language models refers to using pre-trained large language models as the core components of artificial intelligence systems, cooperating with intelligent agents to realize reasoning of natural language, and thus outputting reasoning conclusions. However, in related technologies, it is impossible to realize the division of labor and coordination of multiple intelligent agents, so that it is impossible to obtain accurate reasoning results and execute accurate processing procedures, which in turn affects the accuracy of the output reasoning conclusions. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide a multi-agent collaboration method, device, equipment and medium based on a large language model to achieve the division of labor and collaboration of multiple agents, so as to obtain accurate reasoning results and execute accurate processing procedures, and then output accurate reasoning conclusions.

[0005] In the first aspect, an embodiment of the present invention provides a multi-agent collaboration method based on a large language model, which is applied to an agent autonomous system of a large language model, including a master control agent, a task creation agent, an intention orchestration agent and at least one professional agent; the large language model is deployed with a pre-built agent autonomous system, and the method includes: obtaining a natural language to be processed, inputting the natural language to be processed into a pre-trained large language model, the master control agent performs intention recognition, process reasoning and process decomposition on the natural language to be processed to obtain a reasoning result and a decomposition process; the task creation agent performs task creation based on the decomposition process to obtain a decomposition task; the intention orchestration agent performs process orchestration based on the reasoning result and the decomposition task to obtain a processing process; a target professional agent is determined from at least one professional agent, and the target professional agent performs process processing based on the corresponding processing process to obtain a processing result; the master control agent performs intention reasoning based on the processing result to obtain and output a reasoning conclusion.

[0006] In a preferred embodiment of the present invention, the intelligent agent autonomous system also includes: a task scheduling execution agent; after determining the target professional intelligent agent from at least one professional intelligent agent, the method also includes: the task scheduling execution agent calls the corresponding target professional intelligent agent based on the processing flow, so that the target professional intelligent agent performs process processing based on the processing flow to obtain a processing result.

[0007] In a preferred embodiment of the present invention, when the task creation agent creates the task based on the decomposition process to obtain the decomposed task, the method also includes: if the task creation agent encounters an error in the process of task creation, or an error occurs in the generated decomposed task, a first error report is generated and the first error report is fed back to the main control agent; the main control agent decomposes the process again based on the first error report to obtain a revised decomposition process, so that the task creation agent can create the task again based on the revised decomposition process.

[0008] In a preferred embodiment of the present invention, the professional intelligent agent also includes at least one subtask processing intelligent agent, and the target professional intelligent agent performs process processing based on the corresponding processing process to obtain a processing result, including: the target professional intelligent agent assigns tasks to its subtask processing intelligent agent based on the corresponding processing process; the subtask processing intelligent agent processes the corresponding reasoning task to obtain a processing result.

[0009] In a preferred embodiment of the present invention, the intelligent agent autonomous system also includes an observation and perception module. After the target professional intelligent agent performs process processing based on the corresponding processing flow to obtain a processing result, the method also includes: the observation and perception module performs correctness detection on the processing result to determine whether the processing result is correct; if the processing result is incorrect, a second error report is generated and the second error report is fed back to the main control intelligent agent; the main control intelligent agent performs process reasoning on the natural language to be processed again based on the second error report to obtain a first revised reasoning result, so that the intentional orchestration intelligent agent can perform process orchestration again based on the first revised reasoning result.

[0010] In a preferred embodiment of the present invention, the observation perception module also includes: an observation head; if the processing result is correct, the observation head performs feature extraction processing on the processing result to obtain result features; the main control agent performs intention reasoning based on the result features to obtain reasoning conclusions.

[0011] In a preferred embodiment of the present invention, the method also includes: associating and storing the observation results of the observation perception module and the scheduling tasks of the task scheduling execution agent; the task scheduling execution agent calls the corresponding professional agent based on the stored observation results, scheduling tasks and processing flow in the next cycle; the main control agent performs intent recognition, process reasoning and process decomposition and intent reasoning steps based on the stored observation results and scheduling tasks in the next cycle.

[0012] In the second aspect, an embodiment of the present invention also provides a multi-agent collaborative device based on a large language model, including: applied to a large language model, the agent autonomous system includes a master agent, a task creation agent, an intention orchestration agent and at least one professional agent; the large language model is deployed with a pre-built agent autonomous system, and the device includes: a natural language acquisition module to be processed, used to obtain the natural language to be processed, input the natural language to be processed into a pre-trained large language model, and the master agent performs intention recognition, process reasoning and process decomposition on the natural language to be processed to obtain reasoning results and decomposition processes; a task creation module, used for the task creation agent to create tasks based on the decomposition process to obtain decomposition tasks; a process orchestration module, used for the intention orchestration agent to perform process orchestration based on the reasoning results and decomposition tasks to obtain a processing process; a process processing module, used to determine the target professional agent from at least one professional agent, and the target professional agent performs process processing based on the corresponding processing process to obtain a processing result; an intention reasoning module, used for the master agent to perform intention reasoning based on the processing result; the intention reasoning module, used for the master agent to perform intention reasoning based on the processing result, obtain and output the reasoning conclusion.

[0013] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the multi-agent collaboration method based on a large language model of the first aspect mentioned above.

[0014] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the multi-agent collaboration method based on a large language model of the first aspect.

[0015] The embodiments of the present invention bring the following beneficial effects:

[0016] The embodiment of the present invention provides a multi-agent collaboration method, device, equipment and medium based on a large language model, which is applied to a large language model agent autonomous system including a master control agent, a task creation agent, an intention arrangement agent and at least one professional agent; the large language model is deployed with a pre-built agent autonomous system. By obtaining the natural language to be processed, the natural language to be processed is input into the pre-trained large language model, the master control agent performs intention recognition, process reasoning and process decomposition on the natural language to be processed to obtain reasoning results and decomposition processes, the task creation agent performs task creation based on the decomposition process to obtain decomposition tasks, the intention arrangement agent performs process arrangement based on the reasoning results and decomposition tasks to obtain a processing process, a target professional agent is determined from at least one professional agent, the target professional agent performs process processing based on the corresponding processing process to obtain a processing result, and the master control agent performs intention reasoning based on the processing result to obtain and output the reasoning conclusion. In this way, through the collaborative cooperation of the master agent, task creation agent, intent orchestration agent and professional agent in the agent autonomous system, intention recognition, process reasoning, process decomposition, process orchestration and process processing of the natural language to be processed are realized, accurate reasoning results can be obtained and accurate processing flow can be executed, and then accurate reasoning conclusions can be output, thereby improving the accuracy of the reasoning conclusions.

[0017] Other features and advantages of the present disclosure will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by implementing the above-mentioned technology of the present disclosure.

[0018] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 A flowchart of a multi-agent collaboration method based on a large language model provided by an embodiment of the present invention;

[0021] Figure 2 A logic diagram of a multi-agent collaboration method based on a large language model provided by an embodiment of the present invention;

[0022] Figure 3A logic diagram for performing intention reasoning on another intelligent agent autonomous system provided by an embodiment of the present invention;

[0023] Figure 4 A schematic diagram of the structure of a multi-agent collaboration device based on a large language model provided by an embodiment of the present invention;

[0024] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0026] The technology of building application systems based on large language models refers to using pre-trained large language models as the core components of artificial intelligence systems, cooperating with intelligent agents to realize reasoning of natural language, and thus outputting reasoning conclusions. However, in related technologies, it is impossible to realize the division of labor and coordination of multiple intelligent agents, so that it is impossible to obtain accurate reasoning results and execute accurate processing procedures, which in turn affects the accuracy of the output reasoning conclusions.

[0027] In the computing network operation and maintenance solution based on the LLM large model, there are the following specific problems:

[0028] (1) The above technical solution cannot synchronously perceive the changes in the new computing power network environment and comprehensively consider them in reasoning.

[0029] (2) The above technical solutions usually train one LLM for multiple requirements and restrictions of one application scenario, and use one LLM to handle the problems of one application scenario. It is impossible to accurately complete the target tasks imported from outside the system or the system's autonomous monitoring and processing tasks.

[0030] (3) Existing language agent frameworks rely only on brief task descriptions and completely depend on the planning and action capabilities of LLMs. This can lead to significant randomness and inconsistency between different runs, providing an unsatisfactory user experience and making it difficult to adjust task planning and actions in a timely manner based on unexpected situations.

[0031] Based on this, the embodiments of the present invention provide a multi-agent collaboration method, device, equipment and medium based on a large language model, which can realize intent recognition, process reasoning, process decomposition, process orchestration and process processing of the natural language to be processed through the collaborative cooperation of the master agent, task creation agent, intention orchestration agent and professional agent in the agent autonomous system, and can obtain accurate reasoning results and execute accurate processing procedures, and then output accurate reasoning conclusions, thereby improving the accuracy of the reasoning conclusions.

[0032] To facilitate understanding of this embodiment, a multi-agent collaboration method based on a large language model disclosed in an embodiment of the present invention is first introduced in detail.

[0033] Example 1

[0034] The embodiment of the present invention provides a multi-agent collaboration method based on a large language model, which is applied to a large language model. The agent autonomous system includes a master agent, a task creation agent, an intention arrangement agent and at least one professional agent; the large language model is deployed with a pre-built agent autonomous system. Figure 1 The flowchart of a multi-agent collaboration method based on a large language model provided by an embodiment of the present invention. Figure 1 As shown, the multi-agent collaboration method based on a large language model may include the following steps:

[0035] Step S101, obtain the natural language to be processed, input the natural language to be processed into a pre-trained large language model, and the main control agent performs intent recognition, process reasoning and process decomposition on the natural language to be processed to obtain reasoning results and decomposition processes.

[0036] The natural language to be processed may be the natural language actively input by the user according to his / her own intentions and needs, that is, the natural language to be processed may include the intentions and needs of the user.

[0037] Optionally, the main control agent performs intent recognition and process reasoning on the natural language to be processed to obtain reasoning results; based on historical cases in the large language, pre-set reasoning templates and pre-generated prompt word sets, the process of the natural language to be processed is decomposed to obtain a decomposed process.

[0038] Among them, the reasoning results may include: associated actions corresponding to the task intent, processing tools associated with the task intent, processing key points prompts corresponding to the task intent, and precautions prompts corresponding to the task intent.

[0039] Among them, intention reasoning is performed through the associated actions, processing tools, processing key points prompts, precautions prompts, etc. corresponding to the task intention, so that the intention orchestration agent can arrange the task process, which improves the accuracy of task orchestration, and then makes the professional agent more in line with the processing process, improving the accuracy of intention reasoning.

[0040] Among them, since the master agent bears more important computing power responsibilities, the master agent is a large-scale agent, which has a greater demand for computing resources and data storage. The master agent has higher processing power, can process information, make decisions and execute actions faster, can cope with more complex environments and tasks, and improve the overall performance and response speed of the system.

[0041] Among them, the main control agent performs intent recognition and process reasoning on the natural language to be processed through a large language model based on its own performance and functions to obtain reasoning results.

[0042] Among them, the reasoning result may include the user's intention of the natural language representation to be processed, the associated action corresponding to the intention, the processing tool associated with the intention, the processing key points prompt description corresponding to the intention, and the precautions prompt description corresponding to the intention, etc.

[0043] Among them, process decomposition can be understood as the detailed division of the agent's actions by the main control agent, decomposing the process into more detailed actions.

[0044] Among them, if the main control agent receives prompt information from external input, the main control agent updates the reasoning results and decomposition process based on the prompt information.

[0045] Step S102: The task creation agent creates tasks based on the decomposition process to obtain decomposed tasks.

[0046] Step S103: the intention orchestration agent performs process orchestration based on the reasoning results and decomposed tasks to obtain a processing flow.

[0047] Among them, the intent-orchestration agent and the task-creation agent do not need to bear too much computing power responsibility, they only need to complete their work. Therefore, the intent-orchestration agent and the task-creation agent can be small and medium-sized agents, reducing the burden on the server and the burden on storage space.

[0048] Among them, the task creation agent takes each decomposition process as a task to create a task and obtain the decomposed task.

[0049] Furthermore, the agent autonomous system further includes: a task scheduling execution agent. After the intention scheduling agent performs process scheduling based on the reasoning result and the decomposed task to obtain the processing flow, the method further includes:

[0050] The task scheduling execution agent calls the corresponding target professional agent based on the processing flow, so that the target professional agent performs process processing based on the processing flow to obtain the processing result.

[0051] Step S104, determining a target professional agent from at least one professional agent, and the target professional agent performs process processing based on the corresponding processing flow to obtain a processing result.

[0052] Among them, at least one professional agent realizes precise execution and deterministic result feedback of domain-specific subtasks.

[0053] In the embodiments of the present application, based on the medium-sized and small-scale control of LLM and structured input-output AI models, not only the processing efficiency and accuracy of subdivided professional agents are improved, but also the comprehensive costs of model training, deployment, operation and maintenance can be greatly saved.

[0054] Professional intelligent agents also do not need to bear too much computing power responsibility, they only need to complete their work. Therefore, professional intelligent agents can be small and medium-sized intelligent agents, reducing the burden on servers and storage space.

[0055] Among them, the processing flow may include the correspondence between professional intelligent agents and reasoning tasks. Professional intelligent agents can assign tasks and perform process processing through the processing flow to obtain processing results.

[0056] Step S105: The master intelligent agent performs intention reasoning based on the processing results, obtains and outputs the reasoning conclusion.

[0057] The master agent performs intention reasoning based on its own performance and function reference processing results to obtain a reasoning conclusion. The processing result can be, for example, the problem analysis result corresponding to the natural language to be processed. The reasoning conclusion is the problem solution obtained by reasoning based on the problem analysis result.

[0058] The multi-agent collaboration method based on a large language model provided in an embodiment of the present invention realizes intent recognition, process reasoning, process decomposition, process orchestration and process processing of the natural language to be processed through the collaborative cooperation of the master agent, task creation agent, intention orchestration agent and professional agent in the agent autonomous system. It can obtain accurate reasoning results and execute accurate processing procedures, and then output accurate reasoning conclusions, thereby improving the accuracy of the reasoning conclusions.

[0059] Example 2

[0060] The embodiment of the present invention also provides another multi-agent collaboration method based on a large language model; this method is implemented on the basis of the method of the above embodiment. The multi-agent collaboration method based on a large language model may include the following steps:

[0061] Step S201, obtaining natural language to be processed.

[0062] Step S202, input the natural language to be processed into a pre-trained large language model, and the main control agent performs intent recognition, process reasoning and process decomposition on the natural language to be processed to obtain reasoning results and decomposition processes.

[0063] Optionally, the main control agent performs intent recognition and process reasoning on the natural language to be processed to obtain reasoning results; based on historical cases in the large language, pre-set reasoning templates and pre-generated prompt word sets, the process of the natural language to be processed is decomposed to obtain a decomposed process.

[0064] It should be noted that step S201-step S202 are similar to the above-mentioned step S101-step S102 and are not described in detail here.

[0065] In step S203, the task creation agent creates a task based on the decomposition process, obtains the decomposed task, and executes step S206.

[0066] Step S204: If an error occurs in the task creation process of the task creation agent, or an error occurs in the generated decomposed task, a first error report is generated and fed back to the main control agent.

[0067] In step S205, the master control agent performs process decomposition again based on the first error report to obtain a revised decomposition process, so that the task creation agent can perform task creation based on the revised decomposition process to obtain a decomposed task, and execute step S206.

[0068] Step S206: The intention orchestration agent performs process orchestration based on the reasoning results and decomposed tasks to obtain a processing flow.

[0069] Step S207, determining a target professional agent from at least one professional agent, and the task scheduling execution agent calls the corresponding target professional agent based on the processing flow.

[0070] Step S208, the target professional agent assigns tasks to its subtask processing agent based on the corresponding processing flow, and the subtask processing agent processes the corresponding reasoning task to obtain a processing result.

[0071] The subtask agents may include: data processing agents, problem analysis agents, strategy generation agents, and execution processing agents, etc. Tasks may be assigned based on the correspondence between the subtask agents and the reasoning tasks included in the processing flow, and the reasoning tasks corresponding to the subtask agents may be determined.

[0072] In the embodiment of the present application, the processing flow that cannot be solved can also be processed based on a preset external information library to obtain a processing result.

[0073] Among them, the external information library may include: real-time perception data, rule library, template library, knowledge graph, database, code library and plug-in library, etc., which can be directly searched through the external information library to execute the corresponding reasoning process.

[0074] Furthermore, the agent autonomous system further includes an observation perception module. After the target professional agent performs process processing based on the corresponding process flow to obtain a processing result, the method further includes:

[0075] Step S209, the observation and perception module performs a correctness test on the processing result to determine whether the processing result is correct. If the processing result is incorrect, step S210 is executed, and if the processing result is correct, step S211 is executed.

[0076] Step S210, if the processing result is incorrect, a second error report is generated and fed back to the main control agent; the main control agent performs process reasoning on the natural language to be processed again based on the second error report, and obtains a first corrected reasoning result, so that the intentional orchestration agent can perform process orchestration again based on the first corrected reasoning result.

[0077] Among them, the observation and perception module can detect the correctness of the processing results in real time, and generate a second error report and feedback to the main control agent if the processing result is incorrect, so that the main control agent can perform process reasoning again through the second error report to obtain a new reasoning result, namely the first corrected reasoning result.

[0078] Specifically, the observation perception module also includes: an observation head, and the main control agent performs intention reasoning based on the processing results to obtain reasoning conclusions, which may include:

[0079] Step S211: If the processing result is correct, the observation head performs feature extraction processing on the processing result to obtain result features.

[0080] Among them, the observation head receives the processing result and determines whether the data form of the processing result is a format that can be recognized and understood by the main control intelligent body through the environmental information required by the main control intelligent body. When it is determined that the main control intelligent body cannot recognize and understand it, the processing result can be normalized and then feature extracted to obtain the result feature. The result feature is the processing result that can be recognized and understood by the main control intelligent body.

[0081] In step S212, the master intelligent agent performs intention reasoning based on the result features, obtains and outputs the reasoning conclusion.

[0082] Among them, the main control agent performs intention reasoning based on its own performance and functional reference result characteristics to obtain reasoning conclusions.

[0083] Furthermore, in order to reduce the workload of the intelligent agent system and improve the efficiency of reasoning with large language models, the method may also include: associating and storing the observation results of the observation perception module and the scheduling tasks of the task scheduling execution agent; the task scheduling execution agent calls the corresponding professional agent based on the stored observation results, scheduling tasks and processing flow in the next cycle; the main control agent performs intent recognition, process reasoning and process decomposition, and intent reasoning steps based on the stored observation results and scheduling tasks in the next cycle.

[0084] The scheduling task is a task that the task scheduling execution agent schedules and assigns to the decomposed tasks according to the professional field of the professional agent. The observation result includes the processing result obtained by the professional agent after processing the process according to the processing flow corresponding to the assigned task, as well as the correctness of the processing result.

[0085] Among them, by associating and storing observation results and scheduling tasks, the corresponding professional intelligent agent can be directly called in the next cycle, as well as the steps of intent recognition, process reasoning, process decomposition and intent reasoning, which improves the reasoning efficiency.

[0086] For ease of understanding, Figure 2 A logic diagram of a multi-agent collaboration method based on a large language model provided by an embodiment of the present invention. Figure 2 As shown, the main control agent performs intent recognition, process reasoning and process decomposition on the processed natural language to obtain the reasoning results and the decomposition process; the task creation agent creates tasks based on the decomposition process to obtain decomposed tasks; the task creation agent can create tasks according to the decomposition process to obtain decomposed tasks, and when an error occurs in the task creation process of the task creation agent, or an error occurs in the generated decomposed task, a first error report is generated and the first error report is fed back to the main control agent.

[0087] The intention-scheduling agent performs process orchestration through the inference results and decomposition process to obtain the processing process. In the case of an error in the processing process, the error processing process is fed back to the main control agent to initiate a new round of thinking and reasoning. The task scheduling execution agent can call the corresponding target professional agent according to the processing process, so that at least one subtask processing agent included in the target professional agent can perform process processing based on the processing process to obtain the processing result; in the case that the subtask processing agent cannot execute the corresponding reasoning process, the subtask processing agent processes the inability to execute the corresponding reasoning process through the external information library to obtain the processing result; the observation perception module performs a correctness check on the processing result, and if the processing result is incorrect, a second error report is generated and fed back to the main control agent; if the processing result is correct, the observation head receives the processing result, processes the processing result to obtain the result feature and sends it to the main control agent, so that the main control agent can perform intention reasoning, obtain and output the reasoning conclusion.

[0088] Furthermore, the subtask processing agent can perform self-learning through an external information base and then execute the corresponding reasoning process.

[0089] The multi-agent collaboration method based on a large language model provided in an embodiment of the present invention realizes intent recognition, process reasoning, process decomposition, process orchestration and process processing of the natural language to be processed through the division of labor and collaborative cooperation of multiple agents, thereby improving the accuracy of reasoning conclusions.

[0090] Example 3

[0091] For ease of understanding, Figure 3 Another logic diagram of an intelligent agent autonomous system performing intention reasoning according to an embodiment of the present invention is shown in FIG. Figure 3 As shown, the master agent uses reasoning templates, prompt word sets, and historical cases to perform intent recognition, process reasoning, and process decomposition on the natural language to be processed to obtain reasoning results and decomposition processes; the task creation agent creates tasks based on the decomposition process to obtain decomposed tasks. If the task creation agent makes an error in the process of task creation, or the generated decomposed task makes an error, a first error report is generated and fed back to the master agent.

[0092] The intention-scheduling agent performs process choreography and process verification through the reasoning results and decomposition process to obtain the processing process. In the case of an error in the processing process, the intention-scheduling agent feeds back the error to the main control agent. When there is no error in the processing process, the target professional agent is determined; the task scheduling execution agent can call the corresponding target professional agent according to the processing process to process the process; the target professional agent performs task allocation according to the processing process to determine the reasoning task corresponding to the subtask processing agent. The subtask processing agent processes the reasoning task to obtain the processing result; the subtask processing agent processes the unsolvable reasoning subtask through the external information library to obtain the processing result. The observation perception system performs a correctness check on the processing result. If the processing result is incorrect, a second error report is generated and fed back to the main control agent; if the processing result is correct, the observation head receives the processing result, processes the processing result to obtain the result feature and sends it to the main control agent for the main control agent to perform intention reasoning.

[0093] The method for determining the reasoning process based on a large language model provided in an embodiment of the present invention can obtain accurate reasoning results and execute accurate processing procedures, and then output accurate reasoning conclusions, thereby solving the problem of hallucinations occurring during the reasoning process and improving the accuracy of the reasoning conclusions.

[0094] Example 4

[0095] Corresponding to the above method embodiment, the embodiment of the present invention provides a multi-agent collaboration device based on a large language model, which is applied to the large language model. The agent autonomous system includes a master agent, a task creation agent, an intention scheduling agent and at least one professional agent; the large language model is deployed with a pre-built agent autonomous system. Figure 4 A schematic diagram of the structure of a multi-agent collaboration device based on a large language model provided by an embodiment of the present invention is shown in FIG. Figure 4 As shown, the multi-agent collaboration device based on the large language model may include:

[0096] The natural language acquisition module 401 to be processed is used to acquire the natural language to be processed, input the natural language to be processed into a pre-trained large language model, and the main control agent performs intent recognition, process reasoning and process decomposition on the natural language to be processed to obtain the reasoning result and decomposition process;

[0097] Task creation module 402, used for the task creation agent to create tasks based on the decomposition process to obtain decomposed tasks;

[0098] Process orchestration module 403, used for the intention orchestration agent to perform process orchestration based on the reasoning results and decomposed tasks to obtain a processing flow;

[0099] A process processing module 404 is used to determine a target professional agent from at least one professional agent, and the target professional agent performs process processing based on a corresponding processing process to obtain a processing result;

[0100] The intention reasoning module 405 is used for the master intelligent agent to perform intention reasoning based on the processing results, and obtain and output the reasoning conclusion.

[0101] The multi-agent collaborative device based on a large language model provided in an embodiment of the present invention can realize intent recognition, process reasoning, process decomposition, process orchestration and process processing of the natural language to be processed through the collaborative cooperation of the master agent, task creation agent, intention orchestration agent and professional agent in the agent autonomous system, and can obtain accurate reasoning results and execute accurate processing procedures, and then output accurate reasoning conclusions, thereby improving the accuracy of the reasoning conclusions.

[0102] In some embodiments, the intelligent agent autonomous system also includes: a task scheduling execution intelligent agent, a process orchestration module, and a task scheduling execution intelligent agent calling the corresponding target professional intelligent agent based on the processing flow, so that the target professional intelligent agent performs process processing based on the processing flow to obtain processing results.

[0103] In some embodiments, the task creation module is also used to generate a first error report and feed back the first error report to the main control agent if an error occurs in the task creation process or an error occurs in the generated decomposed task; the main control agent performs process decomposition again based on the first error report to obtain a corrected decomposition process, so that the task creation agent can perform task creation and process orchestration again based on the corrected decomposition process.

[0104] In some embodiments, the professional agent also includes at least one subtask processing agent and a process processing module, and is also used by the target professional agent to assign tasks to its subtask processing agents based on the corresponding processing process; the subtask processing agent processes the corresponding reasoning tasks and obtains processing results.

[0105] In some embodiments, the intelligent agent autonomous system also includes an observation and perception module, a process processing module, and is also used for the observation and perception module to perform correctness detection on the processing result to determine whether the processing result is correct; if the processing result is incorrect, a second error report is generated and the second error report is fed back to the main control intelligent agent; the main control intelligent agent performs process reasoning on the natural language to be processed again based on the second error report, and obtains a first corrected reasoning result, so that the intention-orchestration intelligent agent can perform process orchestration again based on the first corrected reasoning result.

[0106] In some embodiments, the observation perception module also includes: an observation head; if the processing result is correct, the observation head performs feature extraction processing on the processing result to obtain result features; the main control agent performs intention reasoning based on the result features to obtain reasoning conclusions.

[0107] In some embodiments, the device also includes an associated storage module, which is used to associate and store the observation results of the observation perception module and the scheduling tasks of the task scheduling execution agent; the task scheduling execution agent calls the corresponding professional agent based on the stored observation results, scheduling tasks and processing flow in the next cycle; the main control agent performs intent recognition, process reasoning and process decomposition and intention reasoning steps based on the stored observation results and scheduling tasks in the next cycle.

[0108] The device provided in the embodiment of the present invention has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the device embodiment, reference may be made to the corresponding contents in the aforementioned method embodiment.

[0109] Example 5

[0110] The embodiment of the present invention also provides an electronic device for running the multi-agent collaboration method based on a large language model; see Figure 5 A structural schematic diagram of an electronic device is shown, which includes a memory 500 and a processor 501, wherein the memory 500 is used to store one or more computer instructions, and the one or more computer instructions are executed by the processor 501 to implement the above-mentioned multi-agent collaboration method based on a large language model.

[0111] Further, Figure 5 The electronic device shown further includes a bus 502 and a communication interface 503 , and the processor 501 , the communication interface 503 and the memory 500 are connected via the bus 502 .

[0112] The memory 500 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 503 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 502 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0113] The processor 501 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 501. The above processor 501 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 500, and the processor 501 reads the information in the memory 500 and completes the steps of the method of the above embodiment in combination with its hardware.

[0114] An embodiment of the present invention also provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the above-mentioned multi-agent collaboration method based on a large language model. The specific implementation can be found in the method embodiment, which will not be repeated here.

[0115] The computer program product for performing a multi-agent collaboration method based on a large language model provided in an embodiment of the present invention includes a computer-readable storage medium storing a non-volatile program code executable by a processor. The instructions included in the program code can be used to execute the method in the previous method embodiment. The specific implementation can be found in the method embodiment, which will not be repeated here.

[0116] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0117] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0118] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0119] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0120] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0121] Finally, it should be noted that the above embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A multi-agent collaboration method based on a large language model, characterized in that: Applied to large language models, the agent autonomous system includes a master agent, a task creation agent, an intent orchestration agent, and at least one professional agent; The large language model is deployed with a pre-built agent autonomous system, and the method includes: Obtaining a natural language to be processed, inputting the natural language to be processed into a pre-trained large language model, and the master control agent performing intent recognition, process reasoning and process decomposition on the natural language to be processed to obtain a reasoning result and a decomposition process; The task creation agent creates tasks based on the decomposition process to obtain decomposed tasks; The intention choreography agent performs process choreography based on the reasoning result and the decomposed task to obtain a processing process; Determine a target professional agent from at least one of the professional agents, wherein the target professional agent performs process processing based on a corresponding process flow to obtain a processing result; The master control agent performs intention reasoning based on the processing result, obtains and outputs a reasoning conclusion; The reasoning results include: associated actions corresponding to the task intention, processing tools associated with the task intention, processing key points prompts corresponding to the task intention, and precautions prompts corresponding to the task intention; The processing flow includes the correspondence between the professional agents and the reasoning tasks; The processing result is a problem analysis result corresponding to the natural language to be processed, and the reasoning conclusion is a problem-solving measure obtained by reasoning based on the problem analysis result; The at least one professional agent achieves precise execution and deterministic result feedback of domain-specific tasks.

2. The method according to claim 1, characterized in that The agent autonomous system further comprises: a task scheduling execution agent; after determining a target professional agent from at least one of the professional agents, the method further comprises: The task scheduling execution agent calls the corresponding target professional agent based on the processing flow, so that the target professional agent performs flow processing based on the processing flow to obtain a processing result.

3. The method according to claim 1, characterized in that When the task creation agent creates tasks based on the decomposition process to obtain decomposed tasks, the method further includes: If an error occurs in the task creation process of the task creation agent, or an error occurs in the generated decomposed task, a first error report is generated and the first error report is fed back to the master control agent; The master control agent performs process decomposition again based on the first error report to obtain a revised decomposition process, so that the task creation agent can perform task creation again based on the revised decomposition process.

4. The method according to claim 2, characterized in that: The professional agent also includes at least one subtask processing agent. The target professional agent performs process processing based on the corresponding process to obtain a processing result, including: The target professional agent assigns tasks to its subtask processing agent based on the corresponding processing flow; the subtask processing agent processes the corresponding reasoning tasks to obtain the processing results.

5. The method according to claim 4, characterized in that The agent autonomous system further includes an observation and perception module. After the target professional agent performs process processing based on the corresponding process flow to obtain a processing result, the method further includes: The observation and perception module performs a correctness test on the processing result to determine whether the processing result is correct; If the processing result is incorrect, generating a second error report and feeding back the second error report to the master control agent; The master control agent performs process reasoning on the natural language to be processed again based on the second error report to obtain a first revised reasoning result, so that the intention-orchestration agent can perform process orchestration again based on the first revised reasoning result.

6. The method according to claim 5, characterized in that The observation and perception module further includes: an observation head; If the processing result is correct, the observation head performs feature extraction processing on the processing result to obtain result features; The master control agent performs intention reasoning based on the result features to obtain a reasoning conclusion.

7. The method according to claim 5, characterized in that The method further comprises: Associate and store the observation results of the observation perception module and the scheduling tasks of the task scheduling execution agent; The task scheduling execution agent calls the corresponding professional agent based on the stored observation results, scheduling tasks and the processing flow in the next cycle; In the next cycle, the master control agent performs the steps of intention recognition, process reasoning, process decomposition and intention reasoning based on the stored observation results and scheduling tasks.

8. A multi-agent collaborative device based on a large language model, characterized in that: Applied to large language models, the agent autonomous system includes a master agent, a task creation agent, an intent orchestration agent, and at least one professional agent; The large language model is deployed with a pre-built agent autonomous system, the apparatus comprising: A module for acquiring natural language to be processed is used to acquire natural language to be processed, input the natural language to be processed into a pre-trained large language model, and the master control agent performs intent recognition, process reasoning and process decomposition on the natural language to be processed to obtain reasoning results and decomposition processes; A task creation module, used for the task creation agent to create tasks based on the decomposition process to obtain decomposed tasks; A process orchestration module, used for the intention orchestration agent to perform process orchestration based on the reasoning result and the decomposed task to obtain a processing process; A process processing module, used to determine a target professional agent from at least one of the professional agents, and the target professional agent performs process processing based on a corresponding processing process to obtain a processing result; An intention reasoning module, used for the master intelligent agent to perform intention reasoning based on the processing result, obtain and output a reasoning conclusion; The reasoning results include: associated actions corresponding to the task intention, processing tools associated with the task intention, processing key points prompts corresponding to the task intention, and precautions prompts corresponding to the task intention; The processing flow includes the correspondence between the professional agents and the reasoning tasks; The processing result is a problem analysis result corresponding to the natural language to be processed, and the reasoning conclusion is a problem-solving measure obtained by reasoning based on the problem analysis result; The at least one professional agent achieves precise execution and deterministic result feedback of domain-specific tasks.

9. An electronic device, characterized in that: It includes a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the multi-agent collaboration method based on a large language model as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are called and executed by the processor, the computer-executable instructions prompt the processor to implement the multi-agent collaboration method based on a large language model as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Information processing method and device, robot and storage medium

    CN117033598A

  • Lamp screen equipment, lamp effect intelligent control method, corresponding device and medium

    CN117500117A

  • Information interaction method and device based on large language model and electronic equipment

    CN118093801A

  • Task execution method and device, equipment, medium and program product

    CN118193754A

  • Automated user experience orchestration using natural language based machine learning techniques

    US11928569B1

Cited By

  • Software multi-agent collaboration method and system based on large language model

    CN121523815A