AI-based question interaction method and electronic equipment
By integrating planners, inferences and executors of AI models in the agent Agent, the problem of limited understanding and execution capabilities of dialogue robots when dealing with complex problems is solved, and smarter user question answers and significant user experience improvements are achieved.
Patent Information
- Application Number
- CN202411506007.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-03-21
AI Technical Summary
When existing dialogue robots deal with complex pre-sales and after-sales service issues, their understanding and execution capabilities are limited, making it difficult to truly replace human labor, resulting in long wait times for users.
Adopt AI-based large-model planner, inference and executor agent agent to achieve smarter user questions answers through task decomposition, action reasoning and phased result return.
It significantly shortens user waiting time and improves user experience. Through double-layer loops and phased result return, it improves the efficiency and accuracy of problem solving.
Smart Images

Figure CN119670879A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of AI interaction technology, and in particular to an AI-based question interaction method and electronic device. Background Art
[0002] The booming development of e-commerce has brought about a massive amount of consumer interaction, including interactions generated by pre-sales and after-sales service needs. Traditional pre-sales / after-sales service dialogue robots (rule-based systems and limited natural language processing capabilities) face problems such as limited understanding and execution capabilities, rigid dialogue processes, and insufficient ability to handle complex problems in customer service scenarios. Current dialogue robots have also begun to introduce the capabilities of AI (Artificial Intelligence) large models to enhance the dialogue experience. However, the use of large models in dialogue robots will bring new problems. For example, the end-to-end large model processing capabilities are still weak. When faced with complex problems in different scenarios such as pre-sales and after-sales, it is difficult to truly replace manual labor and solve the problems raised by consumers. Summary of the invention
[0003] The present application provides an AI-based question interaction method and electronic device that can answer user questions more intelligently and shorten the user's waiting time.
[0004] This application provides the following solutions:
[0005] An AI-based question interaction method, comprising:
[0006] Receive questions from users;
[0007] The target agent understands the problem and outputs the processing result. The target agent includes a planner, a reasoner and an executor. The planner and the reasoner are generated based on the artificial intelligence AI model. The target agent is used to perform the following processing:
[0008] With the goal of solving the problem, the planner performs task decomposition and outputs optimal tasks for solving the problem;
[0009] Inferring at least two actions required to complete the preferred task through the reasoner, the actions include result actions and non-result actions, the result actions represent that the preferred task has been partially completed, and the non-result actions represent that the completion of the preferred task needs to rely on external tools or cannot be completed;
[0010] The at least two actions are executed by the executor, wherein, during the execution of the non-result action, the partially completed interim completion result corresponding to the result action is returned to the user.
[0011] The non-result action includes a tool action or a planning action. The tool action means that the completion of the preferred task needs to rely on an external tool, and the planning action means that the preferred task cannot be completed.
[0012] When executing the at least two actions, the executor calls at least one external tool inferred by the reasoner for the tool action, and returns the tool calling result to the reasoner to generate the next action, thereby performing a first-level loop;
[0013] For the planning action, a process is performed to return to the planner so that the planner updates the preferred task for solving the problem, thereby performing a second-level loop.
[0014] Among them, the scenarios corresponding to the questions that users may ask are classified in advance, and corresponding agents are provided for the classified multiple scenarios respectively;
[0015] The target intelligent agent Agent understands the problem and outputs the processing result, including:
[0016] The target Agent corresponding to the scenario to which the question raised by the user belongs understands the question and outputs a processing result.
[0017] Among them, the Agent corresponding to each scene also has the ability to judge the scene and transfer the problem;
[0018] The target Agent corresponding to the scenario to which the question raised by the user belongs understands the question and outputs a processing result, including:
[0019] When the user enters the session for the first time, the global default Agent determines the scenario to which the question raised by the user belongs. If the scenario belongs to the scope of responsibility of the global default Agent, the global default Agent will take over the user's question; otherwise, it will be transferred to the Agent corresponding to the scenario to which the question belongs for taking over; the global default Agent is the Agent corresponding to the scenario with a higher probability of appearing in each scenario.
[0020] Among them, it also includes:
[0021] When the user is not entering the conversation for the first time, the agent that accepted the user's question in the previous round of conversation is set as the default agent, and the default agent performs scene judgment. If it belongs to the scene corresponding to the default agent, the new question raised by the user is accepted; otherwise, it is transferred to the agent corresponding to the scene to which the new question belongs for acceptance.
[0022] Among them, the multiple scenarios include pre-sales promotion activity scenarios in the product information service system, solution positioning scenarios related to after-sales issues and before processing results are obtained, and solution follow-up scenarios related to after-sales issues and after processing results are obtained; the solution positioning scenario is set as the default Agent when entering the session state for the first time.
[0023] Among them, it also includes:
[0024] In the process of handing over between different Agents, it is determined whether the upper limit of the number of handovers has been reached. If not, a list of Agents available for handover and description information of each Agent are provided to the current default Agent so that an Agent can be selected from them. If the upper limit of the number of handovers has been reached, the current default Agent is forced to generate an answer by not providing the Agent list.
[0025] The multiple scenarios respectively correspond to a private memory storage module dedicated to each scenario, which is used to store relevant information generated by the Agent corresponding to the specific scenario in the process of solving the problem, and is only available for the Agent corresponding to the specific scenario to read the information;
[0026] The multiple scenarios also correspond to a common memory storage module shared by each scenario, which is used to store the task processing status and / or transfer reason information of the transfer initiator Agent during the transfer between different Agents, so that the transferred Agent can read the corresponding information from the common memory storage module and continue to complete subsequent processing.
[0027] An AI-based question interaction method, comprising:
[0028] Receive questions from users;
[0029] The target agent understands the problem and outputs the processing result. The target agent includes a planner, a reasoner and an executor. The planner and the reasoner are generated based on the artificial intelligence AI model. The target agent is used to perform the following processing:
[0030] With the goal of solving the problem, the planner performs task decomposition and outputs optimal tasks for solving the problem;
[0031] Inferring at least one action required to complete the preferred task through the reasoner, wherein the action includes a tool action or a planning action, wherein the tool action represents that the completion of the preferred task requires reliance on an external tool, and the planning action represents that the preferred task cannot be completed;
[0032] Executing the at least one action through the executor, wherein, for the tool action, calling at least one external tool inferred by the reasoner, and returning the tool calling result to the reasoner to generate the next action, thereby performing a first-level loop;
[0033] For the planning action, a process is performed to return to the planner so that the planner updates the preferred task for solving the problem, thereby performing a second-level loop.
[0034] An AI-based question interaction method classifies the scenarios corresponding to the questions that may be raised by users in advance, and provides corresponding agents for the classified multiple scenarios respectively. The agent corresponding to each scenario also has the ability to judge the scenario and transfer the question. The method includes:
[0035] When the user first enters the session, receive questions from the user;
[0036] The scenario to which the question raised by the user belongs is judged by the global default Agent. If the scenario belongs to the scope of responsibility of the global default Agent, the global default Agent will take over the user's question; otherwise, it will be transferred to the Agent corresponding to the scenario to which the question belongs for taking over; the global default Agent is the Agent corresponding to the scenario with a higher probability of appearing in each scenario;
[0037] When the user is not entering the conversation for the first time and a new question is raised by the user, the agent that took the user's question in the previous round of conversation is set as the default agent, and the default agent makes a scenario judgment. If the scenario falls within the scope of responsibility of the default agent, the new question is taken; otherwise, it is transferred to the agent corresponding to the scenario to which the new question belongs.
[0038] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of any of the methods described above.
[0039] An electronic device, comprising:
[0040] one or more processors; and
[0041] A memory associated with the one or more processors, the memory being used to store program instructions, wherein the program instructions, when read and executed by the one or more processors, execute the steps of any of the methods described above.
[0042] A computer program product comprises a computer program / computer executable instructions, wherein the computer program / computer executable instructions implement the steps of any of the aforementioned methods when executed by a processor in an electronic device.
[0043] According to the specific embodiments provided in this application, this application discloses the following technical effects:
[0044] Through the embodiment of the present application, by implementing a planner based on a large model, a reasoner based on a large model, and an executor in the Agent (intelligent body), after receiving the user's question, the planner can be used to decompose the task and output the preferred task for solving the problem. The reasoner can also be used to infer at least two actions required to complete the preferred task, and the specific action can be divided into result actions and non-result actions. In this way, when executing a specific action through the executor, the partially completed phased completion result corresponding to the result action can be returned to the user during the execution of the non-result action. Through this method, since the reasoner can output result actions and non-result actions at the same time, it can return in time after obtaining the phased results, and continue to execute other reasoning processes at the same time. This segmented push method can reduce the user's waiting time and avoid the problem of multiple reasonings causing the overall time consumption to be too long. Experiments show that this method reduces the time consumption of displaying the first message from 7 seconds to 1 second, significantly improving the user experience.
[0045] In addition, in a preferred manner, the embodiment of the present application also provides a double-layer loop method, that is, after the reasoner infers the tool action, the executor can return the tool call result to the reasoner, so that the reasoner can infer the next action to be performed based on the tool call result, thereby realizing the first layer of loop. In addition, after the reasoner infers the planned action, it means that the task previously planned by the planner has failed to execute. Therefore, the executor can trigger the planner to plan a new task, thereby realizing the second layer of loop. Through this double-layer loop method, the user's problem can be disassembled and processed step by step. After the task processing fails, other suitable solutions can be selected through the loop, thereby significantly improving the ability to solve user problems.
[0046] Furthermore, by configuring different agents for different scenarios, the agent's problem-solving ability and accuracy can be further improved. In addition, by directly implementing the scene judgment and transfer capabilities within the agent, the agent corresponding to the scene with a relatively high proportion can be set as the default or preferred agent when the session is first entered. The agent will only transfer the problem when it determines that the scene of the current problem does not match it. In addition, when it is not the first time to enter the session, the agent that actually took over the user's problem in the previous round can be used as the default agent. Similarly, the agent will only transfer the problem when it determines that the scene of the new problem does not match it. In this way, the probability of problem transfer can be reduced, which is conducive to further improving efficiency.
[0047] Of course, any product implementing the present application does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0049] Figure 1 It is a schematic diagram of the system architecture provided by the embodiment of the present application;
[0050] Figure 2 is a flow chart of the first method provided in an embodiment of the present application;
[0051] Figure 3 is a schematic diagram of a storage structure provided in an embodiment of the present application;
[0052] Figure 4 is a flow chart of the second method provided in an embodiment of the present application;
[0053] Figure 5 is a flowchart of the third method provided in an embodiment of the present application;
[0054] Figure 6 It is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0055] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0056] First of all, it should be noted that in the scenario of providing problem solutions for users' pre-sales and after-sales problems, in order to improve the processing power of AI large models, it can be implemented in the form of Agent (an intelligent agent that can autonomously observe the environment, understand, think, plan decisions and take actions to solve complex tasks. An Agent can include at least one large model, and can also provide context and the ability to interact with the outside world through tool modules). For example, it can be a ReAct (an Agent paradigm) structure. However, in the process of solving specific problems, Agent usually needs to analyze and think about user problems through large models, and then call tools, such as tools for querying order status, etc. After obtaining the results returned by the tools, it may be necessary to think again, and then it may be necessary to call the tools again, and so on. This cycle can be repeated many times before the final processing result can be returned. Therefore, there may be a problem of overall time consumption, and users need to wait for a long time before receiving a reply. Experiments show that it takes an average of 7 seconds from the user asking a question to receiving the first result returned by the Agent.
[0057] In view of the above situation, the embodiment of the present application improves the solution of the prior art of solving user questions through agent intelligence. In the improved solution, the specific agent may include three parts: a planner, a reasoner and an executor. When the user raises a specific question, it can be taken up by an agent, and the specific intelligent interaction process can be completed through the cooperation of the above three parts in the agent.
[0058] Among them, both the planner and the reasoner can be implemented based on the AI big model, and through the pre-corpus training, etc., it has the ability to understand and generate content. For example, the planner is mainly used to decompose the tasks of specific problems and select the tasks with the highest priority. Therefore, the specific training corpus can include the conversation content between the user and the manual customer service in the historical conversation record. The planner model is trained with this conversation content to enable it to have the aforementioned task decomposition and priority judgment capabilities. Of course, in addition to corpus training, some service strategies can also be formulated. For example, some strategies can be defined according to some scenarios, including which tasks are included in the refund scenario, which task has a higher priority, which one is second, etc. These strategy information can also be configured in the planner model for task decomposition and priority determination. The reasoner is mainly used to infer multiple specific actions based on specific tasks, that is, it can infer what actions need to be performed to complete the task. The reasoner can also be implemented based on the AI big model, and it can also be trained in advance, or related service strategies can be configured, etc.
[0059] Specifically, after taking on a problem, the Agent can first decompose the task through the planner and output the preferred task for solving the problem. For example, the preferred task can be the one with the highest priority among multiple tasks. The decomposed multiple tasks can all be tasks that can be used to solve the current problem. The tasks can be prioritized according to the conditions such as what kind of solution the user needs more in the current problem scenario. For example, assuming that the user's question is "Why hasn't my order been shipped yet?", the tasks decomposed by the planner may include the "expediting shipment" task and the "explaining and comforting" task. Since the user usually needs the customer service to urge the shipment when asking this question, the "expediting shipment" task has the highest priority and is executed first, etc. After determining the preferred task, the reasoner can infer at least two actions required to complete the preferred task. That is, the planner can decompose the task, and the reasoner can decompose the action. After decomposing at least two actions, the executor will execute the specific action. Among them, in the embodiment of the present application, specific actions can be classified, which can include result actions and non-result actions. The so-called result action means that the current preferred task has been partially completed, that is, it can produce some results; the non-result action means that the completion of the current preferred task needs to rely on external tools or cannot be completed. For the executor, it is to execute the above-mentioned multiple actions inferred, among which, for the non-result action, since it needs to be further processed inside the Agent to produce the result, but for the above-mentioned result action, since the specific result has been produced, the executor can directly return the execution result to the user when executing, for example, it may be a paragraph telling the user that his request has been understood and trying to help him urge the delivery, etc. In this way, in the process of executing the above-mentioned non-result action inside the Agent, a part of the phased content can be returned to the user, so that the user is not in a simple waiting state; the subsequent waiting non-result action is also completed, and after the result action representing that the current task has been fully completed is produced, the final result is returned, thereby improving the user experience.
[0060] For non-result actions, in specific implementation, they can include tool actions and planning actions, wherein tool actions represent that the completion of the current preferred task requires reliance on external tools, and planning actions represent that the current preferred task cannot be completed. When the executor executes the at least two actions, for the tool action, it can call at least one external tool inferred by the reasoner, and then return the tool call result to the reasoner to produce the next action, thereby performing the first-level loop; for the planning action, it can perform the process of returning to the planner so that the planner can update the preferred task used to solve the problem, thereby performing the second-level loop. In other words, in addition to returning some results in stages to avoid users waiting too long, a double-layer loop can also be implemented: not only can it loop in the reasoning layer to produce the next action, but it can also loop in the planning layer when the previous task cannot be completed to produce the next task, thereby realizing the problem after being decomposed and then solved step by step, thereby solving consumer problems as much as possible.
[0061] In addition, in the specific implementation, different agents can be provided for different scenarios, so that each agent can focus on the problems in a field and provide more professional and accurate solutions. After receiving the specific questions raised by the user, the agent corresponding to the scenario to which the question belongs can also be used to handle it. This will be introduced in detail later.
[0062] From the perspective of system architecture, the embodiments of the present application can provide an implementation scheme for intelligent interaction with users through Agent in customer service related systems of application systems such as commodity information service systems (such customer service systems can be provided by the platform and can be used to handle more complex issues such as disputes between consumers and merchants. Of course, specific merchants can also deploy similar systems). The scheme can involve the client and the server, wherein the client is mainly used to receive questions raised by users and feedback the processing results of the Agent, including staged processing results and final processing results, etc. The Agent mainly runs on the server, or it can also run partially on the server and partially on the client, etc. Among them, see Figure 1When a user asks a specific question through the client, it can be taken up by a specific Agent. The planner in the Agent can first decompose the task with the goal of solving the user's problem and determine the task with the highest priority. Then the reasoner determines at least two actions required to solve the task, and then the executor executes these actions. Among them, for the result action, the result is directly output to the client; for the tool action, an external tool can be called, and the tool call result is returned to the reasoner for the next action reasoning, thereby realizing the first layer of loop; for the planning action, it can be returned to the planner to re-plan the task, thereby realizing the second layer of loop.
[0063] The specific implementation scheme provided in the embodiments of the present application is described in detail below.
[0064] Embodiment 1
[0065] First, this embodiment provides an AI-based question interaction method, see Figure 2 ,include:
[0066] S201: receiving questions raised by users.
[0067] The user may be a user in a specific application system, for example, a consumer user in a product information service system (i.e., an e-commerce platform), and the questions raised by the user may be of various types, for example, questions about pre-sale, post-sale, or a certain promotional activity in the product information service system, etc. Specifically, the questions may be questions about the activity rules of a certain promotional activity, or questions about returns and refunds generated after sale, etc. The user may input a specific question text by keyboard input, or may ask questions by voice input, etc.
[0068] S202: The target agent understands the problem and outputs the processing result. The target agent includes a planner, a reasoner and an executor. The planner and the reasoner are generated based on the artificial intelligence AI model. The target agent is used to perform the following processing:
[0069] S2021: With the goal of solving the problem, the planner performs task decomposition and outputs optimal tasks for solving the problem;
[0070] S2022: Inferring, by the reasoner, at least two actions required to complete the preferred task, wherein the actions include result actions and non-result actions, wherein the result actions represent that the preferred task has been partially completed, and the non-result actions represent that the completion of the preferred task requires external tools or cannot be completed;
[0071] S2023: Executing the at least two actions through the executor, wherein, in the process of executing the non-result action, the partially completed interim completion result corresponding to the result action is returned to the user.
[0072] Among them, the Agent can be configured for the user problem solving scenario. In the embodiment of the present application, it can include three parts: a planner, a reasoner, and an executor. Among them, the planner and the reasoner can be implemented based on the AI big model, and have the ability to understand and generate multimodal content. The executor part can be implemented by ordinary code.
[0073] After receiving a specific question from a user, the planner can first decompose the task with the goal of solving the problem, and output the preferred task for solving the problem, for example, the task with the highest priority. As mentioned above, the specific planner can be implemented based on the AI big model. In order to enable the planner to have the above capabilities, the AI big model can be trained in advance using relevant corpus data (for example, historical conversation data between users and real customer service, etc., including solutions given by real customer service personnel to specific user problems, and corresponding user feedback and other information), or some service strategy rules can be pre-configured to help the planner achieve the above capabilities.
[0074] After the planner determines the specific preferred task, at least two actions can be inferred by the reasoner, that is, if the preferred task is to be completed, it can be completed by executing the above at least two actions. Among them, the reasoner is also implemented based on the AI big model, so it can be given the corresponding reasoning ability by pre-training or configuring service strategies. In the embodiment of the present application, the specific actions can be divided into two categories, one is the result action, that is, some interim results have been obtained, and only these interim results need to be fed back to the user; the other is non-result action, that is, no results have been obtained, and external tools need to be called (specifically tool actions), or it may be judged that the current task cannot be completed and needs to be re-planned (specifically referred to as planning actions), and so on.
[0075] After inferring multiple actions, the specific actions can be executed by the executor. In the embodiment of the present application, since the result action and the non-result action are included, the result action can be executed in parallel during the execution of the non-result action, and the interim results corresponding to the result action can be directly returned to the client for display to the user. In this way, although the non-result action has not yet obtained the result, the result corresponding to the result action can be returned to the user in stages, avoiding the user from being in a state of simple waiting.
[0076] As mentioned above, the specific non-result actions may include tool actions and planning actions. The tool actions represent that the completion of the preferred task needs to rely on external tools, and the planning actions represent that the preferred task cannot be completed. Specifically, when the executor executes the at least two actions, for the tool actions, it can call at least one external tool inferred by the reasoner, and return the tool calling result to the reasoner to produce the next action, thereby performing the first-level loop. That is to say, when the reasoner includes the tool action in the inferred action, it can also infer which one or several tools need to be called at the same time. Of course, in the specific implementation, the name, function description and other information of the specific optional tool can be input to the reasoner, so that the reasoner can select the tool that can be called from various tools according to the current problem and task situation. Then, when the executor executes the tool action, it can directly call this tool. After obtaining the call result returned by the tool, the next action may be required. Therefore, the tool calling result can be returned to the reasoner, and the reasoner can infer the next action to be executed according to the tool calling result, thereby realizing the first-level loop. Until the inferred action no longer includes the tool action, the loop of this layer can be ended.
[0077] If the actions inferred by the reasoner include planned actions, the executor can execute the processing of returning to the planner so that the planner can update the preferred task for solving the problem, thereby performing the second-level loop. That is to say, after re-planning a new preferred task, the reasoner can infer one or more actions for the new preferred task, and then the executor will execute the specific action. In the process of executing the action, the reasoner may loop through multiple action reasonings. If no new planned actions are generated, the second-level loop ends.
[0078] Among them, tool actions and planned actions usually do not exist at the same time. What may actually happen is that the action inferred by the reasoner includes result actions and tool actions, or result actions and planned actions. Of course, since there is a loop in the reasoner part, that is, after executing the tool action and calling the tool, the tool call result will be returned to the reasoner to continue to reason about the next action. At this time, the next action may include planned actions.
[0079] In order to facilitate a better understanding of the above solution provided in the embodiment of the present application, the specific processing flow is introduced below through an example.
[0080] step1. After the user raises a specific question, the planner aims to solve the problem. It can also combine the specific context (for example, including the status information of related orders, information of related products, etc.) to decompose the task and output the task with the highest current priority. For example, suppose the task is the "expedited delivery" task.
[0081] Step 2. For the task of expediting shipment, the inference engine generates two actions. The first is a result action, which is used to inform the user that the company has understood their needs and is trying to help them to expedite shipment. The second is a tool action, which corresponds to the tool for expediting shipment, to remind the corresponding merchant to ship as soon as possible.
[0082] Step 3. After getting the two actions, the executor first returns the content corresponding to the result action to the consumer. This is the segmented return capability, that is, before the target processing is completed, part of the content is returned to the user first to reduce the user's waiting time. At the same time, the executor can also call the tool to urge delivery. Assume that the result of the tool call is: since the delivery has been urged within one hour, it cannot be urged again, and return the result to the reasoner.
[0083] Step 4. After the reasoner gets the tool call result that cannot be urged, it finds that the current task execution has failed, so it outputs the planned action. This is the first-level loop, that is, the reasoner can output the tool action and determine the next output action based on the tool return result. Of course, in other cases, the next output action may still be a tool action. At this time, the first-level loop can be continued until there is no tool action in the output action, and then the first-level loop can be ended.
[0084] step5. The executor hands the planned action to the planner for processing.
[0085] Step 6. The planner found that the task of expediting delivery could not be completed, so it output the task of explaining and comforting. This is the second-level loop, that is, after the previous task failed to execute, the planner can output the next task based on the reason for the failure.
[0086] Step 7. Since the second loop has been entered and a new task has been re-planned, the reasoner can re-output the specific actions to be performed for the new task. Specifically, in this example, the planner outputs the task of explaining and appeasing, and the action output by the reasoner may only have one result action, which is that the seller has been urged and the delivery time is still within the validity period, so the user is asked to wait.
[0087] Step 8. The executor returns the content of the result action to the user. At this point, all actions have been executed and the Agent process ends.
[0088] The above is a detailed introduction to the Agent processing flow. In this solution, in order to solve the problem of long time consumption of large model reasoning, the embodiment of this application adopts a segmented push method to avoid the problem of long overall time consumption caused by multiple reasoning. Experiments show that this solution can reduce the time consumption of displaying the first message from 7 seconds to 1 second, significantly improving the user experience. In addition, by adopting a double-layer loop solution, compared with the ReAct Agent with weak problem-solving ability, this solution preliminarily decomposes the problem through planning and reasoning, and gradually processes each task, thereby improving the problem-solving ability of the dialogue robot.
[0089] In addition, in actual applications, different agents can be provided for different scenarios. In this way, after the user raises a specific question, the scenario corresponding to the specific question can be determined first, and then the agent corresponding to the scenario will take over the specific process of solving the problem.
[0090] For example, in the customer service system of the commodity information service system, the following scenarios can be divided according to the questions that users may usually ask: pre-sales promotion consultation scenario, after-sales problem scenario, among which the after-sales problem scenario can be divided into: solution positioning scenario and solution questioning scenario. The former corresponds to the situation where the user has not yet obtained a solution after the problem occurs, and the latter corresponds to the situation where the user has a problem and has obtained a solution (which may be provided by the merchant or by AI through intelligent interaction), but still has some questions about the solution. Accordingly, different agents can be provided for the above three different scenarios to solve user problems in different scenarios.
[0091] Among them, after receiving the user's question, how to determine which Agent to take over can be handled in a variety of ways. For example, an easy way to think of is to set a pre-program dedicated to scene judgment, and after judging the specific scene, call the corresponding Agent to take over the specific processing flow. However, in the preferred embodiment of the present application, it can be implemented in the following way: each Agent realizes the scene judgment and process transfer capabilities, and sets one of the Agents as the default or preferred Agent. The default Agent can be a global default Agent. When the user enters the session for the first time, that is, the scene judgment can be first performed by the global default Agent. If it is judged that it belongs to the corresponding scene, it can directly take over the processing flow of the problem. In addition, the scene description information corresponding to other Agnet can be configured in the Agent in advance. In this way, if it is judged that the user's question does not belong to the corresponding scene, it can further determine which Agent should take over and transfer the problem to the Agent.
[0092] Among them, in a more preferred embodiment, the above-mentioned default or preferred Agent can be a scenario where user questions account for a large proportion. In this way, by using the Agent corresponding to such a scenario with a large proportion as the default Agent, the probability of transfer between different Agents can be reduced to a relatively large extent. For example, in the commodity information service system, as mentioned above, the specific scenarios can be divided into pre-sales related promotion activity scenarios, after-sales problem-related and solution positioning scenarios before solutions have been obtained, and after-sales problem-related and solution questioning scenarios after solutions have been obtained. According to statistics, most user questions are concentrated in the solution positioning scenario. Therefore, the Agent corresponding to the solution positioning scenario can be set as the default Agent. That is to say, after receiving the user question, the Agent can first perform the scenario judgment. Since the problem proportion of the solution positioning scenario is relatively large, therefore, in the case of high probability, the scenario judged by the default Agent is the scenario that matches itself, and then it can be directly handled. In a few cases, it may be found that it belongs to other scenarios, and then it can be transferred to the Agent corresponding to other scenarios.
[0093] In addition, in an optional manner, when the user is not entering the conversation for the first time (that is, the user has asked a question in a conversation and then asked a new question), the most recent agent priority rule can be adopted, and the agent that took over the user's question in the previous round of conversation can be set as the default agent. This is because, in most cases, the new question raised by the user should belong to the same scenario as the previous question. Therefore, by using the agent that took over the user's question in the previous round as the default agent in this state, the probability of transfer can also be reduced. In this way, when the user's consulting question is unclear and needs to be repeatedly or gradually clarified through multiple rounds of conversations, the agent that actually took over the user's question in the previous round is used as the default agent, which can also ensure the continuity of the conversation.
[0094] Of course, new questions raised in non-first rounds of dialogue may belong to different scenarios from the previous round of questions. Therefore, other agents also have the ability to judge and transfer scenarios. Before officially taking on a specific question, each agent can first judge the scenario. If it belongs to the scenario corresponding to the agent, it will continue to understand the new problem and output a solution. Otherwise, it can be transferred to the agent corresponding to the scenario to which the new problem belongs.
[0095] In addition, after the Agent that actually undertakes the current problem completes its internal execution, it may fail to complete the task normally. In this case, it can be handed over to other more suitable Agents for processing.
[0096] Furthermore, in the specific implementation, an upper limit of the number of transfers can be set to avoid the conversation taking too long. Specifically, if the upper limit of the number of transfers has not been reached, the names and descriptions of other agents other than itself can be provided to the current default agent as a list of agents that can be transferred, so that the current default agent can select an agent that can be transferred from them. If the upper limit of the number of transfers has been reached, it is not necessary to provide the above list, thereby forcing the current default agent to generate an answer.
[0097] In addition, since multiple agents are involved, there may be some upstream and downstream associations between these agents. Therefore, in a preferred implementation, the embodiment of the present application also designs a double-layer memory structure, including a private memory storage module and a public memory storage module. The specific structure can be as follows: Figure 3As shown. Each agent can correspond to a private memory storage module. The status and information related to the agent's own task execution can be stored in the private memory. The private memory can only be stored and read by itself. The entire multi-agent system shares a public memory storage module. For scenarios that need to be transferred, the agent can store some information about the task processing status, transfer reasons, etc. in the public memory. In this way, the transferred agent can better understand the context and continue the next step based on the task execution of the previous agent.
[0098] Through this multi-agent factor, each agent can be optimized for a specific field, reducing the complexity of a single agent and the probability of error. In addition, the consistency of the conversation can be guaranteed by the nearest agent priority rule. By introducing the agent handover capability, the user's demands can be transferred between agents, allowing the most suitable agent to produce a better solution. In addition, since there is no need for separate scene judgment and agent call logic, it is also conducive to improving efficiency. Furthermore, through the design of double-layer memory, agents can ensure both concentration and sufficient ability to communicate with each other.
[0099] In summary, through the embodiment of the present application, by implementing a planner based on a large model, a reasoner based on a large model, and an executor in the Agent (intelligent body), after receiving the user's question, the planner can be used to decompose the task and output the preferred task for solving the problem. The reasoner can also be used to infer at least two actions required to complete the preferred task, and the specific action can be divided into result actions and non-result actions. In this way, when executing a specific action through the executor, the partially completed phased completion result corresponding to the result action can be returned to the user during the execution of the non-result action. Through this method, since the reasoner can output result actions and non-result actions at the same time, it can return in time after obtaining the phased results, and continue to execute other reasoning processes at the same time. This segmented push method can reduce the user's waiting time and avoid the problem of multiple reasonings causing the overall time consumption to be too long. Experiments show that this method reduces the time consumption of displaying the first message from 7 seconds to 1 second, significantly improving the user experience.
[0100] In addition, in a preferred manner, the embodiment of the present application also provides a double-layer loop method, that is, after the reasoner infers the tool action, the executor can return the tool call result to the reasoner, so that the reasoner can infer the next action to be performed based on the tool call result, thereby realizing the first layer of loop. In addition, after the reasoner infers the planned action, it means that the task previously planned by the planner has failed to execute. Therefore, the executor can trigger the planner to plan a new task, thereby realizing the second layer of loop. Through this double-layer loop method, the user's problem can be disassembled and processed step by step. After the task processing fails, other suitable solutions can be selected through the loop, thereby significantly improving the ability to solve user problems.
[0101] Furthermore, by configuring different agents for different scenarios, the agent's problem-solving ability and accuracy can be further improved. In addition, by directly implementing the scene judgment and transfer capabilities within the agent, the agent corresponding to the scene with a relatively high proportion can be set as the default or preferred agent when the session is first entered. The agent will only transfer the problem when it determines that the scene of the current problem does not match it. In addition, when it is not the first time to enter the session, the agent that actually took over the user's problem in the previous round can be used as the default agent. Similarly, the agent will only transfer the problem when it determines that the scene of the new problem does not match it. In this way, the probability of problem transfer can be reduced, which is conducive to further improving efficiency.
[0102] Embodiment 2
[0103] This second embodiment provides a separate protection for the aforementioned double-layer loop solution. Specifically, this second embodiment provides an AI-based question interaction method, see Figure 4 , the method may include:
[0104] S401: receiving a question raised by a user;
[0105] S402: The target agent understands the problem and outputs the processing result. The target agent includes a planner, a reasoner and an executor. The planner and the reasoner are generated based on the artificial intelligence AI model. The target agent is used to perform the following processing:
[0106] S4021: With the goal of solving the problem, the planner performs task decomposition and generates optimal tasks for solving the problem;
[0107] S4022: Inferring, by the reasoner, at least one action required to complete the preferred task, wherein the action includes a tool action and a planning action, wherein the tool action represents that the completion of the preferred task requires reliance on an external tool, and the planning action represents that the preferred task cannot be completed;
[0108] S4023: Execute at least one action through the executor, wherein, for the tool action, call at least one external tool inferred by the reasoner, and return the tool call result to the reasoner to produce the next action, thereby performing a first-level loop; for the planning action, execute the processing returned to the planner so that the planner can update the preferred task for solving the problem, thereby performing a second-level loop.
[0109] Embodiment 3
[0110] This third embodiment also provides separate protection for multi-scenario Agents and solutions in which each Agent has the ability to judge and forward scenarios. Specifically, this third embodiment provides an AI-based question interaction method, in which the scenarios corresponding to the questions that users may ask are classified in advance, and corresponding Agents are provided for the classified multiple scenarios, and the Agents corresponding to each scenario also have the ability to judge the scenario and forward questions; see Figure 5 , the method may include:
[0111] S501: When the user enters the session for the first time, receiving a question raised by the user;
[0112] S502: The scenario to which the question raised by the user belongs is judged by the global default Agent. If the scenario belongs to the scope of responsibility of the global default Agent, the global default Agent will take over the user's question; otherwise, the question is transferred to the Agent corresponding to the scenario to which the question belongs for taking over; the global default Agent is the Agent corresponding to the scenario with a higher probability of appearing in each scenario;
[0113] S503: When the user does not enter the conversation for the first time and a new question is further raised by the user, the agent that accepted the user's question in the previous round of conversation is set as the default agent, and the default agent makes a scenario judgment. If the scenario belongs to the responsibility scope of the default agent, the new question is accepted; otherwise, the new question is transferred to the agent corresponding to the scenario to which the new question belongs.
[0114] After a specific Agent takes over a specific user question, the processing logic described in the first embodiment can be executed inside the Agent, including periodic result return and double-layer loop, etc., which will not be described in detail here.
[0115] For the contents not described in detail in the above-mentioned embodiments 2 and 3, please refer to the records in embodiment 1 and other parts of this specification, which will not be repeated here.
[0116] It should be noted that the embodiments of the present application may involve the use of user data. In actual applications, user-specific personal data can be used in the scheme described herein within the scope permitted by applicable laws and regulations, subject to the requirements of applicable laws and regulations of the country where the user is located (for example, with the user's explicit consent, effective notification to the user, etc.).
[0117] Corresponding to the first embodiment, the embodiment of the present application further provides an AI-based question interaction device, which may include:
[0118] A question receiving unit, used for receiving questions raised by users;
[0119] The agent processing unit is used to understand the problem through the target agent Agent and output the processing result. The target Agent includes a planner, a reasoner and an executor. The planner and the reasoner are generated based on the artificial intelligence AI model.
[0120] The planner is used to decompose tasks with the goal of solving the problem and output optimal tasks for solving the problem;
[0121] The reasoner is used to infer at least two actions required to complete the preferred task, wherein the actions include a result action and a non-result action, wherein the result action represents that the preferred task has been partially completed, and the non-result action represents that the completion of the preferred task needs to rely on external tools or cannot be completed;
[0122] The executor is used to execute the at least two actions, wherein, during the execution of the non-result action, the partially completed phased completion result corresponding to the result action is returned to the user.
[0123] The non-result action includes a tool action or a planning action. The tool action means that the completion of the preferred task needs to rely on an external tool, and the planning action means that the preferred task cannot be completed.
[0124] When executing the at least two actions, the executor calls at least one external tool inferred by the reasoner for the tool action, and returns the tool calling result to the reasoner to generate the next action, thereby performing a first-level loop;
[0125] For the planning action, a process is performed to return to the planner so that the planner updates the preferred task for solving the problem, thereby performing a second-level loop.
[0126] In specific implementation, the scenarios corresponding to the questions that users may ask can be classified in advance, and corresponding Agents can be provided for the classified scenarios respectively;
[0127] The agent processing unit can be specifically used for:
[0128] The target Agent corresponding to the scenario to which the question raised by the user belongs understands the question and outputs a processing result.
[0129] Among them, the Agent corresponding to each scene also has the ability to judge the scene and transfer the problem;
[0130] The agent processing unit can be specifically used for:
[0131] When the user enters the session for the first time, the global default Agent determines the scenario to which the question raised by the user belongs. If the scenario belongs to the scope of responsibility of the global default Agent, the global default Agent will take over the user's question; otherwise, it will be transferred to the Agent corresponding to the scenario to which the question belongs for taking over; the global default Agent is the Agent corresponding to the scenario with a higher probability of appearing in each scenario.
[0132] Specifically, the agent processing unit may also be used for:
[0133] When the user is not entering the conversation for the first time, the agent that accepted the user's question in the previous round of conversation is set as the default agent, and the default agent performs scene judgment. If it belongs to the scene corresponding to the default agent, the new question raised by the user is accepted; otherwise, it is transferred to the agent corresponding to the scene to which the new question belongs for acceptance.
[0134] Among them, the multiple scenarios include pre-sales promotion activity scenarios in the product information service system, solution positioning scenarios related to after-sales issues and before processing results are obtained, and solution follow-up scenarios related to after-sales issues and after processing results are obtained; the solution positioning scenario is set as the default Agent when entering the session state for the first time.
[0135] In addition, the Agent Processing Unit can also be used to:
[0136] In the process of handing over between different Agents, it is determined whether the upper limit of the number of handovers has been reached. If not, a list of Agents available for handover and description information of each Agent are provided to the current default Agent so that an Agent can be selected from them. If the upper limit of the number of handovers has been reached, the current default Agent is forced to generate an answer by not providing the Agent list.
[0137] The multiple scenarios respectively correspond to a private memory storage module dedicated to each scenario, which is used to store relevant information generated by the Agent corresponding to the specific scenario in the process of solving the problem, and is only available for the Agent corresponding to the specific scenario to read the information;
[0138] The multiple scenarios also correspond to a common memory storage module shared by each scenario, which is used to store the task processing status and / or transfer reason information of the transfer initiator Agent during the transfer between different Agents, so that the transferred Agent can read the corresponding information from the common memory storage module and continue to complete subsequent processing.
[0139] Corresponding to the second embodiment, the embodiment of the present application further provides an AI-based question interaction device, which may include:
[0140] A question receiving unit, used for receiving questions raised by users;
[0141] The agent processing unit is used to understand the problem through the target agent Agent and output the processing result. The target Agent includes a planner, a reasoner and an executor. The planner and the reasoner are generated based on the artificial intelligence AI model.
[0142] The planner is used to: output a preferred task for solving the problem with the goal of solving the problem;
[0143] The reasoner is used to: infer at least one action required to complete the preferred task, wherein the action includes a tool action or a planning action, wherein the tool action represents that the completion of the preferred task requires reliance on an external tool, and the planning action represents that the preferred task cannot be completed;
[0144] The executor is used to execute the at least one action, wherein, for the tool action, at least one external tool inferred by the reasoner is called, and the tool call result is returned to the reasoner to produce the next action, thereby performing a first-level loop; for the planning action, the execution is returned to the planner so that the planner can update the preferred task for solving the problem, thereby performing a second-level loop.
[0145] Corresponding to the third embodiment, the embodiment of the present application further provides an AI-based question interaction device, which pre-classifies the scenarios corresponding to the questions that the user may ask, and provides corresponding Agents for the classified multiple scenarios, respectively. The Agent corresponding to each scenario also has the ability to judge the scenario and transfer the question; the device includes:
[0146] A question receiving unit, used for receiving questions raised by a user when the user enters a session for the first time;
[0147] A scenario judgment unit is used to judge the scenario to which the question raised by the user belongs through a global default agent. If the scenario belongs to the scope of responsibility of the global default agent, the global default agent will take over the user's question; otherwise, the question is transferred to the agent corresponding to the scenario to which the question belongs for taking over; the global default agent is the agent corresponding to the scenario with a higher probability of appearing in each scenario;
[0148] The default agent setting unit is used to set the agent that accepted the user's question in the previous round of dialogue as the default agent after receiving a new question further raised by the user when the user enters the conversation for the first time. The default agent makes a scene judgment. If the scene belongs to the scope of responsibility of the default agent, the new question is accepted. Otherwise, it is transferred to the agent corresponding to the scene to which the new question belongs for acceptance.
[0149] In addition, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of any one of the methods in the aforementioned method embodiments are implemented.
[0150] And an electronic device, comprising:
[0151] one or more processors; and
[0152] A memory associated with the one or more processors, the memory being used to store program instructions, wherein the program instructions, when read and executed by the one or more processors, execute the steps of the method described in any one of the aforementioned method embodiments.
[0153] A computer program product includes a computer program / computer executable instructions, which, when executed by a processor in an electronic device, implement the steps of the method described in the aforementioned method embodiment.
[0154] in, Figure 6 The architecture of the electronic device is shown as an example, which may include a processor 610, a video display adapter 611, a disk drive 612, an input / output interface 613, a network interface 614, and a memory 620. The processor 610, the video display adapter 611, the disk drive 612, the input / output interface 613, the network interface 614, and the memory 620 may be communicatively connected via a communication bus 630.
[0155] Among them, the processor 610 can be implemented by a general-purpose CPU (Central Processing Unit, processor), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, etc., to execute relevant programs to implement the technical solution provided in this application.
[0156] The memory 620 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 620 can store an operating system 621 for controlling the operation of the electronic device 600, and a basic input and output system (BIOS) for controlling the low-level operation of the electronic device 600. In addition, a web browser 623, a data storage management system 624, and a problem interaction processing system 625, etc. can also be stored. The above-mentioned problem interaction processing system 625 can be an application program that specifically implements the aforementioned steps in the embodiment of the present application. In short, when the technical solution provided by the present application is implemented by software or firmware, the relevant program code is stored in the memory 620 and is called and executed by the processor 610.
[0157] The input / output interface 613 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0158] The network interface 614 is used to connect to a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0159] The bus 630 comprises a pathway for transmitting information between the various components of the device (eg, the processor 610, the video display adapter 611, the disk drive 612, the input / output interface 613, the network interface 614, and the memory 620).
[0160] It should be noted that, although the above device only shows a processor 610, a video display adapter 611, a disk drive 612, an input / output interface 613, a network interface 614, a memory 620, a bus 630, etc., in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include components necessary for implementing the solution of the present application, and does not necessarily include all the components shown in the figure.
[0161] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.
[0162] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.
[0163] The above is a detailed introduction to the AI-based question interaction method and electronic device provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. An AI-based question interaction method, characterized in that: include: Receive questions from users; The target agent understands the problem and outputs the processing result. The target agent includes a planner, a reasoner and an executor. The planner and the reasoner are generated based on the artificial intelligence AI model. The target agent is used to perform the following processing: With the goal of solving the problem, the planner performs task decomposition and outputs optimal tasks for solving the problem; Inferring at least two actions required to complete the preferred task through the reasoner, the actions include result actions and non-result actions, the result actions represent that the preferred task has been partially completed, and the non-result actions represent that the completion of the preferred task needs to rely on external tools or cannot be completed; The at least two actions are executed by the executor, wherein, during the execution of the non-result action, the partially completed interim completion result corresponding to the result action is returned to the user.
2. The method according to claim 1, characterized in that The non-result action includes a tool action or a planning action. The tool action means that the completion of the preferred task needs to rely on an external tool, and the planning action means that the preferred task cannot be completed. When executing the at least two actions, the executor calls at least one external tool inferred by the reasoner for the tool action, and returns the tool calling result to the reasoner to generate the next action, thereby performing a first-level loop; For the planning action, a process is performed to return to the planner so that the planner updates the preferred task for solving the problem, thereby performing a second-level loop.
3. The method according to claim 1, characterized in that Classify the scenarios corresponding to the questions that users may ask in advance, and provide corresponding agents for the classified scenarios; The target intelligent agent Agent understands the problem and outputs the processing result, including: The target Agent corresponding to the scenario to which the question raised by the user belongs understands the question and outputs a processing result.
4. The method according to claim 2, characterized in that: The Agent corresponding to each scenario also has the ability to judge the scenario and transfer the problem; The target Agent corresponding to the scenario to which the question raised by the user belongs understands the question and outputs a processing result, including: When the user enters the session for the first time, the global default Agent determines the scenario to which the question raised by the user belongs. If the scenario belongs to the scope of responsibility of the global default Agent, the global default Agent will take over the user's question; otherwise, it will be transferred to the Agent corresponding to the scenario to which the question belongs for taking over; the global default Agent is the Agent corresponding to the scenario with a higher probability of appearing in each scenario.
5. The method according to claim 4, characterized in that Also includes: When the user is not entering the conversation for the first time, the agent that accepted the user's question in the previous round of conversation is set as the default agent, and the default agent performs scene judgment. If it belongs to the scene corresponding to the default agent, the new question raised by the user is accepted; otherwise, it is transferred to the agent corresponding to the scene to which the new question belongs for acceptance.
6. The method according to claim 4, characterized in that The multiple scenarios include pre-sale related promotion activity scenarios in the commodity information service system, solution positioning scenarios related to after-sale problems before the processing results are obtained, and solution inquiry scenarios related to after-sale problems after the processing results are obtained; The solution positioning scenario is set as the default Agent when entering the session state for the first time.
7. The method according to claim 4, characterized in that Also includes: In the process of handing over between different agents, it is determined whether the upper limit of the number of handovers has been reached. If not, a list of available agents and description information of each agent is provided to the current default agent so that an agent can be selected from them. If the upper limit of the number of transfers has been reached, the current default Agent is forced to generate an answer by not providing the Agent list.
8. The method according to claim 4, characterized in that The multiple scenarios respectively correspond to a private memory storage module dedicated to each scenario, which is used to store relevant information generated by the Agent corresponding to the specific scenario in the process of solving the problem, and is only available for the Agent corresponding to the specific scenario to read the information; The multiple scenarios also correspond to a common memory storage module shared by each scenario, which is used to store the task processing status and / or transfer reason information of the transfer initiator Agent during the transfer between different Agents, so that the transferred Agent can read the corresponding information from the common memory storage module and continue to complete subsequent processing.
9. An AI-based question interaction method, characterized in that: include: Receive questions from users; The target agent understands the problem and outputs the processing result. The target agent includes a planner, a reasoner and an executor. The planner and the reasoner are generated based on the artificial intelligence AI model. The target agent is used to perform the following processing: With the goal of solving the problem, the planner performs task decomposition and outputs optimal tasks for solving the problem; Inferring at least one action required to complete the preferred task through the reasoner, wherein the action includes a tool action or a planning action, wherein the tool action represents that the completion of the preferred task requires reliance on an external tool, and the planning action represents that the preferred task cannot be completed; Executing the at least one action through the executor, wherein, for the tool action, calling at least one external tool inferred by the reasoner, and returning the tool calling result to the reasoner to generate the next action, thereby performing a first-level loop; For the planning action, a process is performed to return to the planner so that the planner updates the preferred task for solving the problem, thereby performing a second-level loop.
10. An AI-based question interaction method, characterized in that: The scenarios corresponding to the questions that the user may raise are classified in advance, and corresponding agents are provided for the classified multiple scenarios respectively. The agent corresponding to each scenario also has the ability to judge the scenario and transfer the question. The method includes: When the user first enters the session, receive questions from the user; The scenario to which the question raised by the user belongs is judged by the global default Agent. If the scenario belongs to the scope of responsibility of the global default Agent, the global default Agent will take over the user's question; otherwise, it will be transferred to the Agent corresponding to the scenario to which the question belongs for taking over; the global default Agent is the Agent corresponding to the scenario with a higher probability of appearing in each scenario; When the user is not entering the conversation for the first time and a new question is raised by the user, the agent that took the user's question in the previous round of conversation is set as the default agent, and the default agent makes a scenario judgment. If the scenario falls within the scope of responsibility of the default agent, the new question is taken; otherwise, it is transferred to the agent corresponding to the scenario to which the new question belongs.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 10 are implemented.
12. An electronic device, characterized in that: include: one or more processors; as well as A memory associated with the one or more processors, the memory being used to store program instructions, wherein the program instructions, when read and executed by the one or more processors, execute the steps of the method described in any one of claims 1 to 10.
13. A computer program product comprising a computer program / computer executable instructions, characterized in that: When the computer program / computer executable instructions are executed by a processor in an electronic device, the steps of the method according to any one of claims 1 to 10 are implemented.