Search

CN-121981283-A - Multi-agent interactive question-answering method, device, equipment and medium

CN121981283ACN 121981283 ACN121981283 ACN 121981283ACN-121981283-A

Abstract

The application discloses an interactive question-answering method, device, equipment and medium of multiple agents, which relate to the technical field of artificial intelligence question-answering and comprise the steps of carrying out conversion processing after receiving a target question to determine a question type and a target question after conversion, loading a target question-answering component based on the question type so as to carry out question decomposition by utilizing a task decomposition agent to obtain a subtask chain, calling the agent and a knowledge retrieval agent by utilizing a tool, sequentially executing a plurality of subtasks based on task execution sequences of the subtask chain to obtain an execution result, carrying out reasoning processing based on a preset thinking chain technology and a preset verification cycle mechanism if the subtask to be executed is judged to meet preset reasoning processing conditions in the execution process, obtaining a reasoning result and a thinking chain path diagram, integrating the execution result and the reasoning result to obtain a target answer, and feeding back the target answer and the thinking chain path diagram to the front end so as to carry out optimization adjustment on the interactive question-answering system based on feedback information.

Inventors

  • QIU CUILING
  • QI GUANGPENG
  • SHANG GUANGYONG
  • QIAO HAN
  • LI JIA
  • LUO TAO

Assignees

  • 浪潮云洲工业互联网有限公司

Dates

Publication Date
20260505
Application Date
20260128

