Question answering method and device based on multi-agent, medium, equipment and program product

CN121542390BActive Publication Date: 2026-08-07BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING VOLCANO ENGINE TECH CO LTD
Filing Date
2025-12-12
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0003]然而,虽然相关技术中已经存在基于智能体实现问答的方案,但这些方案仍然需要改进

Benefits of technology

[0010]能力越高的第二智能体决策成本越高,能力越高的第二智能体适配规划复杂问题的计划,能力低的第二智能体也能准确规划出简单问题的计划,因此,面对不同类型的问题,采用与不同类型对应的第二智能体得到用于回答第一目标问题的目标计划,模拟了人类处理不同类型的问题的处理逻辑,以在获得准确的目标计划的前提下实现决策成本与问题类型的匹配,以此平衡问答中的处理效率、资源消耗和回复成功率等性能;通过不同的智能体实现问答中不同节点的处理,即第一目标问题的类型分析、第一目标问题所对应的目标计划的规划以及目标计划的执行,从而实现了问答中不同节点的解耦,此外,还可以动态确定执行者集合,进而使得整体方案具有更高的灵活性和可扩展性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121542390B_ABST
    Figure CN121542390B_ABST
Patent Text Reader

Abstract

A question and answer method, device, medium, equipment and program product based on multiple agents, relating to the technical field of agents and artificial intelligence, the question and answer method comprises: obtaining a target type to which a first target question belongs through a first agent; planning based on the first target question through a second agent corresponding to the target type to obtain a target plan, the target plan comprising an executor set for implementing each subtask, and a tool calling step of a third agent in the executor set calling an associated tool to implement a corresponding subtask; and executing the target plan to call the tool associated with the third agent to implement the subtask according to the tool calling step of the corresponding subtask through the third agent in the executor set, and the calling result of the tool is used to generate a reply content of the first target question, different agents implement processing of different nodes in the question and answer, so that the overall scheme has higher flexibility and scalability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the fields of intelligent agents and artificial intelligence technology, and more specifically, to a question-answering method, apparatus, medium, device, and program product based on multiple intelligent agents. Background Technology

[0002] With the development of artificial intelligence technology, intelligent agents are gradually being applied in various fields. For example, in question-and-answer scenarios, users can input questions into an intelligent agent using natural language, and the agent can then output corresponding responses.

[0003] However, although there are already solutions for question answering based on intelligent agents in related technologies, these solutions still need improvement. Summary of the Invention

[0004] This summary section is provided to briefly introduce the concepts, which will be described in detail in the subsequent detailed description section. This summary section is not intended to identify key or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0005] Firstly, this disclosure provides a multi-agent question-answering method, including: The first intelligent agent analyzes the first target problem to determine the target type to which the first target problem belongs, wherein the complexity of different types of problems is different; By using a second agent corresponding to the target type, a target plan is obtained based on the first target problem to answer the first target problem. The second agents corresponding to different types have different planning capabilities. The target plan includes at least one set of executors to implement each sub-task, and at least one third agent in the at least one set of executors to call associated tools to implement the corresponding sub-tasks. The target plan is executed by invoking the tools associated with at least one third agent in the set of executors according to the tool invocation step corresponding to the sub-task, so as to realize the sub-task. The result of the tool invocation is used to generate the response content of the first target question.

[0006] Secondly, this disclosure provides a multi-agent question-answering device, including: The analysis module is used to analyze the first target problem obtained by the first intelligent agent to determine the target type to which the first target problem belongs, wherein the complexity of different types of problems is different; The planning module is used to plan based on the first target problem through a second agent corresponding to the target type, to obtain a target plan for answering the first target problem. The second agents corresponding to different types have different planning capabilities. The target plan includes at least one set of executors to implement each sub-task, and at least one third agent in the at least one set of executors to call associated tools to implement the corresponding sub-tasks. An execution module is used to execute the target plan by invoking a tool associated with at least one third agent in the set of executors according to the tool invocation step corresponding to the sub-task to implement the sub-task. The result of the tool invocation is used to generate the response content for the first target question.

[0007] Thirdly, this disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the question-and-answer method described in the first aspect.

[0008] Fourthly, this disclosure provides an electronic device, comprising: A storage device on which computer programs are stored; A processing device for executing the computer program in the storage device to implement the steps of the question-and-answer method in the first aspect.

[0009] Fifthly, this disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the question-and-answer method described in the first aspect.

