Interaction method and device, and computer-readable storage medium
By combining multiple agents and scheduling different types of agents to perform tasks, the AI assistant's single function and high cost problems when dealing with complex and variable user needs is solved, achieving more efficient, more accurate and more natural interaction.
Patent Information
- Application Number
- CN202411440940.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2044-10-15
AI Technical Summary
When existing AI assistants deal with complex and changeable user needs, they have problems of single functions, performance bottlenecks and high costs, which are difficult to meet the diverse needs in different scenarios.
By combining multiple agents, different types of agents are scheduled to perform different tasks, and the task sequence and agent combination are determined according to the user's interactive intentions to achieve efficient collaboration.
It improves the performance and adaptability of AI assistants, can handle more complex and changeable user needs, reduces overall costs, and improves the accuracy and nature of answers.
Smart Images

Figure CN118964688B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence, and in particular to an interaction method and device, and a computer-readable storage medium. Background Art
[0002] An artificial intelligence (AI) agent is an intelligent entity capable of perceiving its environment, making decisions, executing actions, and interacting with it. The AI agent is a key concept in the field of artificial intelligence and plays a key role in enabling automated decision-making and task execution.
[0003] With the continuous development and popularization of artificial intelligence technology, artificial intelligence entities will play an increasingly important role in people's lives and work. Summary of the Invention
[0004] According to the first aspect of the present disclosure, an interaction method is provided, comprising: determining the user's interaction intention in response to receiving the user's input information; determining a plurality of tasks and their execution order based on the interaction intention; for each of the plurality of tasks, determining the intelligent agent corresponding to the each task, to obtain a combination of a plurality of intelligent agents, wherein different types of intelligent agents perform different types of tasks; and scheduling the combination of the plurality of intelligent agents to perform the plurality of tasks based on the execution order.
[0005] According to a second aspect of the present disclosure, an interaction device is provided, comprising: an intention determination module, configured to determine a user's interaction intention in response to receiving input information from the user; a task determination module, configured to determine a plurality of tasks and an execution order thereof according to the interaction intention; an agent determination module, configured to determine an agent for each of the plurality of tasks, to obtain a combination of a plurality of agents, wherein different types of agents perform different types of tasks; and a scheduling module, configured to schedule the combination of the plurality of agents to perform the plurality of tasks according to the execution order.
[0006] According to a third aspect of the present disclosure, an interaction device is provided, comprising: a memory; and a processor coupled to the memory, wherein the processor is configured to execute the interaction method according to any of the embodiments of the present disclosure based on instructions stored in the memory.
[0007] According to a fourth aspect of the present disclosure, an interactive system is provided, comprising: an interactive device according to any of the embodiments of the present disclosure; and a plurality of intelligent agents.
[0008] According to a fifth aspect of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the instructions are executed by a processor, the interaction method described in any embodiment of the present disclosure is implemented.
[0009] According to a sixth aspect of the present disclosure, a computer program product is provided, comprising computer program instructions, which, when executed by a processor, implement the interaction method according to any of the embodiments of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The preferred embodiments of the present disclosure are described below with reference to the accompanying drawings. The drawings described herein are used to provide a further understanding of the present disclosure. Each of the drawings, together with the following detailed description, is included in this specification and forms a part of the specification to explain the present disclosure. It should be understood that the drawings described below only relate to some embodiments of the present disclosure and do not constitute a limitation of the present disclosure. In the drawings:
[0011] Figure 1 A schematic diagram showing a flow chart of an interaction method according to some embodiments of the present disclosure is shown;
[0012] Figure 2 A schematic diagram of a process for determining an intelligent agent according to some embodiments of the present disclosure is shown;
[0013] Figure 3 A schematic diagram illustrating an interaction method according to some embodiments of the present disclosure is shown;
[0014] Figure 4 A block diagram of an interaction device according to some embodiments of the present disclosure is shown;
[0015] Figure 5 A block diagram of an interaction device according to some other embodiments of the present disclosure is shown;
[0016] Figure 6 A block diagram of an electronic device according to some embodiments of the present disclosure is shown.
[0017] It should be understood that, for ease of description, the dimensions of the various parts shown in the drawings are not necessarily drawn to scale. The same or similar reference numerals are used throughout the drawings to indicate the same or similar parts. Therefore, once an item is defined in one drawing, it may not be discussed further in subsequent drawings. DETAILED DESCRIPTION
[0018] The following will be combined with the accompanying drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. However, it is obvious that the embodiments described are only some embodiments of the present disclosure, rather than all embodiments. The following description of the embodiments is actually only illustrative and is in no way intended to limit the present disclosure and its application or use. It should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein.
[0019] It should be understood that the various steps described in the method embodiments of the present disclosure can be performed in different orders and / or performed in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect. Unless otherwise specifically stated, the relative arrangement, numerical expressions and numerical values of the parts and steps set forth in these embodiments should be interpreted as being merely exemplary and do not limit the scope of the present disclosure.
[0020] As used in this disclosure, the term "include" and its variations are intended to be open-ended terms that include at least the following elements / features but do not exclude other elements / features, i.e., "including but not limited to." Furthermore, the term "comprise" and its variations are intended to be open-ended terms that include at least the following elements / features but do not exclude other elements / features, i.e., "including but not limited to." Therefore, "include" and "include" are synonymous. The term "based on" means "based, at least in part, on."
[0021] Reference throughout this specification to "one embodiment," "some embodiments," or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. For example, the term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Furthermore, the appearances of the phrases "in one embodiment," "in some embodiments," or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment, but may.
[0022] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules, or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules, or units. Unless otherwise specified, concepts such as "first" and "second" are not intended to imply that the objects described in such a manner must be in a given order in time, space, ranking, or any other manner.
[0023] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0024] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0025] The following detailed description of the embodiments of the present disclosure is provided in conjunction with the accompanying drawings, but the present disclosure is not limited to these specific embodiments. The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. In addition, in one or more embodiments, specific features, structures, or characteristics may be combined in any suitable manner that will be apparent to those skilled in the art from this disclosure.
[0026] In the field of AI assistants, as user needs become increasingly complex and diverse, the limitations of single models are becoming increasingly prominent. These limitations primarily manifest in: single functionality, making it difficult to simultaneously meet diverse user needs across different scenarios; performance bottlenecks, where a single agent may underperform in handling certain specific tasks; and high costs, often requiring larger and more expensive models to improve overall performance. These shortcomings have hindered the further development and application of AI assistants.
[0027] An embodiment of the present disclosure provides an interaction method, comprising: determining the user's interaction intention in response to receiving user input information; determining multiple tasks and their execution order based on the interaction intention; for each of the multiple tasks, determining the intelligent agent corresponding to each task to obtain a combination of multiple intelligent agents, wherein different types of intelligent agents perform different types of tasks; and scheduling the combination of the multiple intelligent agents to perform the multiple tasks based on the execution order.
[0028] Compared to a single model, combining multiple agents and dispatching different types of agents to perform different tasks enables the combination of agents to handle more complex and changing user needs, improving the performance and adaptability of AI assistants. The collaboration of multiple specialized agents also makes responses more accurate and natural.
[0029] Figure 1 A flowchart of an interaction method according to some embodiments of the present disclosure is shown.
[0030] like Figure 1As shown, the interaction method includes: step S1, in response to receiving the user's input information, determining the user's interaction intention; step S2, determining multiple tasks and their execution order according to the interaction intention; step S3, for each of the multiple tasks, determining the intelligent agent corresponding to each task, and obtaining a combination of multiple intelligent agents, wherein different types of intelligent agents perform different types of tasks; step S4, scheduling the combination of multiple intelligent agents to perform multiple tasks according to the execution order.
[0031] The user's input information can be, for example, text, URLs, pictures, videos, etc.
[0032] User interaction intention refers to the potential purpose or desired goal of user interaction behavior.
[0033] For example, multiple tasks may include multiple steps that need to be executed to satisfy the user's interaction intent. Multiple tasks can be executed in parallel or serially. Alternatively, some tasks can be executed in parallel while others can be executed serially.
[0034] For example, agents are specialized for performing specific tasks, also known as specialized agents. Each type of agent possesses specific expertise, further refining the division of labor among agents. When multiple agents are scheduled to perform multiple tasks, each agent performs its specialized tasks, and the agents collaborate with each other.
[0035] The interactive method of this embodiment can be performed by an interactive device. The interactive device is, for example, a scheduler, and the above steps S1-S4 can be performed by the scheduler. By introducing the "scheduler" role, intelligent task allocation can be achieved.
[0036] The interaction method of this embodiment can be executed on the client side, or partially executed on the server side.
[0037] The following combination Figure 2 , first introduce the process of determining the intelligent agent according to some embodiments of the present disclosure.
[0038] like Figure 2 As shown, step S3 determines the intelligent agent corresponding to each task for each of the multiple tasks, including: step S31, determining the type and requirements of each task; step S32, determining one or more candidate intelligent agents that match the type of each task; step S33, selecting the intelligent agent corresponding to each task from one or more candidate intelligent agents according to the requirements of each task.
[0039] For example, if the task type is chat, the corresponding agent type is a small talk agent (e.g., a role-playing agent). For a task, one or more candidate agents may be of the same type, but with different voices and styles. For example, different small talk agents have different voices and styles, such as friendly and affable, humorous and witty, calm and rational, or artistic and sentimental.
[0040] The task requirements can be determined based on the user's intent. For example, if the user wants to be comforted, the task requirement is to be warm and friendly during the chat. In this case, an agent with a friendly and approachable style is selected from the chat-related agents to perform the chat task.
[0041] In some embodiments, in response to receiving user input information, determining the user's interaction intention includes: in response to receiving user input information, determining the type of the input information; and determining the interaction intention based on the type of the input information.
[0042] The type of input information refers to the carrier of the input information, such as text, URL, image, video, etc. Different types of input information may have different interaction intentions.
[0043] If it is detected that the user input contains an image, it is determined that the user's intention may be image processing, or image-to-text, etc. If it is detected that the user input is in text form, natural language processing technology can be used to analyze the user's intention.
[0044] In some embodiments, in response to receiving user input information, determining the user's interaction intention includes: in response to determining that the input information does not meet a second specified condition, outputting a second guidance question to the user; and determining the interaction intention based on the user's feedback on the second guidance question.
[0045] For example, if the user's question is not clear enough and it is difficult to determine the user's interaction intention, the input information does not meet the second specified condition. Therefore, it is necessary to output a second guiding question to the user to guide the user to clarify his intention.
[0046] In some embodiments, multiple tasks and their execution order are determined based on the interaction intention, including: determining a complex task corresponding to the interaction intention; splitting the complex task into multiple tasks; and determining the execution order based on the relationship between the multiple tasks.
[0047] For example, the scheduler determines the number of intents in a sentence entered by the user, determines which tasks need to be performed to fulfill those intents, and determines the order in which these tasks should be executed. If a user wants to create an article that meets their needs, they must first search online and then write based on the search results. Therefore, the order of execution is search first, then creation.
[0048] You can first determine the order in which tasks should be executed, and then, based on the tasks and their execution order, determine the agent corresponding to each task. Alternatively, you can first determine the agent corresponding to each task, and then determine the order of task execution based on the agent's characteristics, user intent, and task requirements. The relationship between multiple tasks can be, for example, an input-output relationship. For example, if executing task B requires the processing results of task A, then task A should be executed first, followed by task B.
[0049] By breaking down complex tasks and refining the work division and collaboration methods of intelligent agents, efficient collaboration can be achieved. At the same time, by fine-tuning the task allocation of complex tasks, a basic model can be used to solve the basic tasks decomposed from the complex tasks, reducing the overuse of large-parameter, high-cost models.
[0050] In some embodiments, the interaction method further includes: providing task information to at least one of the plurality of agents based on the input information.
[0051] For example, the scheduler assigns tasks to selected agents, processes the user's input information, splits it into the context information required to execute the task, and provides it to the corresponding agent.
[0052] The scheduler can provide task information to all agents or only to a subset of them. For example, if tasks are executed serially, and each subsequent agent relies solely on the output of the previous agent to execute its task, task information only needs to be provided to the first agent in the sequence. If tasks that precede the previous agent are executed in parallel, task information is provided to all the agents that precede them.
[0053] In some embodiments, the interaction method further includes: determining a base model for at least one of the plurality of agents based on the input information.
[0054] The base model and the agent do not need to be bound together, and the base model of the agent can be flexibly adjusted according to the task requirements of different scenarios.
[0055] Examples of foundational models include those that excel at tool invocation, language communication, text processing, and mathematical reasoning. For tasks that require interaction with external systems, choose a model that excels at tool invocation; for tasks that require natural, fluent conversation, choose a model that excels at language communication; for tasks that process and generate large amounts of text, choose a model that excels at text processing; and for scientific computing and logical analysis, choose a model that excels at mathematical reasoning.
[0056] If the user input is in text form, the base can also be selected based on the tokens of the text. For example, if the user input is very long, a base model with a long context window is selected for the agent.
[0057] The multiple agents include at least one of the following: role-playing agent, information retrieval agent, creative agent, and question-answering agent. The language styles of different creative agents are different.
[0058] Characteristics of information retrieval agents include rigor and professionalism, expertise in finding and organizing information, and the ability to perform network searches, database queries, and information aggregation. The foundational model of information retrieval agents includes a broad knowledge base.
[0059] The characteristics of the creative agent are, for example, imaginative, good at content creation, and able to write, create stories, compose poetry, etc. The base model of the creative agent is, for example, a model with strong creativity.
[0060] Question-answering agents, also known as problem-solving agents, are characterized by strong logic, expertise in analyzing and solving complex problems, and the ability to perform mathematical calculations, logical reasoning, and solution design. The foundational model for question-answering agents, for example, uses a model with strong reasoning capabilities.
[0061] The multiple agents may also include a small talk agent. A small talk agent may be good at everyday conversations, such as greetings, small talk, and simple questions and answers. The base model of the small talk agent may be a model that excels at natural conversations.
[0062] At the same time, multiple agents can also include translation agents, text expansion agents, image expansion agents, text-image agents, etc.
[0063] In some embodiments, the interaction method also includes: when the output of multiple agents does not meet the first specified condition, redetermining the agent for each task to obtain a redetermined combination of multiple agents; scheduling the redetermined combination of multiple agents according to the execution order to re-execute multiple tasks.
[0064] The first specified condition is, for example, that the outputs of multiple agents are consistent, or that the final result generated based on the outputs of multiple agents meets the user's interaction intention.
[0065] If the first specified condition is not met, the scheduler can reselect the agent, change the type of the selected agent, or select a different agent within the same type. For example, if the outputs of agent A performing task 1 and agent B performing task 2 are inconsistent, agent C of the same type but different style as agent B can be substituted for task 2, or agent D of a different type from agent B can be substituted for task 2.
[0066] In other words, at runtime, the scheduler can dynamically adjust the composition and working methods of agents, flexibly configuring multiple agents to work together according to different business scenarios. Working methods include, for example, environmental perception, decision-making, and action execution. Furthermore, the scheduler can iteratively optimize and continuously adjust the collaborative methods of agents based on user feedback.
[0067] An additional detector can also be added to detect whether the tasks, task sequence, and selected intelligent agents determined by the scheduler are reasonable. If not, the scheduler will rearrange the tasks, task sequence, and selected intelligent agents.
[0068] In some embodiments, the interaction method also includes: when the output of multiple agents does not meet the first specified condition, redetermining multiple tasks and their execution order, determining the agent corresponding to each task, and scheduling a combination of multiple agents to perform multiple tasks.
[0069] For example, if the outputs of multiple agents do not meet the first specified condition, it may not only be that the combination of agents is unreasonable, but also that the task arrangement is unreasonable. Therefore, multiple tasks and their execution order can be re-determined and the agents can be reallocated.
[0070] In some embodiments, the interaction method also includes: outputting a guiding question to the user when the output of multiple agents does not meet the first specified condition; redetermining the user's interaction intention based on the user's feedback on the guiding question; redetermining multiple tasks and their execution order, determining the agent corresponding to each task, and scheduling a combination of multiple agents to perform multiple tasks.
[0071] For example, if the outputs of multiple agents do not meet the first specified condition, it may also be that the user's intention is not accurately determined. The user can be asked to clarify his intention through counter-questions and the tasks can be rearranged and assigned.
[0072] In some embodiments, the interaction method further includes: when there is a conflict in the outputs of multiple agents, redetermining multiple tasks and their execution order, determining the agent corresponding to each task, and scheduling a combination of multiple agents to perform multiple tasks.
[0073] For example, if the outputs of multiple agents conflict, this could be due to an inappropriate combination of agents or an inappropriate task assignment. Therefore, tasks can be rearranged and assigned to resolve the conflict. The final integration agent can determine whether all agent outputs conflict, or other detection modules can determine whether all agent outputs conflict.
[0074] If the outputs of multiple agents conflict, the agent combination can be changed first. If the conflict is resolved, the result can be generated and output to the user. If the conflict is not resolved and the number of agent recombinations reaches a threshold, the multiple tasks can be redefined and the agent combination can be selected for the redefined task.
[0075] In some embodiments, the interaction method also includes: outputting a first guiding question to the user when there is a conflict in the outputs of multiple agents; redetermining the user's interaction intention based on the user's feedback on the first guiding question; redetermining multiple tasks and their execution order, determining the agent corresponding to each task, and scheduling a combination of multiple agents to perform multiple tasks.
[0076] For example, if the outputs of multiple agents conflict, the user can be asked to decide which part he or she needs.
[0077] After receiving user feedback, the conflicting content can be output to the user, specifically the content they need. After receiving user feedback, the user's interaction intent can be re-determined and tasks re-assigned based on the feedback. Furthermore, when assigning tasks to agents, agents that generate content that the user doesn't need can be excluded.
[0078] If the outputs of multiple agents conflict, the agent combination can be changed. If the conflict is resolved, a result can be generated and output to the user. If the conflict is not resolved and the number of agent recombinations reaches a threshold, the multiple tasks can be redefined and a combination of agents can be selected for the redefined tasks. If the conflict is still not resolved after the number of recombinations reaches the threshold, the first guidance question can be presented to the user again to seek user assistance.
[0079] After multiple agents output their results, they can be integrated to obtain and output the integrated results. The following describes the integration process.
[0080] For example, the scheduler determines a first target agent, which can be one of the multiple agents performing the task or a dedicated agent for integration.
[0081] The scheduler can also determine a second target agent and schedule the second target agent to output the integrated results. The second target agent can be one of the multiple agents mentioned above, or a dedicated agent for output. The second target agent can be the same agent as the first target agent, or a different agent.
[0082] The scheduler can determine the first target agent and the second target agent based on the tasks and their execution order. For example, the last agent that executes the task can be designated as the first target agent and the second target agent, which are responsible for integration and output.
[0083] The integrated results may also be subjected to a consistency check, and if the consistency check passes, the results that pass the consistency check are output.
[0084] Consistency checks can be used to ensure that the result of the integration is consistent in logic and tone. For example, if the result of the integration is an article, you can check whether there are contradictions between the previous and next paragraphs of the article, or whether there are differences in writing style.
[0085] The scheduler schedules the third target agent to perform a consistency check on the integrated result. If the consistency check passes, the scheduler schedules the second target agent to output the result that passes the consistency check.
[0086] If the consistency check fails, the outputs of multiple agents are reintegrated and the consistency check is performed on the reintegrated results.
[0087] For example, if the consistency check fails, there may be a problem in the integration process. The outputs of multiple intelligent agents can be reintegrated, and only consistent content can be selected for integration.
[0088] If the consistency check fails, the system can first reintegrate. If the reintegration resolves the consistency issue, the integrated results will be output to the user. If the number of reintegrations reaches a threshold and the consistency issue is not resolved, the combination of agents can be changed. If the recombination of agents resolves the consistency issue, the results can be generated and output to the user. If the consistency issue is still not resolved and the number of agent recombinations reaches a threshold, the system can start by re-determining multiple tasks and selecting a combination of agents for the re-determined tasks. If the number of task recombinations reaches a threshold and the consistency issue is still not resolved, guiding questions can be output to the user to seek user assistance.
[0089] Multiple agents can exchange information through a shared knowledge base. For example, multiple agents can share common knowledge through a shared knowledge base. By centrally storing common knowledge and making it available to multiple agents, it facilitates real-time updating and maintenance of common knowledge.
[0090] According to some embodiments of the present disclosure, by determining the user's interaction intention, multiple tasks and their execution order are determined, and a corresponding intelligent agent is determined for each task, a combination of multiple intelligent agents is obtained, and the combination of multiple intelligent agents is scheduled to perform multiple tasks, thereby satisfying the user's interaction intention.
[0091] Compared to a single model, combining multiple agents, with different types of agents performing different tasks, allows the combination of agents to handle more complex and changing user needs, improving the performance and adaptability of AI assistants. The collaboration of multiple specialized agents also makes responses more accurate and natural.
[0092] Multi-agent collaboration can fully leverage the advantages of different models and allow sub-agents to be optimized, improving the performance of a certain agent in a specific task, thereby improving overall performance and reducing costs.
[0093] Figure 3 A schematic diagram of an interaction method according to some embodiments of the present disclosure is shown.
[0094] like Figure 3 As shown, when the user enters prompt information, the system can use a preset character to prompt the user to assist the user in inputting information. At the same time, the user's identity can also be verified to improve security.
[0095] Determine whether the user input is a long text, image, video, or link. If it is long text, select a model that is appropriate for its token length. If it is an image, video, or link, determine the user's intent based on the input type and select the appropriate model.
[0096] If the carrier is not of the above type but a text of normal length, then determine whether the user's meaning is clear. If not, use rhetorical questions to help the user clarify his intention. If the user's intention can be clearly judged, determine the task to be performed and its corresponding intelligent agent.
[0097] Figure 4 A block diagram of an interaction device according to some embodiments of the present disclosure is shown.
[0098] like Figure 4 As shown, the interaction device 4 includes: an intention determination module 41, configured to determine the user's interaction intention in response to receiving the user's input information; a task determination module 42, configured to determine multiple tasks and their execution order according to the interaction intention; an agent determination module 43, configured to determine the agent for each task of the multiple tasks, and obtain a combination of multiple agents, wherein different types of agents perform different types of tasks; a scheduling module 44, configured to schedule the combination of multiple agents to perform multiple tasks according to the execution order.
[0099] The intention determination module 41 of the interactive device 4 can be used to perform Figure 1 Step S1. The task determination module 42 of the interactive device 4 can be used to perform Figure 1 The agent determination module 43 can be used to perform Figure 1 The scheduling module 44 can be used to perform Figure 1 Step S4.
[0100] In some embodiments, the interaction device 4 further includes: a providing module configured to provide task information to at least one of the multiple agents based on the input information.
[0101] In some embodiments, the interaction device 4 further includes: a base determination module configured to determine a base model for at least one agent of the multiple agents based on input information.
[0102] In some embodiments, the interactive device 4 also includes: a loop module, which is configured to redetermine the agent for each task when the output of multiple agents does not meet the first specified condition, and obtain a redetermined combination of multiple agents; and schedule the redetermined combination of multiple agents according to the execution order to re-execute multiple tasks.
[0103] In some embodiments, the interactive device 4 also includes: a loop module, which is configured to redetermine multiple tasks and their execution order, determine the agent corresponding to each task, and schedule a combination of multiple agents to perform multiple tasks when there is a conflict in the outputs of multiple agents.
[0104] In some embodiments, the interaction device 4 also includes: a loop module, configured to output a first guiding question to the user when there is a conflict in the outputs of multiple intelligent agents; redetermine the user's interaction intention based on the user's feedback on the first guiding question; redetermine multiple tasks and their execution order, determine the intelligent agent corresponding to each task, and schedule a combination of multiple intelligent agents to perform multiple tasks.
[0105] In some embodiments, the interaction device 4 further includes: an integration module configured to integrate the outputs of multiple agents to obtain an integrated result; and output the integrated result.
[0106] In some embodiments, the integration module is further configured to perform a consistency check on the integration result; if the consistency check passes, output the result that passes the consistency check.
[0107] In some embodiments, the integration module is further configured to reintegrate the outputs of the multiple agents if the consistency check fails, and perform a consistency check on the reintegrated results.
[0108] Figure 5 A block diagram of an interaction device according to some other embodiments of the present disclosure is shown.
[0109] like Figure 5As shown, the interaction device 5 includes: a memory 51 ; and a processor 52 coupled to the memory 51 , wherein the processor 52 is configured to execute the interaction method of any of the aforementioned embodiments based on instructions stored in the memory 51 .
[0110] Memory 51 is used to store one or more computer-readable instructions. Memory 51 may include any combination of various forms of computer-readable storage media, such as volatile and / or non-volatile memory, including but not limited to random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), read-only memory (ROM), and flash memory. Memory 51 may store, for example, an operating system, applications, a boot loader, databases, and other programs, as well as various applications and data.
[0111] The processor 52 is used to execute computer-readable instructions to implement the interaction method of any of the above embodiments. The specific implementation of each step of the interaction method can be found in the above embodiments, and the repeated parts are not repeated here.
[0112] The processor 52 may be configured to execute Figure 1 The processor 52 may be implemented as various processing devices, such as a central processing unit (CPU), a network processor (NP), or a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The central processing unit (CPU) may be an X86 or ARM architecture.
[0113] The processor 52 and the memory 51 can communicate with each other directly or indirectly. For example, the processor 52 and the memory 51 can communicate via a network. The network can include a wireless network, a wired network, and / or any combination of wireless and wired networks. The processor 52 and the memory 51 can also communicate with each other via a system bus, which is not limited in this disclosure.
[0114] It should be noted that Figure 5 The components of the interactive device 5 shown are merely exemplary and non-limiting. The interactive device 5 may also have other components according to actual application requirements. The processor 52 may control other components in the interactive device 5 to perform desired functions.
[0115] The interactive device can be implemented by software, firmware and / or hardware, and can be integrated into an electronic device installed with relevant application programs.
[0116] The present disclosure provides an interactive system, comprising: an interactive device according to any of the embodiments of the present disclosure; and multiple agents. The interactive system according to the present disclosure implements multi-agent collaboration and provides a flexible and efficient multi-agent collaboration framework.
[0117] In some embodiments, the interactive system further includes a user interface configured to: receive user input; and display output of the interactive device.
[0118] In some embodiments, the interactive system further includes a knowledge base configured to store knowledge and information shared by the agents.
[0119] In some embodiments, the interactive system further includes an external API interface configured to connect to external services and data sources.
[0120] According to some embodiments of the present disclosure, a multi-agent AI assistant system can be constructed, which includes a scheduler and multiple agents for selection to provide services to users.
[0121] The system framework of the multi-agent AI assistant can adopt an extensible architecture, such as a plug-in system, to support the flexible addition of new agents and base models.
[0122] Each agent can be used as an independent module, making it easy to add, remove, or update. At the same time, standardized interfaces can be used to define a unified data exchange format to facilitate the integration of new agents and models.
[0123] Developers can create their own agents. Furthermore, by communicating with the AI assistant, developers can add their own agents to the system. For example, if a developer creates an agent for searching for news and adds it to the system, when a user communicates with the AI assistant, the user's agent can be called upon to process user intent related to news. This extensible architecture enhances the system's scalability, facilitates the integration of new models and features, and adapts to future technological developments.
[0124] Figure 6 A block diagram of an electronic device according to some embodiments of the present disclosure is shown.
[0125] Figure 6 The electronic device 6 shown may be a computer system with a dedicated hardware structure, which can execute corresponding functions when a relevant application program is installed.
[0126] Electronic devices include, but are not limited to, mobile terminals such as smartphones, laptops, personal digital assistants (PDAs), tablet personal computers (Tablet PCs), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), wearable devices, etc., as well as fixed terminals such as digital televisions and desktop computers, etc.
[0127] like Figure 6 As shown, the central processing unit (CPU) 61 executes various processes according to the program stored in the read-only memory (ROM) 62 or the program loaded from the storage part 68 to the random access memory (RAM) 63. In the RAM 63, data required when the CPU 61 executes various processes is stored as needed. The central processing unit is merely an example, and it can also be other types of processors, such as the various processors mentioned above. The ROM 62, RAM 63 and the storage part 68 can be various forms of computer-readable storage media. It should be noted that although Figure 6 ROM 62, RAM 63 and storage portion 68 are shown separately in FIG, but one or more of them may be combined or located in the same or different memory or storage modules.
[0128] The CPU 61, the ROM 62, and the RAM 63 are connected to one another via a bus 64. To the bus 64, an input / output interface 65 is also connected.
[0129] The following components are connected to the input / output interface 65: an input section 66 such as a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output section 67 including a display such as a cathode ray tube (CRT), a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage section 68 including a hard disk, a magnetic tape, etc.; and a communication section 69 including a network interface card such as a LAN card, a modem, etc. The communication section 69 allows communication processing to be performed via a network such as the Internet. It is easy to understand that although Figure 6 The various devices or modules in the electronic device 6 are shown to communicate via a bus 64, but they may also communicate via a network or other means, wherein the network may include a wireless network, a wired network, and / or any combination of a wireless network and a wired network.
[0130] A drive 610 is also connected to the input / output interface 65 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is mounted on the drive 610 as needed so that a computer program read therefrom is installed in the storage section 68 as needed.
[0131] When the series of processing described above is implemented by software, the program constituting the software can be installed from a network such as the Internet or a storage medium such as the removable medium 611 .
[0132] According to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product that, when the computer program product is run on a computer, causes the computer to implement the interactive method of any of the aforementioned embodiments. The computer program product includes a computer program carried on a computer-readable medium, the computer program containing program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 69, or installed from the storage part 68, or installed from the ROM 62. When the computer program is executed by the CPU 61, the interactive method of the embodiment of the present disclosure is executed.
[0133] It should be noted that, in the context of the present disclosure, a computer-readable medium may be a tangible medium that may contain or store a program for use by an instruction execution system, apparatus, or device or for use in conjunction with an instruction execution system, apparatus, or device.
[0134] The computer readable medium may be a computer readable storage medium, or a computer readable signal medium, or any combination of the two.
[0135] Computer-readable storage media include, but are not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or components, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or device. A computer program is stored on a computer-readable storage medium that, when executed by a processor, implements the interactive method of any of the aforementioned embodiments.
[0136] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0137] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0138] In some embodiments, a computer program is further provided, comprising: instructions, which, when executed by a processor, cause the processor to perform the interaction method of any of the above embodiments. For example, the instructions may be embodied as computer program codes.
[0139] In embodiments of the present disclosure, computer program code for performing the operations of the present disclosure can be written in one or more programming languages or combinations thereof, including but not limited to object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In situations involving a remote computer, the remote computer can be connected to the user's computer via any type of network (including a local area network (LAN) or a wide area network (WAN)), or can be connected to an external computer (e.g., using an Internet service provider to connect via the Internet).
[0140] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0141] The functions described above may be performed at least in part by one or more hardware logic components. For example, and without limitation, exemplary hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0142] Although some specific embodiments of the present disclosure have been described in detail by way of examples, those skilled in the art will appreciate that the above examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Those skilled in the art will appreciate that modifications may be made to the above embodiments without departing from the scope and spirit of the present disclosure. The scope of the present disclosure is defined by the appended claims.
Claims
1. An interactive method, comprising: In response to receiving user input information, determining the user's interaction intention; determining a plurality of tasks and an execution order thereof according to the interaction intention; For each of the plurality of tasks, determining an agent corresponding to each task to obtain a combination of multiple agents, wherein different types of agents perform different types of tasks; Scheduling a combination of the plurality of agents to execute the plurality of tasks according to the execution order; In the event that the outputs of the multiple agents do not satisfy a first specified condition, the agent for each task is re-determined to obtain a re-determined combination of multiple agents, wherein the first specified condition includes that the outputs of the multiple agents are consistent and / or that the results generated based on the outputs of the multiple agents satisfy the user's interaction intention; and according to the execution order, the re-determined combination of multiple agents is scheduled to re-execute the multiple tasks. wherein the re-determining the agent for each task to obtain a combination of multiple agents comprises: replacing at least one previously determined agent with at least one re-determined agent, wherein the at least one re-determined agent and the at least one previously determined agent perform the same task, and the at least one re-determined agent and the at least one previously determined agent have different styles; When the number of times the combination of the multiple agents is re-determined reaches a threshold and there is a conflict in the outputs of the multiple agents, the multiple tasks and their execution order are re-determined, the agent corresponding to each task is determined, and the combination of the multiple agents is scheduled to perform the multiple tasks.
2. The interactive method according to claim 1, wherein: The step of determining, for each of the plurality of tasks, an agent corresponding to each task, includes: Determine the type and requirements of each of the tasks described; determining one or more candidate agents that match the type of each task; According to the requirements of each task, an agent corresponding to each task is selected from the one or more candidate agents.
3. The interactive method according to claim 1, wherein: Determining a plurality of tasks and their execution order according to the interaction intention includes: Determine the complex task corresponding to the interaction intention; Splitting the complex task into the multiple tasks; The execution order is determined according to the relationship between the multiple tasks.
4. The interactive method according to claim 1, further comprising: Based on the input information, task information is provided to at least one of the plurality of agents.
5. The interactive method according to claim 1, further comprising: A base model is determined for at least one of the plurality of agents based on the input information.
6. The interactive method according to claim 1, further comprising: When there is a conflict between the outputs of the plurality of intelligent agents, outputting a first guiding question to the user; Re-determining the user's interaction intention based on the user's feedback on the first guiding question; Re-determine multiple tasks and their execution order, determine the intelligent agent corresponding to each task, and schedule the combination of the multiple intelligent agents to execute the multiple tasks.
7. The interactive method according to claim 1, further comprising: Integrating the outputs of the multiple agents to obtain an integrated result; The result of the integration is output.
8. The interactive method according to claim 7, wherein: The outputting of the integration result includes: performing consistency check on the results of the integration; If the consistency check passes, a result of passing the consistency check is output.
9. The interactive method according to claim 8, further comprising: If the consistency check fails, the outputs of the multiple agents are reintegrated, and a consistency check is performed on the reintegrated result.
10. The interactive method according to claim 1, wherein: The step of determining the user's interaction intention in response to receiving the user's input information includes: In response to determining that the input information does not satisfy a second specified condition, outputting a second guiding question to the user; The interaction intention is determined according to the user's feedback on the second guiding question.
11. The interactive method according to claim 1, wherein: The step of determining the user's interaction intention in response to receiving the user's input information includes: In response to receiving the input information, determining a type of the input information; The interaction intention is determined according to the type of the input information.
12. The interactive method according to claim 1, wherein: The plurality of agents include at least one of the following: role-playing agents; Information retrieval agents; Creative agents, where different creative agents have different language styles; Question-answering agent.
13. The interactive method according to any one of claims 1 to 12, wherein: The multiple agents exchange information via a shared knowledge base.
14. An interactive device comprising: an intention determination module, configured to determine the user's interaction intention in response to receiving the user's input information; a task determination module, configured to determine a plurality of tasks and an execution order thereof according to the interaction intention; an agent determination module configured to determine, for each of the plurality of tasks, an agent for the task, to obtain a combination of a plurality of agents, wherein different types of agents perform different types of tasks; a scheduling module configured to schedule the combination of the plurality of agents to execute the plurality of tasks according to the execution order; A loop module is configured to, when the outputs of the multiple agents do not satisfy a first specified condition, redetermine the agent for each task to obtain a redetermined combination of multiple agents, wherein the first specified condition includes that the outputs of the multiple agents are consistent and / or the results generated based on the outputs of the multiple agents satisfy the user's interaction intention; and schedule the redetermined combination of multiple agents according to the execution order to re-execute the multiple tasks, wherein the redetermining of the agent for each task to obtain a combination of multiple agents includes: replacing the previously determined agent with the redetermined agent, wherein the redetermined agent and the previously determined agent perform the same task, and the style of the redetermined agent and the previously determined agent is different; when the number of times the combination of the multiple agents is redetermined reaches a threshold and there is a conflict in the outputs of the multiple agents, redetermine the multiple tasks and their execution order, determine the agent corresponding to each task, and schedule the combination of the multiple agents to perform the multiple tasks.
15. An interactive device comprising: Memory; as well as A processor coupled to the memory, wherein the processor is configured to execute the interaction method according to any one of claims 1 to 13 based on instructions stored in the memory.
16. An interactive system comprising: The interactive device according to claim 14 or 15; as well as Multiple agents.
17. A computer-readable storage medium having computer program instructions stored thereon, wherein when the instructions are executed by a processor, the interaction method according to any one of claims 1 to 13 is implemented.
18. A computer program product comprising computer program instructions, which, when executed by a processor, implement the interaction method according to any one of claims 1 to 13.
Citation Information
Patent Citations
Intelligent learning guiding method based on GPT and multi-agent reinforcement learning
CN117808637A
Financial task execution method and device, equipment, medium and program product
CN118312599A
Task processing method and device, equipment and computer readable storage medium
CN118626690A