Claims (10)

  1. 1. The multi-agent interactive question-answering method is characterized by being applied to an interactive question-answering system, wherein the interactive question-answering system comprises a task decomposition agent, a knowledge retrieval agent and a tool call agent, and the method comprises the following steps: After receiving a target question to be answered, carrying out conversion processing on the target question to determine the question type of the target question and a converted target question, and loading a corresponding target question-answering assembly based on the question type so as to decompose the converted target question by using the task decomposition agent through the target question-answering assembly to obtain a corresponding subtask chain; Invoking an agent and the knowledge retrieval agent by using the tool, executing a plurality of subtasks in the subtask chain based on the task execution sequence of the subtask chain to obtain corresponding execution results, and if judging that the subtask to be executed meets the preset reasoning processing conditions in the execution process, carrying out reasoning processing on the subtask to be executed based on a preset thinking chain technology and a preset verification circulating mechanism to obtain corresponding reasoning results and a thinking chain path diagram for representing the reasoning process; And integrating the execution result and the reasoning result to obtain a target answer of the target question, feeding back the target answer and the thinking chain path diagram to the front end of the interactive question-answering system, acquiring feedback information aiming at the target answer through the front end, and optimizing and adjusting the interactive question-answering system based on the feedback information.
  2. 2. The multi-agent interactive question-answering method according to claim 1, wherein the converting the target question to determine a question type of the target question and a converted target question, and loading a corresponding target question-answering component based on the question type, comprises: Determining an interaction mode corresponding to the target problem, and converting the target problem based on the interaction mode to obtain a standardized converted target problem, wherein the interaction mode comprises a text interaction mode, a voice interaction mode and an image interaction mode; Analyzing the sentence pattern structure of the converted target problem to determine the initial problem type of the converted target problem according to the obtained analysis result; Extracting keywords in the converted target problem, and determining the domain characteristics of the converted target problem through the keywords; determining a target question type of the converted target question according to the initial question type and the domain characteristics; If the converted target question meets the preset multi-round dialogue condition according to the target question type, loading a multi-round dialogue component, loading a natural language question-answering component when the target question type is a natural language question type, and loading a structured answer component when the target question type is a structured data query question type.
  3. 3. The multi-agent interactive question-answering method according to claim 1, wherein the decomposing the converted target problem by the task decomposition agent to obtain a corresponding sub-task chain comprises: selecting a target subtask decomposition case corresponding to the converted target problem from a plurality of preset subtask decomposition cases through the task decomposition agent; analyzing the target subtask decomposition case to determine a task decomposition logic structure of the target subtask decomposition case; and decomposing the converted target problem into a plurality of subtasks based on the task decomposition logic structure, and forming a corresponding subtask chain by utilizing the plurality of subtasks.
  4. 4. The multi-agent interactive question-answering method according to claim 1, wherein the calling the agent and the knowledge retrieval agent by using the tool executes a plurality of sub-tasks in the sub-task chain based on a task execution sequence of the sub-task chain to obtain corresponding execution results, and the method comprises: Analyzing a plurality of subtasks in the subtask chain through the tool call agent to determine task intentions and task types corresponding to the subtasks, and matching target tools corresponding to the subtasks from a preset tool library according to the task intentions and the task types so as to execute the subtasks by using the target tools based on the task execution sequence of the subtask chain and obtain corresponding tool call results; In the process of executing the subtasks, if the knowledge retrieval agent receives a knowledge retrieval instruction initiated by the tool calling agent, retrieving a preset knowledge base through the knowledge retrieval agent by utilizing a retrieval enhancement generation technology to obtain a retrieval result related to the current subtask, and feeding back the retrieval result to the tool calling agent; The execution result comprises the tool calling result and the retrieval result, and the preset knowledge base supports acquisition of new knowledge in a preset updating mode and updating based on the new knowledge.
  5. 5. The multi-agent interactive question-answering method according to claim 1, wherein the reasoning processing is performed on the subtasks to be executed based on a preset thinking chain technology and a preset verification circulation mechanism to obtain corresponding reasoning results and a thinking chain path diagram for characterizing a reasoning process, and the method comprises the following steps: Analyzing the subtasks to be executed to generate an initial thinking chain according to the analysis result, and marking a target reasoning node in the initial thinking chain in the process of generating the initial thinking chain to obtain a marked initial thinking chain; setting a target loop condition trigger for the marked initial thinking chain, and linking the knowledge retrieval agent with a knowledge graph in a preset knowledge base through the knowledge retrieval agent so as to utilize the relation between nodes and edges in the knowledge graph to mine the relation among a plurality of related knowledge retrieved in the execution result, thereby obtaining a corresponding mining result; executing the marked initial thinking chain based on the mining result to obtain a corresponding reasoning result; In the execution process of the marked initial thinking chain, monitoring the target loop condition trigger in real time so as to pause the current reasoning flow and execute corresponding re-programming operation when the target loop condition trigger is monitored to be activated; And recording the re-planning operation into the marked initial thinking chain to form a thinking chain path diagram comprising loop marks and representing an reasoning process.
  6. 6. The multi-agent interactive question-answering method according to claim 5, wherein upon detecting that the target loop condition trigger is activated, suspending a current inference flow and performing a corresponding re-planning operation, comprising: If the confidence coefficient of the step result of the current reasoning step is monitored to be lower than a preset confidence coefficient threshold value, judging that a confidence coefficient trigger is activated, suspending the current reasoning process, acquiring newly-increased knowledge information related to the current reasoning step through the knowledge retrieval agent, and re-executing the current reasoning step based on the newly-increased knowledge information; If the logic conflict exists between the step result of the current reasoning step and the history step result through the similarity calculation and logic rule matching technology, judging that a logic contradiction trigger is activated, suspending the current reasoning flow, determining a target reasoning step with the logic conflict between the current reasoning step, and starting to carry out reasoning operation again from the target reasoning step; If the knowledge data in the preset knowledge base is monitored to have updating operation, judging that an external updating trigger is activated, suspending the current reasoning process, determining the updating data in the preset knowledge base, determining relevant executed reasoning steps according to the updating data, and starting to carry out reasoning operation again from the reasoning step with earliest execution time in the executed reasoning steps; If the total number of the steps of the currently executed reasoning steps reaches the threshold value of the total number of the preset steps and a closed loop is not formed, judging that a threshold trigger of the reasoning steps is activated, suspending the current reasoning flow, carrying out summary analysis on the currently executed reasoning steps, and starting to carry out reasoning operation again according to the obtained summary analysis result.
  7. 7. The multi-agent interactive question-answering method according to any one of claims 1 to 6, wherein the process of reasoning the subtasks to be executed based on a preset thinking chain technology and a preset verification cycle mechanism includes: If the current reasoning step supports multiple tool call execution and a conflict exists among a plurality of corresponding call execution results, counting the call execution results to determine the call execution result with the largest occurrence number as a target call execution result of the current reasoning step, or performing consistency check of a target dimension on the call execution results, integrating the call execution results based on the obtained check result, and determining the obtained integration result as the target call execution result of the current reasoning step, wherein the target dimension comprises a logic dimension and a data dimension.
  8. 8. The multi-agent interactive question-answering device is characterized by being applied to an interactive question-answering system, wherein the interactive question-answering system comprises a task decomposition agent, a knowledge retrieval agent and a tool call agent, and the device comprises: the component loading module is used for carrying out conversion processing on the target problem after receiving the target problem to be answered so as to determine the problem type of the target problem and the target problem after conversion, and loading a corresponding target question-answering component based on the problem type so as to decompose the target problem after conversion by utilizing the task decomposition intelligent agent through the target question-answering component to obtain a corresponding subtask chain; The reasoning processing module is used for calling the intelligent agent and the knowledge retrieval intelligent agent by using the tool, executing a plurality of subtasks in the subtask chain based on the task execution sequence of the subtask chain to obtain corresponding execution results, and carrying out reasoning processing on the subtask to be executed based on a preset thinking chain technology and a preset verification circulating mechanism if judging that the subtask to be executed meets preset reasoning processing conditions in the execution process to obtain corresponding reasoning results and a thinking chain path diagram for representing the reasoning process; And the answer feedback module is used for integrating the execution result and the reasoning result to obtain a target answer of the target question, feeding back the target answer and the thinking chain path diagram to the front end of the interactive question-answering system, acquiring feedback information aiming at the target answer through the front end, and carrying out optimization adjustment on the interactive question-answering system based on the feedback information.
  9. 9. An electronic device, comprising: A memory for storing a computer program; a processor for executing the computer program to implement the multi-agent interactive question-answering method according to any one of claims 1 to 7.
  10. 10. A computer readable storage medium for storing a computer program, wherein the computer program when executed by a processor implements the multi-agent interactive question-answering method according to any one of claims 1 to 7.