[0010] The higher the capability of the second agent, the higher the decision-making cost. A more capable second agent is better suited to planning complex problems, while a less capable second agent can still accurately plan simple problems. Therefore, when facing different types of problems, second agents corresponding to different types are used to obtain target plans for answering the first target question. This simulates the human processing logic for different types of problems, so as to achieve a match between decision-making cost and problem type under the premise of obtaining accurate target plans, thereby balancing the performance of processing efficiency, resource consumption, and response success rate in question answering. Different agents are used to handle different nodes in question answering, namely the type analysis of the first target question, the planning of the target plan corresponding to the first target question, and the execution of the target plan. This decouples different nodes in question answering. In addition, the set of executors can be dynamically determined, thereby making the overall solution more flexible and scalable.

[0011] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description

[0012] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1 This is an architecture diagram illustrating an application architecture for implementing a multi-agent question-answering method according to an embodiment of this disclosure; Figure 2 This is a flowchart illustrating a multi-agent question-answering method according to an embodiment of this disclosure; Figure 3 It is a method based on the embodiments shown in this disclosure. Figure 1 The diagram shows the process of implementing a multi-agent question-answering method using the application architecture shown. Figure 4 This is a schematic diagram illustrating a process for revising a target plan according to an embodiment of the present disclosure; Figure 5 This is a schematic diagram illustrating a process for updating a first memory bank according to an embodiment of the present disclosure; Figure 6 This is a block diagram illustrating a multi-agent question-answering device according to an embodiment of the present disclosure; Figure 7 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. Detailed Implementation

[0013] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0014] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0015] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.

[0016] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.

[0017] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0018] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0019] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0020] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0021] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0022] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0023] Meanwhile, it is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0024] An intelligent agent is a system, hardware, or program capable of autonomously performing tasks on behalf of a user or other system by designing its workflow and utilizing available tools. When an intelligent agent receives a question, it typically involves a planning phase and an execution phase to obtain a response. Generally, one intelligent agent is pre-defined to handle the planning phase, and another to handle the execution phase. However, this pre-defined collaboration model is too rigid and cannot adapt to complex and ever-changing application scenarios, affecting question-and-answer efficiency and flexibility.

[0025] Figure 1 This is an architecture diagram illustrating an application architecture for implementing a multi-agent question-answering method according to an embodiment of this disclosure, with reference to... Figure 1 The application architecture includes a user layer and an intelligent agent system. The user layer is used to provide the user with input of the first target question and to display the first target question and the response content generated by the intelligent agent system for the first target question.

[0026] The intelligent agent system comprises a coordinator layer, a planner layer, an executor layer, and a tool layer. The first intelligent agent in the coordinator layer receives the user input of a first target problem, analyzes it to determine its target type, and assigns the first target problem to a corresponding second intelligent agent based on that type. The planner layer includes different types of second intelligent agents used to plan based on the corresponding types of first target problems to obtain a target plan for the first target problem. The executor layer includes third intelligent agents associated with different tools. The second intelligent agents dynamically assemble a set of executors based on the target plan to execute each sub-task in the target plan. The third intelligent agents in the executor set invoke the associated tools according to the tool invocation steps of the sub-tasks, and the tool invocation results are used to generate the response content for the first target problem.

[0027] Figure 2 This is a flowchart illustrating a multi-agent question-answering method according to an embodiment of the present disclosure. This multi-agent question-answering method can be applied to electronic devices, which may include, for example... Figure 1 The user layer in the application architecture shown can interact with... Figure 1 The illustrated agent system establishes a communication connection to implement a multi-agent question-and-answer method. (Refer to...) Figure 2 The multi-agent question-answering method may include steps 210, 220 and 230.

[0028] In step 210, the first intelligent agent analyzes the acquired first target problem to determine the target type to which the first target problem belongs. Different types of problems have different levels of complexity.

[0029] In some embodiments, an intelligent agent system that establishes a communication connection with an electronic device can provide an interactive interface for users to input questions. This interface can provide an information input box and an information display box. The information display box displays the user's historical dialogue with the intelligent agent system. The information input box includes a send control, which allows the user to send their input question to the first intelligent agent, where it will be displayed in the information display box.

[0030] It should be understood that different types of problems have different levels of complexity. For example, the primary objective problem can be a simple problem, a medium-sized problem, or a complex problem, with the complexity increasing sequentially from simple to medium to complex. The planning agents needed to implement plans for problems of varying complexity are also different. A second agent with lower planning capabilities can still formulate an accurate plan for simple problems, while for complex problems, a second agent with higher planning capabilities is required to execute the plan and obtain an accurate result.

[0031] In some embodiments, the first agent can parse a first target problem and obtain a macro-level initial plan based on the parsing result. This initial plan defines the key steps and dependencies for generating the response to the first target problem. Based on the key steps and dependencies, the agent can determine the target type of the first target problem. For example, simple, medium, and complex problems can be predefined, such as defining the key steps and dependencies for each type. Then, a prompt word template is constructed based on the problem definition. The first target problem is filled into the prompt word template to obtain the corresponding prompt word, and the first agent can then determine the target type of the first target problem based on this prompt word.

[0032] In some embodiments, the above parsing includes intent recognition, and the initial plan can be determined based on the intent recognition result. The first agent can achieve intent recognition of the first target question by: rewriting the user-inputted first target question in conjunction with historical dialogue; obtaining contextual information of the rewritten first target question and extracting entities from the rewritten first target question; and determining the intent of the first target question based on the contextual information and entities. Rewriting the first target question through historical dialogue ensures the integrity of the user's intent; entity extraction improves the accuracy of intent recognition.

[0033] In some embodiments, contextual information about the rewritten first target question can be obtained through various means. For example, contextual information can be obtained based on a terminology database, web search, and the retrieval of example questions. The terminology database stores explanations of terms associated with specific terms; these explanations can be found within the database to identify terms relevant to the first target question. Web search involves searching the internet for information related to the first target question. Example questions can aid in intent determination. Retrieving context through multiple means increases the diversity of context and improves the accuracy of intent recognition.

[0034] In step 220, a second agent corresponding to the target type plans based on the first target problem to obtain a target plan for answering the first target problem. The second agents corresponding to different types have different planning capabilities. The target plan includes at least one set of executors to implement each sub-task, and at least one third agent in the at least one set of executors to call the tool invocation step of the associated tool corresponding to the sub-task.

[0035] In step 230, the target plan is executed so that at least one third agent in the executor set invokes the tool associated with the at least one third agent according to the tool invocation step of the corresponding subtask to implement the subtask, and the tool invocation result is used to generate the response content of the first target question.

[0036] In some embodiments, the subtasks in the target plan may have dependencies, which determine whether the subtasks are executed in parallel or sequentially.

[0037] Figure 3 It is a method based on the embodiments shown in this disclosure. Figure 1 The diagram illustrates the process of implementing a multi-agent question-answering application architecture. The user submits a first target question to the coordinator layer through the user layer. The first agent in the coordinator layer analyzes the first target question to determine its target type. Based on the target type, the first agent schedules the first target question to a corresponding second agent in the planner layer, enabling the second agent to plan a target plan based on the first target question. Figure 3 In this model, agent 1 corresponds to complex problems, agent 2 to medium-difficulty problems, and agent 3 to simple problems. Further, the third agent in the executor set invokes the associated tools to execute the corresponding sub-tasks in the target plan, thereby generating a response to the first target problem. When dynamically creating the executor set, at least one executor set can be created based on the task requirements of the sub-tasks, for example... Figure 3 It can dynamically create executor set A, executor set B, and executor set.

[0038] The higher the capability of the second agent, the higher the decision-making cost. As mentioned above, a more capable second agent is better suited for planning complex problems, while a less capable one is better suited for planning simple problems. Therefore, when facing different types of problems, using second agents corresponding to different types yields target plans for answering the primary target question. This simulates the human processing logic for different types of problems, achieving a match between decision-making costs and problem types while obtaining accurate target plans. This balances performance in question-and-answer processing, including processing efficiency, resource consumption, and response success rate. Different agents handle different nodes in the question-and-answer process: analyzing the type of the primary target question, planning the target plan corresponding to the primary target question, and executing the target plan. This decouples different nodes in the question-and-answer process. Furthermore, at least one set of executors for each subtask is dynamically created. Based on the task requirements of the subtask, a third agent with the corresponding tool-calling capability is selected to implement the subtask, thus making the overall solution more flexible and scalable.

[0039] In some embodiments, the question-answering method described above may further include the following steps: retrieving a target historical plan that perfectly matches the first target question from a first memory bank by a first agent, wherein the thought chain of the historical question corresponding to the target historical plan is the same as the thought chain of the first target question; determining that the first agent has retrieved a target historical plan that perfectly matches the first target question; and executing the target historical plan.

[0040] The thought chain describes the reasoning steps for achieving question answering. Each reasoning step corresponds to a subtask and how to call tools to achieve the subtask. Based on this thought chain, the second agent can further generate the corresponding target plan.

[0041] Since the thought process is the same, the final plan generated will also be the same. Therefore, we can skip the planning of the target plan and directly execute the target historical plan that perfectly matches the first target problem to improve response efficiency and thus improve user experience.