Description

Multi-agent interactive question-answering method, device, equipment and medium Technical Field The invention relates to the technical field of artificial intelligence question and answer, in particular to a multi-agent interactive question and answer method, device, equipment and medium. Background With the development of artificial intelligence technology, a question-answering system is used as an important tool for information acquisition and interaction, and is increasingly widely and deeply applied in a plurality of fields. Existing question-answering systems typically employ a mental chain (i.e., coT, chain of Thought) to infer, which is a technique that simulates the human reasoning process, by decomposing a question into a series of intermediate steps to develop answers. The traditional CoT presents a linear reasoning mode, the reasoning process extends forward like the same straight line, each step of reasoning is only based on the conclusion of the previous step, but logic association with the earlier step is omitted, accuracy of a question-answering result is affected, meanwhile, the question-answering mode of the traditional question-answering system is single, most of questions of a specific type can be processed, processing effects are poor, a user is difficult to intuitively know the reasoning process of the system, opacity of the reasoning process not only reduces trust degree of the user on the system, but also enables the user to be incapable of accurately indicating the position of the question when the system gives an incorrect answer, and optimization and improvement of the system are not facilitated. Meanwhile, for the complex problem of the cross-domain, the existing system is difficult to integrate knowledge in different domains for comprehensive analysis due to the limitation of knowledge storage and reasoning capability. In summary, how to solve the problem that the performance of the existing question answering system is limited, so that the complex problem processing requirement cannot be met is a technical problem to be solved. Disclosure of Invention In view of the above, the present invention aims to provide a multi-agent interactive question-answering method, device, equipment and medium, which can solve the problem that the performance of the existing question-answering system is limited, so that the complex problem processing requirements cannot be satisfied. The specific scheme is as follows: In a first aspect, the application provides an interactive question-answering method of multiple agents, which is applied to an interactive question-answering system, wherein the interactive question-answering system comprises a task decomposition agent, a knowledge retrieval agent and a tool calling agent, and the method comprises the following steps: After receiving a target question to be answered, carrying out conversion processing on the target question to determine the question type of the target question and a converted target question, and loading a corresponding target question-answering assembly based on the question type so as to decompose the converted target question by using the task decomposition agent through the target question-answering assembly to obtain a corresponding subtask chain; Invoking an agent and the knowledge retrieval agent by using the tool, executing a plurality of subtasks in the subtask chain based on the task execution sequence of the subtask chain to obtain corresponding execution results, and if judging that the subtask to be executed meets the preset reasoning processing conditions in the execution process, carrying out reasoning processing on the subtask to be executed based on a preset thinking chain technology and a preset verification circulating mechanism to obtain corresponding reasoning results and a thinking chain path diagram for representing the reasoning process; And integrating the execution result and the reasoning result to obtain a target answer of the target question, feeding back the target answer and the thinking chain path diagram to the front end of the interactive question-answering system, acquiring feedback information aiming at the target answer through the front end, and optimizing and adjusting the interactive question-answering system based on the feedback information. Optionally, the converting the target problem to determine a problem type of the target problem and a target problem after conversion, and loading a corresponding target question-answering component based on the problem type, including: Determining an interaction mode corresponding to the target problem, and converting the target problem based on the interaction mode to obtain a standardized converted target problem, wherein the interaction mode comprises a text interaction mode, a voice interaction mode and an image interaction mode; Analyzing the sentence pattern structure of the converted target problem to determine the initial problem type of the conv