[0042] For example, the following method can be used to determine that the first agent has retrieved a target historical plan that perfectly matches the first target problem: the first agent compares the thought chain of the first target problem with the thought chain of the historical problem in the first memory bank in multiple dimensions to obtain the comparison results of the historical problem in each dimension; it is determined that the comparison results of the historical problem in all dimensions represent a match; and it is determined that the first agent has retrieved a target historical plan that perfectly matches the first target problem.

[0043] It is understandable that the comparison results across all dimensions indicate that the historical plan corresponding to the matched historical problem is the target historical plan that perfectly matches the first target problem. As an example, these dimensions could include the object of analysis, analysis time, analysis dimensions, and analysis depth within the thought process.

[0044] In this way, by comparing multiple dimensions, the accuracy of retrieving target historical plans can be improved.

[0045] In some embodiments, the question-answering method may further include the following steps: retrieving a strategy matching the first target question from a second memory bank by a first agent, wherein the historical question corresponding to the strategy is similar to the first target question; further, step 220 may be implemented by: determining that the first agent has not retrieved a target historical plan that fully matches the first target question, but has retrieved a strategy that matches the first target question; and using a second agent corresponding to the target type to plan based on the strategy and the first target question to obtain a target plan for answering the first target question.

[0046] In this context, strategy is not simply factual knowledge, but a higher level of knowledge. For example, factual knowledge can generally only answer what, but it is difficult to answer how to do it or how to do it well, while strategy can reflect how to do it or how to do it well.

[0047] It should be noted that in the question-answering domain, although the questions may differ, the planning process for similar questions can share similarities, thus enabling planning through analogical reasoning. Therefore, strategies corresponding to similar questions, i.e., experience, can be acquired, and this knowledge can provide suggestions for solving new problems to the second agent, thereby improving the efficiency of planning.

[0048] In some embodiments, the second memory stores the query vector of the problem and the corresponding policy. The second memory can be constructed by: acquiring memory data of the response content of the problem generated by the agent system, which is stored in a third memory; processing the memory data to obtain the policy and query vector corresponding to the problem; and storing the policy and query vector corresponding to the problem in the second memory.

[0049] In this embodiment, the aforementioned problem can be a problem input by the first intelligent agent that has successfully generated a corresponding response.

[0050] In this embodiment, the third memory bank can be a structured event log database or a time-series database, which stores the complete process of the second agent implementing the above plan for each problem. This includes the second agent acquiring the problem, each step (i.e., each subtask) in the target plan planned by the second agent for the problem, the set of executors, each tool call of the executor set, errors encountered during the call, reflections, and the final response content, etc., which are complete data for question answering. This data is the basic data for policy learning. That is, by processing the memory data in the third memory bank, an abstract, generalized policy and the corresponding query vector are obtained.

[0051] In this embodiment, after receiving the first target question, the second agent acquires the corresponding features and constructs a query vector based on these features to retrieve a strategy that matches the first target question. For example, if the first target question is "fix a slow-running Python program", a query vector for the first target question can be constructed. This query vector could be "find the most efficient solution strategy related to 'application performance optimization' and 'Python language'". Based on this query vector, the corresponding query vector can be retrieved, and the strategy corresponding to the query vector can be used as the strategy that matches the first target question.

[0052] Furthermore, the second agent, based on the retrieved strategies that match the first objective problem, and in conjunction with relevant information about the first objective problem, plans to obtain the objective plan for the first objective problem. For example, for the strategy "first analyze performance and locate the bottleneck function," the second agent, in conjunction with relevant information about the first objective problem, such as the deployment environment, generates the objective plan for the first objective problem.

[0053] By utilizing the above method, a second-level memory bank, consisting of two independent layers—a second memory bank and a third memory bank—is used to replace the traditional memory bank that can only store factual knowledge. The addition of a second memory bank that stores strategies provides the second agent with higher-level knowledge for solving new problems, enabling the second agent to plan without starting from scratch, thus improving the efficiency and accuracy of the second agent's planning.

[0054] In some embodiments, the second agent plans at least one set of executors and corresponding tool invocation steps to implement each subtask step by step. Therefore, the above step 230 can be implemented in the following way: when the second agent has planned at least one set of executors for a subtask and the tool invocation steps of the at least one set of executors to implement the corresponding subtask, at least one third agent in the at least one set of executors invokes the tool associated with at least one third agent to implement the subtask according to the tool invocation steps of the corresponding subtask.

[0055] By using the above methods, planning and execution can be carried out simultaneously, thereby improving the efficiency of question and answering.

[0056] In some embodiments, prompt words can be set to prompt time-consuming execution steps to be planned in advance, thus solving the bottleneck effect.

[0057] In some embodiments, the above question-answering method may further include the following steps: obtaining the tool call result of the subtask and evaluating the tool call result to obtain an evaluation result; generating a reflection report of the evaluation result if the evaluation result indicates that the target plan needs to be modified, wherein the reflection report includes the reasons for the need to modify the target plan; modifying the target plan according to the reflection report by a second agent to obtain an updated target plan; and executing the updated target plan.

[0058] Figure 4 This is a schematic diagram illustrating a process for modifying a target plan according to an embodiment of the present disclosure. (Refer to...) Figure 4 After the second agent initially plans the target plan for the first objective problem, it executes the corresponding sub-tasks in the target plan through the third agent in the executor set. That is, the third agent calls the associated tools to execute the sub-task according to the tool call steps corresponding to the sub-task, and then obtains the tool call result. The tool call result of the sub-task is obtained and the execution result is evaluated to obtain the evaluation result. If the evaluation result is failure, partial success or low efficiency, it is determined that the target plan needs to be revised. Furthermore, a reflection report of the evaluation result is generated. The second agent revises the target plan according to the reflection report to obtain a new target plan, and returns to the steps of executing the sub-tasks in the target plan, that is, to execute the sub-tasks in the new target plan. If the evaluation result is other, it is determined that the target plan does not need to be revised, and the other unexecuted sub-tasks in the target plan continue to be executed. This cycle continues until the response to the first objective problem is obtained.

[0059] It should be noted that the new target plan is a new question-and-answer plan designed to address the problems identified in the evaluation results and achieve the primary objective. The entire question-and-answer process forms a closed loop of execution, evaluation, reflection, and replanning, which enables the intelligent agent system to exhibit high robustness and adaptability in the face of unexpected errors, dynamic environmental changes, or inefficiencies.

[0060] In some embodiments, the step of planning based on a policy and a first target problem by a second agent corresponding to the target type to obtain a target plan for answering the first target problem may include: determining a thought chain based on a policy and a first target problem by a first model in the second agent corresponding to the target type, and simultaneously performing other operations during the determination of the thought chain; and obtaining a target plan for answering the first target problem by a second model in the second agent according to the thought chain.

[0061] The first model is a reasoning-based model that can think logically to arrive at a thought chain. However, this thinking process is time-consuming, especially when dealing with complex problems. Therefore, to improve question-and-answer efficiency, other operations can be performed simultaneously during the thinking process. These other operations could be those related to generating response content, such as knowledge retrieval involved in generating the response. The second model is a logical framework based on thought chains that quickly outputs a target plan.

[0062] In the above way, in the planning of the second intelligent agent, the first model capable of deep thinking is first used to construct the thought chain. On this basis, the second model is used to quickly transform the thought chain into an executable target plan based on the logical framework of the constructed thought chain. That is, the first model and the second model are used to collaboratively generate the target plan, thereby balancing the accuracy and efficiency of question answering.

[0063] In some embodiments, the above question-and-answer method may further include the following steps: obtaining a second target question, a target plan corresponding to the second target question, and a thought chain corresponding to the second target question; and writing the second target question, the target plan corresponding to the second target question, and the thought chain corresponding to the second target question into a first memory bank.

[0064] Here, the second objective problem may include a pre-configured problem. For example, the pre-configured problem could be a high-frequency problem preset by the operator. The explanation and description of the objective plan and thought process corresponding to the pre-configured problem can refer to the explanation and description of the objective plan and thought process of the first objective problem mentioned above; this embodiment will not elaborate further. This method supports the operator to preset problems, allowing the intelligent agent system to update its first memory bank.

[0065] Here, the second objective question can include the first objective question that needs to be written into the first memory. As an example, the first objective question to be written into the first memory could be the question corresponding to the high-quality thought chain and high-quality response content planned by the second agent. As an example, prompt words can be set to determine whether the thought chain and response content planned by the agent system for the first objective question meet the criteria of being high-quality. This approach allows the agent system to automatically evaluate the planned thought chain and response content, selecting thought chains that meet expectations for updating the first memory.

[0066] Figure 5 This is a schematic diagram illustrating a process for updating a first memory bank according to an embodiment of this disclosure. (Refer to...) Figure 5It can set up scheduled tasks to read pre-configured questions from operators, generate the thought process and target plan for that question, and write them into the first memory bank to achieve rapid Q&A for anticipated high-concurrency questions. For the first target question raised by the user, it recalls the target historical plan from the first memory bank. If it matches, it directly executes the target historical plan to generate the response content for the first target question. If it does not match, it executes the planning and execution of the target plan for the first target question. Furthermore, it determines whether the target plan and thought process corresponding to the first target question need to be written into the first memory bank, that is, whether the response content and thought process of the first target question are high-quality response content and high-quality thought process. If it is determined that the response content of the first target question is high-quality response content and the thought process of the first target question is high-quality thought process, it is determined that the target plan and thought process of the first target question need to be written into the first memory bank, and the writing is executed.

[0067] Based on the same concept, this disclosure also provides a multi-agent question-answering device. Figure 6 This is a block diagram illustrating a multi-agent question-answering device according to an embodiment of the present disclosure, with reference to... Figure 6 The multi-agent question-answering device 600 includes: Analysis module 601 is used to analyze the first target problem obtained by the first intelligent agent to obtain the target type to which the first target problem belongs, wherein the complexity of different types of problems is different; Planning module 602 is used to plan based on the first target problem by using a second agent corresponding to the target type to obtain a target plan for answering the first target problem. The second agents corresponding to different types have different planning capabilities. The target plan includes at least one set of executors to implement each sub-task, and at least one third agent in the at least one set of executors to call associated tools to implement the corresponding sub-tasks. The first execution module 603 is used to execute the target plan, so that at least one third agent in the executor set calls the tool associated with the at least one third agent according to the tool calling step corresponding to the sub-task to implement the sub-task, and the tool calling result is used to generate the response content of the first target question.

[0068] Optionally, the multi-agent question-answering device 600 further includes: The first retrieval module is used to retrieve a target historical plan that completely matches the first target problem from the first memory bank through the first intelligent agent, wherein the thought chain of the historical problem corresponding to the target historical plan is the same as the thought chain of the first target problem; The determination module is used to determine the target historical plan retrieved by the first agent that completely matches the first target problem; The second execution module is used to execute the target historical plan.

[0069] Optionally, the multi-agent question-answering device 600 further includes: The second retrieval module is used to retrieve a strategy that matches the first target problem from the second memory bank through the first agent, wherein the historical problem corresponding to the strategy is similar to the first target problem; The planning module 602 includes: The determination submodule is used to determine that the first agent has not retrieved a target historical plan that completely matches the first target problem, but has retrieved a strategy that matches the first target problem; The planning submodule is used to perform planning based on the strategy and the first target question by a second agent corresponding to the target type, so as to obtain a target plan for answering the first target question.

[0070] Optionally, the second intelligent agent progressively plans at least one set of executors to implement each of the sub-tasks and the corresponding tool invocation steps, and the first execution module 603 is further configured to: When the second agent has planned at least one set of executors for a subtask and the at least one set of executors has invoked the associated tool to implement the tool invocation step corresponding to the subtask, at least one third agent in the at least one set of executors invokes the tool associated with the at least one third agent to implement the subtask according to the tool invocation step corresponding to the subtask.

[0071] Optionally, the multi-agent question-answering device 600 further includes: The first acquisition module is used to acquire the tool call result of the subtask and evaluate the tool call result to obtain an evaluation result; The reflection module is used to generate a reflection report on the evaluation results when the evaluation results indicate that the target plan needs to be revised, wherein the reflection report includes the reasons for the need to revise the target plan; The correction module is used to correct the target plan based on the reflection report by the second intelligent agent to obtain an updated target plan; The third execution module is used to execute the updated target plan.

[0072] Optionally, the determining module is further configured to: The first intelligent agent compares the thought chain of the first target problem with the thought chain of historical problems in the first memory bank in multiple dimensions to obtain the comparison results of the historical problems in each dimension. The historical issues were determined to be matched in all dimensions of the comparison results. It is determined that the first agent retrieves a target historical plan that perfectly matches the first target problem.

[0073] Optionally, the second memory is constructed in the following manner: Acquire memory data of the response content to the questions generated by the intelligent agent system, wherein the memory data is stored in a third memory bank; The memory data is processed to obtain the strategy and query vector corresponding to the problem; The strategy corresponding to the problem and the queried vector are stored in the second memory.

[0074] Optionally, the planning submodule is further used for: A thought chain is determined based on the strategy and the first target problem using a first model in a second agent corresponding to the target type, wherein other operations are performed simultaneously during the determination of the thought chain; The second model in the second agent obtains a target plan for answering the first target question based on the thought chain.

[0075] Optionally, the multi-agent question-answering device 600 further includes: The second acquisition module is used to acquire the second target problem, the target plan corresponding to the second target problem, and the thought process chain corresponding to the second target problem; The writing module is used to write the second target problem, the target plan corresponding to the second target problem, and the thought chain corresponding to the second target problem into the first memory bank.

[0076] The implementation methods of each module of the multi-agent question-answering device 600 described above can be referred to the above method embodiments, and will not be repeated here.

[0077] Based on the same concept, embodiments of this disclosure also provide a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the above-described multi-agent question-answering method.

[0078] Based on the same concept, this disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described multi-agent question-answering method.

[0079] Based on the same concept, this disclosure also provides an electronic device that may include: A storage device on which computer programs are stored; A processing device is used to execute a computer program stored in a storage device to implement the steps of the above-described multi-agent question-answering method.

[0080] The following is for reference. Figure 7 The diagram illustrates a structural schematic of an electronic device 700 suitable for implementing embodiments of the present disclosure. Terminal devices in embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 7 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0081] like Figure 7 As shown, the electronic device 700 may include a processing unit (e.g., a central processing unit, a graphics processor, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the electronic device 700. The processing unit 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0082] Typically, the following devices can be connected to I / O interface 705: input devices 706 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 707 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 708 including, for example, magnetic tapes, hard disks, etc.; and communication devices 709. Communication device 709 allows electronic device 700 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 7 An electronic device 700 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0083] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 709, or installed from storage device 708, or installed from ROM 702. When the computer program is executed by processing device 701, it performs the functions defined in the methods of embodiments of this disclosure.

[0084] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0085] In some implementations, electronic devices can communicate using any currently known or future-developed network protocol, such as HTTP (Hypertext Transfer Protocol), and can interconnect with digital data communications (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.

[0086] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0087] The aforementioned computer-readable medium carries one or more programs. When the electronic device executes the aforementioned one or more programs, the electronic device causes the following: First, an intelligent agent analyzes a first target question to determine the target type to which the first target question belongs, wherein different types of questions have different levels of complexity; second, an intelligent agent corresponding to the target type plans based on the first target question to obtain a target plan for answering the first target question, wherein the second intelligent agent corresponding to different types has different planning capabilities, and the target plan includes at least one set of executors for implementing each sub-task, and at least one third intelligent agent in the at least one set of executors calls associated tools to implement the corresponding sub-tasks via tool-calling steps; third, the target plan is executed so that at least one third intelligent agent in the executor set calls the tools associated with the at least one third intelligent agent according to the tool-calling steps corresponding to the sub-tasks to implement the sub-tasks, and the tool-calling results are used to generate a response to the first target question.

[0088] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including but not limited to object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0089] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0090] The modules described in the embodiments of this disclosure can be implemented in software or in hardware. The names of the modules are not necessarily limiting in certain circumstances; for example, an analysis module can also be described as "a module that analyzes a first target problem obtained by a first intelligent agent."

[0091] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.

[0092] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0093] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0094] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0095] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative forms of implementing the claims. Regarding the apparatus in the above embodiments, the specific manner in which the various modules perform their operations has been described in detail in the embodiments relating to the method, and will not be elaborated upon here.

Claims

1. A question-answering method based on multi-agent systems, characterized in that, include: The first intelligent agent analyzes the first target problem to determine the target type to which the first target problem belongs, wherein the complexity of different types of problems is different; By using a second agent corresponding to the target type, a target plan is obtained based on the first target problem to answer the first target problem. The second agents corresponding to different types have different planning capabilities. The target plan includes at least one set of executors to implement each sub-task, and at least one third agent in the at least one set of executors to call associated tools to implement the corresponding sub-tasks. The target plan is executed by invoking the tools associated with the at least one third agent in the set of executors according to the tool invocation step corresponding to the sub-task to achieve the sub-task, and the tool invocation result is used to generate the response content of the first target question; The question-answering method further includes: retrieving a target historical plan that perfectly matches the first target question from a first memory bank by the first agent, wherein the thought chain of the historical question corresponding to the target historical plan is the same as the thought chain of the first target question, the thought chain is used to describe the reasoning steps to achieve question answering, and the thought chain is used to generate the corresponding plan; determining that the first agent has retrieved a target historical plan that perfectly matches the first target question; and executing the target historical plan.

2. The question-and-answer method according to claim 1, characterized in that, The question-and-answer method also includes: The first agent retrieves a strategy matching the first target problem from the second memory bank, wherein the historical problem corresponding to the strategy is similar to the first target problem; The step of using a second agent corresponding to the target type to plan based on the first target problem to obtain a target plan for answering the first target problem includes: It is determined that the first agent did not retrieve a target historical plan that completely matches the first target problem, but retrieved a strategy that matches the first target problem; By using a second agent corresponding to the target type, a target plan is obtained based on the strategy and the first target question to answer the first target question.

3. The question-and-answer method according to claim 1, characterized in that, The second intelligent agent progressively plans at least one set of executors and corresponding tool invocation steps to implement each of the sub-tasks. The execution of the target plan, through at least one third intelligent agent in the executor set, invoking the tool associated with the at least one third intelligent agent according to the tool invocation step corresponding to the sub-task to implement the sub-task, includes: When the second agent has planned at least one set of executors for a subtask and the at least one set of executors has invoked the associated tool to implement the tool invocation step corresponding to the subtask, at least one third agent in the at least one set of executors invokes the tool associated with the at least one third agent to implement the subtask according to the tool invocation step corresponding to the subtask.

4. The question-and-answer method according to claim 1, characterized in that, The question-and-answer method also includes: Obtain the tool call results of the subtask, and evaluate the tool call results to obtain the evaluation results; If the evaluation results indicate that the target plan needs to be revised, a reflection report on the evaluation results is generated, wherein the reflection report includes the reasons for the need to revise the target plan; The second intelligent agent revises the target plan based on the reflection report to obtain an updated target plan; Execute the updated target plan.

5. The question-and-answer method according to claim 1, characterized in that, The step of determining that the first agent has retrieved a target historical plan that perfectly matches the first target problem includes: The first intelligent agent compares the thought chain of the first target problem with the thought chain of historical problems in the first memory bank in multiple dimensions to obtain the comparison results of the historical problems in each dimension. The historical issues were determined to be matched in all dimensions of the comparison results. It is determined that the first agent retrieves a target historical plan that perfectly matches the first target problem.

6. The question-and-answer method according to claim 2, characterized in that, The second memory bank is constructed in the following way: Acquire memory data of the response content to the questions generated by the intelligent agent system, wherein the memory data is stored in a third memory bank; The memory data is processed to obtain the strategy and query vector corresponding to the problem; The strategy corresponding to the problem and the queried vector are stored in the second memory.

7. The question-and-answer method according to claim 2, characterized in that, The step of using a second agent corresponding to the target type to plan based on the strategy and the first target question to obtain a target plan for answering the first target question includes: A thought chain is determined based on the strategy and the first target problem using a first model in a second agent corresponding to the target type, wherein other operations are performed simultaneously during the determination of the thought chain; The second model in the second agent obtains a target plan for answering the first target question based on the thought chain.

8. The question-and-answer method according to claim 1, characterized in that, The question-and-answer method also includes: Obtain the second objective problem, the corresponding objective plan for the second objective problem, and the thought process chain corresponding to the second objective problem; Write the second target problem, the target plan corresponding to the second target problem, and the thought chain corresponding to the second target problem into the first memory bank.

9. A question-answering device based on multiple agents, characterized in that, include: The analysis module is used to analyze the first target problem obtained by the first intelligent agent to determine the target type to which the first target problem belongs, wherein the complexity of different types of problems is different; The planning module is used to plan based on the first target problem through a second agent corresponding to the target type, to obtain a target plan for answering the first target problem. The second agents corresponding to different types have different planning capabilities. The target plan includes at least one set of executors to implement each sub-task, and at least one third agent in the at least one set of executors to call associated tools to implement the corresponding sub-tasks. The first execution module is used to execute the target plan, so that at least one third agent in the executor set calls the tool associated with the at least one third agent according to the tool calling step corresponding to the sub-task to implement the sub-task, and the tool calling result is used to generate the response content of the first target question; The multi-agent question-answering device further includes: The first retrieval module is used to retrieve a target historical plan that completely matches the first target question from the first memory bank through the first intelligent agent. The thought chain of the historical question corresponding to the target historical plan is the same as the thought chain of the first target question. The thought chain is used to describe the reasoning steps to achieve question answering and to generate the corresponding plan. The determination module is used to determine the target historical plan retrieved by the first agent that completely matches the first target problem; The second execution module is used to execute the target historical plan.

10. A computer-readable medium having a computer program stored thereon, characterized in that, When executed by a processing device, the computer program implements the steps of the question-and-answer method according to any one of claims 1-8.

11. An electronic device, characterized in that, include: A storage device on which computer programs are stored; A processing device for executing the computer program in the storage device to implement the steps of the question-answering method according to any one of claims 1-8.

12. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the question-and-answer method according to any one of claims 1-8.

Citation Information

Patent Citations

  • Problem processing method and device based on multiple agents and product

    CN118672782A

  • Question processing method and device based on artificial intelligence, computer equipment and medium

    CN119202156A

  • Intelligent agent question and answer method and device fusing different large models, medium and product

    CN120353909A

  • Intelligent agent memory indexing method and system based on intention recognition

    CN121009166A