Multi-agent collaborative question answering method, device, and server
By using a stateful result pool to store data in isolation by field in a multi-agent question-answering system and clearing consumed results after generating the final answer, the problem of information isolation and cleanup in multi-round question-answering is solved, ensuring the accuracy and efficiency of question-answering.
Patent Information
- Application Number
- CN202611340481.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-31
- Publication Date
- 2026-11-17
AI Technical Summary
In multi-agent question-answering scenarios with multiple rounds of long conversations, existing technologies struggle to effectively isolate the results of each round, leading to outdated information being re-included in the response, affecting the accuracy of the answer. Furthermore, simple cleanup cannot balance the timeliness and completeness of the information.
The business results generated by different sub-agents are stored in isolation by field through a stateful result pool. After the final response is generated, an overwrite and clear operation is triggered to clear only the consumed result fields, ensuring the integrity and isolation of information.
This approach ensures that each round of task processing is completed within an independent and clean state space, guaranteeing the integrity of the information required for the current task and preventing historical information from interfering with the current task across round boundaries, thereby improving the accuracy and efficiency of question answering.
Smart Images

Figure CN123115335A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer science, and more particularly to a collaborative question-answering method, apparatus, and server based on multi-agent systems. Background Technology
[0002] In multi-round continuous question-and-answer interaction scenarios, the main agent distributes user questions to multiple sub-agents for execution. After each sub-agent returns its execution results, the main agent integrates them to form the final answer.
[0003] In existing systems, the execution results of sub-agents are typically appended directly to the dialogue message history or stored uniformly in a shared data container. In such schemes, historical results already used to generate responses remain in the storage area, making it difficult to distinguish between current and historical results in subsequent rounds. This leads to outdated information potentially being used again as the basis for responses, affecting the accuracy of subsequent answers. Some solutions mitigate this problem by cleaning up historical data, but it's difficult to balance the timeliness and completeness of information removal.
[0004] How to effectively isolate the execution results generated in each round of a multi-agent question-answering scenario with multiple rounds of long conversations after they have been used, while avoiding the accidental deletion of information required for the current task, is a technical problem that needs to be solved by those skilled in the art. Summary of the Invention
[0005] This application provides a collaborative question-answering method, apparatus, and server based on multi-agent systems. It addresses the problem in existing technologies where multi-agent systems lack an effective mechanism for distinguishing the consumption status of results from each round of continuous tasks, leading to residual used results interfering with subsequent tasks. Simple cleanup, however, fails to meet the requirement of retaining unused results. The technical solution is as follows: In a first aspect, embodiments of this application provide a collaborative question-answering method based on multiple agents, the method comprising: Receive user questions sent from user terminals; The main intelligent agent is invoked, and the main intelligent agent determines the target sub-intelligent agent to be invoked from among the multiple sub-intelligent agents based on the user's question; Invoke the target sub-agent to perform the business processing corresponding to the user's question; The business results generated after the target sub-agent is executed are written into the preset result field corresponding to the business result in the stateful result pool. The aggregation assistant is invoked to actively read non-empty preset result fields from the stateful result pool, obtain the read results, and generate a final response based on the read results. After the final response enters the returnable state, the consumed result field in the stateful result pool is overwritten and cleared. The consumed result field is the preset result field corresponding to the read result and used to generate the final response.
[0006] Secondly, embodiments of this application provide a multi-agent collaborative question-answering device, the device comprising: The receiving module is used to receive user questions sent by user terminals; The determination module is used to invoke the main intelligent agent, so that the main intelligent agent determines the target sub-intelligent agent to be invoked from multiple sub-intelligent agents based on the user question; The execution module is used to invoke the target sub-agent, so that the target sub-agent performs business processing corresponding to the user question; The writing module is used to write the business results generated after the target sub-intelligent agent executes the business results into the preset result field corresponding to the business results in the stateful result pool. The generation module is used to call the aggregation assistant, so that the aggregation assistant actively reads non-empty preset result fields from the stateful result pool, obtains the read results, and generates a final response based on the read results; The cleanup module is used to perform an overwrite and clear operation on the consumed result field in the stateful result pool after the final reply enters the returnable state. The consumed result field is the preset result field corresponding to the read result and used to generate the final reply.
[0007] Thirdly, embodiments of this application provide a computer storage medium storing a plurality of instructions adapted for loading by a processor and executing the above-described method steps.
[0008] Fourthly, embodiments of this application provide a server that may include a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to execute the above-described method steps.
[0009] The beneficial effects of the technical solutions provided in some embodiments of this application include at least the following: In this application, the stateful result pool is configured with multiple preset result fields according to business source or result form. Business results generated by different sub-agents are stored in slots during the writing phase, rather than being uniformly stacked in the dialogue message history. When generating the final response, the aggregation assistant only needs to read the preset result fields in the stateful result pool. Its reading scope is narrowed from panoramic all data to field-level targeted access, which helps to avoid information confusion caused by mixed data sources.
[0010] In this application, the clearing operation is triggered only after the final response enters a returnable state, and the cleared object is limited to the consumed result fields that have been read and used to generate the response. This mechanism enables the system to use the business event of response generation itself as the trigger for cleanup, achieving a self-consistent association between consumption status and cleanup action, and avoiding accidental or missed deletions caused by simple cleanup by round or time.
[0011] In this application, the clearing method sets the business results in the consumed result field to an empty set, rather than appending empty messages or simply setting a read flag. After the consumed result field is cleared, it no longer retains any business content that can be read subsequently. Even if all preset result fields are traversed again in subsequent rounds, this part of the content cannot be read. The technical risk of cross-round information confusion is eliminated from the data storage level.
[0012] In summary, this application establishes a complete lifecycle management chain from data writing to data invalidation by storing business results in isolation by field, triggering clearing after response generation, and making consumed results completely invalid through overwrite. This ensures that the processing of each round of tasks is completed in an independent and clean state space, guaranteeing the integrity of the information required by the current task and preventing historical information from interfering with the current task across round boundaries. Attached Figure Description
[0013] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0014] Figure 1 This is a schematic diagram of the system architecture provided in the embodiments of this application; Figure 2 This is a flowchart illustrating a collaborative question-answering method based on multiple agents provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of a multi-agent collaborative question-answering device provided in this application; Figure 4 This is a schematic diagram of a computer storage medium provided in this application; Figure 5 This is a schematic diagram of the structure of a server provided in this application. Detailed Implementation
[0015] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0016] Figure 1This is a schematic diagram of the system architecture provided for an embodiment of this application. (See attached diagram.) Figure 1 The system architecture includes at least one user terminal 1 and a server 2. User terminal 1 and server 2 establish a communication connection via a wired or wireless network. User terminal 1 and server 2 cooperate through this communication connection to execute the multi-agent collaborative question-answering method provided in this application embodiment.
[0017] User terminal 1 is the front-end device that initiates user questions. An application client or web client is installed on user terminal 1. The user sends their questions to server 2 through this client. User terminal 1 is also used to receive streaming events returned by server 2 via a long-lived connection and to display the final response carried in the streaming events to the user.
[0018] Server 2 is the execution entity of the collaborative question-answering method provided in this application embodiment. Server 2 is deployed with a main intelligent agent, multiple sub-intelligent agents, and a summarizing assistant. The main intelligent agent determines the target sub-intelligent agent to be invoked based on the user's question and performs a sufficiency judgment on the execution results of the sub-intelligent agents. Multiple sub-intelligent agents execute business processing corresponding to the user's question according to the scheduling of the main intelligent agent. The summarizing assistant actively reads non-empty preset result fields from the stateful result pool and generates a final answer based on the read results. Server 2 also maintains the stateful result pool. The stateful result pool contains multiple preset result fields, used to store business results generated by different sub-intelligent agents according to business source, result form, or task stage. After the summarizing assistant generates the final answer and the final answer enters a returnable state, the server 2 performs an overwrite and clear operation on the consumed result fields in the stateful result pool.
[0019] Figure 1 In the system architecture shown, user terminal 1 and server 2 communicate via a persistent connection. This persistent connection allows server 2 to push message streams from the main agent, progress events of sub-agents, state snapshots, custom business events, and end markers to user terminal 1 in real time. User terminal 1 can display the final response, as well as the execution progress and state changes of each sub-agent.
[0020] Those skilled in the art should understand that Figure 1 The number of user terminals 1 can be expanded according to actual business needs, and the server 2 can also be implemented by cluster deployment. This application embodiment does not limit this.
[0021] The following will be combined with the appendix Figure 2 This application provides a detailed description of the multi-agent collaborative question-answering method provided in its embodiments. The multi-agent collaborative question-answering device in these embodiments may be... Figure 1 The server shown.
[0022] Please see Figure 2 This document provides a flowchart illustrating a multi-agent collaborative question-answering method as described in an embodiment of this application. Figure 2 As shown, the method in this application embodiment may include the following steps: The method is executed by a server, which deploys a main intelligent agent, multiple sub-intelligent agents, and a summarizing assistant. The method includes: S1, Receive user questions sent by user terminals.
[0023] The server establishes a persistent connection with the user terminal through the session entry module. This persistent connection is used to receive various request information sent by the user terminal. The user questions received by the server include at least the natural language text input by the user and the user identifier. Depending on the specific business scenario, the server may also receive additional information such as session identifier, company code, attachment list, multimodal generation parameters, or document editing status.
[0024] Upon receiving a user question, the server first verifies the request's legitimacy based on the user's identifier and session identifier, confirming that the user has the authority to ask questions and that the current session is interactive. If the verification passes, the server further checks whether there are any currently executing historical task handles within the same session. If a historical task exists, the server proactively cancels it to prevent multiple long tasks from executing concurrently within the same session, which could lead to output corruption. Subsequently, the server stores the received user question in the current session's request cache as input data for subsequent processing.
[0025] In one example, in a financial information query scenario, a user enters the following natural language text through a mobile application: "Please help me find the operating revenue and net profit of a certain technology company for the past three years, and find out if the company has received any regulatory inquiry letters in the past year." The server receives the user's question, which includes the user's input text, the user identifier USER2026001, the session identifier SESSIONX0001, and the company code 000001. After verifying that the user has query permissions and finding that no tasks are currently being executed in the current session, the server stores the above information in the request cache and proceeds to the next step of processing.
[0026] S2. Invoke the main agent, so that the main agent can determine the target sub-agent to be invoked from multiple sub-agents based on the user's question.
[0027] The server invokes the main AI agent, passing the user's question and relevant context parameters to the agent's input interface. Once activated, the main AI agent identifies the task nature of the user's question, determining whether it belongs to a normal interaction type, a conversion request type, a task-oriented request type, an ambiguous question type, or a risky request type. If the determination is a task-oriented request, the main AI agent further extracts key business entities from the user's question, including the company name or code, time range, business type, and the user-specified output format.
[0028] After completing task identification and entity extraction, the main agent selects a set of candidate sub-agents relevant to the current task from multiple sub-agents supported by the server, based on preset business domain grouping rules. This selection process is performed according to the business domain involved in the user's question. If the user's question involves multiple business domains simultaneously, the main agent can list sub-agents from multiple domains as candidates. Based on this, the main agent, considering the user's available capabilities and the platform's basic capabilities, determines the target sub-agent actually needed for this task from the candidate set. This target sub-agent can be one or multiple.
[0029] Using the example above, the server calls the main agent, passing the user's question text "The operating revenue and net profit of a certain technology company for the past three years, and whether it has received any regulatory inquiry letters in the past year," along with the company code 000001 and the session identifier SESSIONX0001, to the main agent. The main agent determines that the question is a task-type request, extracting from it the following: the company name is a certain technology company, the time range is from the past three years to the past year, and the business type covers financial data and compliance information.
[0030] Subsequently, based on the business domain grouping rules, the main intelligent agent determines that financial data falls under the responsibility of a sub-expert in the company information group, and regulatory inquiry letters fall under the responsibility of a sub-expert in the compliance and supervision group. The main intelligent agent queries the user's available capability configuration and confirms that the user has the right to access the financial database and the regulatory information database. Based on this, the main intelligent agent identifies the financial sub-expert in the company information group and the inquiry letter sub-expert in the compliance and supervision group as the target sub-intelligent agents.
[0031] S3. Invoke the target sub-agent to execute the business processing corresponding to the user's question.
[0032] Based on the list of target sub-agents determined by the main agent, the server invokes each target sub-agent one by one. For each invoked target sub-agent, the server first injects the sub-agent execution context required to perform the current business process. This execution context includes the task description extracted from the user's question, the company code, the time range, and other constraints related to the current invocation. The server also records an initial state snapshot of the target sub-agent before executing the current business process. This initial state snapshot is used for subsequent differential write-back judgment.
[0033] After completing the above preparations, the server activates the target sub-agent, enabling it to independently execute business processes based on the received sub-agent execution context. The specific operations performed by different sub-agents vary, and may include retrieving structured databases, parsing unstructured documents, calling external application programming interfaces (APIs), performing semantic understanding, or generating summary text. During sub-agent execution, internal execution fields such as temporary files, tool call identifiers, and query counts are generated; these fields are only retained within the sub-agent's internal execution environment.
[0034] After the target sub-agent completes its execution, the server obtains the current state of the target sub-agent and compares it with the previously recorded initial state to identify the fields that have changed relative to the initial state. The server then filters out internal execution fields that are not allowed to be written back from these changed fields, and only uses the remaining changed fields as the result of this execution, preparing to write them into the stateful result pool.
[0035] Using the example above, the server invokes the financial sub-expert and injects it with the task description "Query the operating revenue and net profit of a certain technology company for the past three years," company code 000001, and time range from 2023 to 2025. The server records an initial state snapshot of the financial sub-expert and then activates it. The financial sub-expert accesses the financial database, executes a structured query, and obtains the company's operating revenue and net profit figures for 2023, 2024, and 2025, totaling six data records.
[0036] Simultaneously, the server invokes the inquiry letter sub-expert and injects it with the task description "Query whether a certain technology company has received a regulatory inquiry letter in the past year," company code 000001, and time range of the past year. The server records an initial state snapshot of the sub-expert and then activates it. The inquiry letter sub-expert accesses the regulatory information database, retrieves that the company received one exchange inquiry letter in the past year, and obtains the full text of that inquiry letter.
[0037] After the two sub-experts have finished executing, the server obtains the current state of each sub-expert, compares it with their initial state, filters out the changed fields, and removes fields that are not allowed to be written back, such as internal variables of the query statement and temporary file handles. The financial data records and the content of the inquiry letter are then output as business results.
[0038] S4. Write the business results generated after the target sub-agent executes into the preset result field corresponding to the business result in the stateful result pool.
[0039] The server acquires the business results generated after the target sub-agent executes the command, and determines the target result field corresponding to the business result from multiple preset result fields contained in the stateful result pool, based on the business source or result form of the business result. In one implementation, the stateful result pool includes a first business domain result field, a second business domain result field, a structured retrieval result field, a document parsing result field, an external information result field, a multimodal understanding result field, and a generative result field. Results from different business sources or in different forms are written into their respective corresponding fields to achieve field-level isolation.
[0040] Before writing, the server generates a data identifier for the current business result. This data identifier can consist of a data source prefix, a business primary key, or a content hash value. The server checks if the data identifier already exists in the data identifier set. If it exists, it means the same data has already been written, and the server abandons this write operation to avoid duplication. If it does not exist, the server converts the current business result into a unified result item before writing it to the target result field, and simultaneously stores the data identifier in the data identifier set. This unified result item includes at least the result content, source type, and metadata.
[0041] When the server writes the unified result item to the target result field, it also generates an auxiliary state bound to that target result field. This auxiliary state includes the data identifier of the current business result, the request snapshot of this call, and call chain metadata. The auxiliary state is bound to the corresponding result field, but it does not exist as an independent business function. Its purpose is to limit the deduplication range, provide a tracing path, and define the consumption boundary.
[0042] Following the example above, the server retrieves six financial data records output by the financial sub-expert, determines that the result belongs to the structured search result, and maps it to the structured search result field in the stateful result pool. The server generates a data identifier FIN2026001 for these six data records. Since this identifier is not found in the data identifier set, the server converts the financial data records into a unified result item and writes it to the structured search result field, while simultaneously storing the data identifier FIN2026001 in the data identifier set. The server also generates an auxiliary state bound to this field, which includes the data identifier FIN2026001, a snapshot of the current query request, and call chain metadata.
[0043] The server retrieves the full text of an inquiry letter output by an expert, determines that the result belongs to the document parsing result, and maps it to the document parsing result field in the stateful result pool. The server generates a data identifier REG2026001 for this inquiry letter. Finding no such identifier in the data identifier set, the server converts the inquiry letter content into a unified result item and writes it to the document parsing result field, while simultaneously storing the data identifier REG2026001 in the data identifier set. The server generates an auxiliary state bound to this field, which includes the data identifier REG2026001, the request snapshot for this retrieval, and call chain metadata.
[0044] At this point, the structured search result fields in the stateful result pool store financial data, and the document parsing result fields store the full text of the inquiry letter. The fields are isolated from each other and do not interfere with each other.
[0045] S5. Call the summary assistant to actively read non-empty preset result fields from the stateful result pool, obtain the read results, and generate the final response based on the read results.
[0046] After the main agent confirms that the business results written in the stateful result pool can answer the user's question, the server invokes the aggregation assistant. The aggregation assistant is an agent built based on a preset language model. This agent is configured to receive and understand the read business results and generate a final response in natural language based on the granularity required to answer the user's question. The server activates the aggregation assistant, enabling it to actively access the stateful result pool through a preset read interface. The aggregation assistant first obtains the current status list of each preset result field in the stateful result pool. This status list indicates whether each preset result field is currently empty. Based on this status list, the aggregation assistant filters out the preset result fields with non-empty statuses, forming a target field set.
[0047] The aggregation assistant then reads the corresponding business results from each preset result field in the target field set through a preset reading interface, resulting in a business result set. During the reading process, the aggregation assistant does not read the execution fields within the sub-agent, nor does it read preset result fields that are empty. After reading is complete, the aggregation assistant serializes the content of each result in the business result set into a unified format text. In one implementation, this unified format text is a JSON string. This serialization operation reduces the ambiguity in the model's understanding of unstructured text or programming language objects.
[0048] The aggregation assistant treats the serialized, uniformly formatted text as the read result and uses it as the basis for generating the final response. Based on this read result, the aggregation assistant generates the final response text for the user, according to the required granularity and output format of the user's question. If the structured fields in the read result are insufficient to fully answer the user's question, the aggregation assistant can also combine the supplementary natural language outputs from each sub-agent as auxiliary evidence. However, these supplementary natural language outputs must also include source identifiers and consumption status and cannot be used directly as sourceless free text.
[0049] Following the example above, the server calls the aggregation assistant. The aggregation assistant retrieves the current status list of each preset result field in the stateful result pool through a preset read interface, and finds that the structured search result field and the document parsing result field are not empty. The aggregation assistant adds these two fields to the target field set.
[0050] The aggregation assistant reads financial data records from structured search results fields and the full text of inquiry letters from document parsing results fields via a preset reading interface. It then merges these two results and serializes them into a JSON string containing a three-year list of operating revenue and net profit data, along with the complete text of the inquiry letter. The aggregation assistant treats this JSON string as a read result. Subsequently, based on this read result, the aggregation assistant generates a natural language response text: "A certain technology company's operating revenue for 2023 to 2025 was X billion yuan, Y billion yuan, and Z billion yuan, respectively, and its net profit was A billion yuan, B billion yuan, and C billion yuan, respectively. The company received one inquiry letter from an exchange within the past year, primarily concerning the compliance of related-party transaction disclosures." The aggregation assistant outputs this text as the final response.
[0051] S6. After the final response enters the returnable state, perform an overwrite and clear operation on the consumed result fields in the stateful result pool. The consumed result fields are the preset result fields corresponding to the read results and used to generate the final response.
[0052] After the aggregation assistant generates the final response and the final response has entered a returnable state, the server triggers a result pool clearing operation. In one implementation, the final response entering a returnable state means that the aggregation assistant has completed the generation of the response text and passed the response text to the server's output buffer, ready to send it to the user terminal via a persistent connection.
[0053] The server first determines the consumed result fields based on the preset result fields actually read and used by the aggregation assistant during the final response generation process. These consumed result fields are the preset result fields read by the aggregation assistant and whose content is used to generate the final response. For each consumed result field, the server performs an overwrite and clear operation, explicitly setting the business results stored in that field to an empty set, and simultaneously invalidating the auxiliary status bound to that field along with the business results. This auxiliary status includes the data identifier, request snapshot, and call chain metadata.
[0054] If a predefined result field has been read by the aggregation assistant, but the final response has not yet been successfully generated, or the task has been interrupted by the user, the business result in that field is not considered a consumed result field. The server does not perform an overwrite / clear operation on it, but instead retains it or rolls it back to a safe state based on the checkpoint status. After the overwrite / clear operation is completed, the original content of the consumed fields in the stateful result pool is completely cleared, and new tasks in the next round of dialogue will not read the old results used in this round.
[0055] Following the example above, the summary assistant has passed the final response text to the server's output buffer, and the final response has entered a returnable state. The server then determines that the consumed result fields used in this final response are the structured search result fields and the document parsing result fields.
[0056] The server performs an overwrite and clear operation on the structured search result field, setting all six financial data records in this field to an empty set. Simultaneously, it invalidates the document identifier FIN2026001, request snapshot, and call chain metadata associated with this field. The server also performs an overwrite and clear operation on the document parsing result field, setting the full text of the query letter in this field to an empty set. This also invalidates the document identifier REG2026001, request snapshot, and call chain metadata associated with this field. At this point, all business results written in this task have been cleared from the stateful result pool. If a user subsequently raises a new question in the same session, the processing of that new question will not be affected by the financial data and query letter content from this round.
[0057] In one possible implementation, after identifying the target sub-agent, the server first prepares the sub-agent execution context required for this execution. This execution context includes a task description extracted from the user's question, a company code, a time range, and the required granularity of the response specified by the main agent. The server encapsulates this information and injects it into the target sub-agent's input interface, enabling the target sub-agent to perform subsequent operations under clearly defined boundary conditions.
[0058] Before activating the target sub-agent to execute actual business processing, the server records a complete snapshot of the target sub-agent's current state as its initial state. This initial state snapshot includes the sub-agent's loaded configuration parameters, cached business data, and the current values of its internal variables.
[0059] After the server completes the initial state recording, it sends execution instructions to the target sub-agent. The target sub-agent, based on the received execution context, performs business processing on the task description corresponding to the user's question. The specific operation types performed by different sub-agents vary, including structured database queries, unstructured document parsing, external application programming interface (API) calls, or natural language content generation. During business processing, the target sub-agent generates some temporary data, including intermediate query results, tool call identifiers, API return status codes, and the number of query results. This temporary data exists only in the sub-agent's working memory as internal execution fields.
[0060] Once the target sub-agent has completed all business processing operations, the server obtains a snapshot of the target sub-agent's current state. This snapshot records all state information after the sub-agent has finished execution, including business results that have been processed and are awaiting output, as well as various internal records generated during the execution process.
[0061] The server compares the current state snapshot with the initial state snapshot recorded before execution, field by field. The comparison includes all state fields maintained by the sub-agent, specifically covering generated business result fields, updated cache fields, and internal variables that changed during execution. Through this comparison, the server identifies all fields that have actually changed relative to the initial state.
[0062] After identifying the changed fields, the server filters them according to a pre-defined field permission matrix. This matrix pre-defines the writing and consuming scopes for each field type, as well as whether write-back from the sub-agent to the main state is allowed. Based on this matrix, the server filters out fields that are not allowed to be written back. These disallowed fields include temporary file handles within the sub-agent, unique identifiers for tool calls, the number of times a query statement has been executed, and the original status codes returned by external interfaces. The server then determines the remaining fields as allowed to be written back; these fields represent the actual business results generated by the sub-agent's execution.
[0063] The server will write the fields that are allowed to be written back as business results into the corresponding preset result fields in the stateful result pool. During the writing process, business results from different business sources or with different result formats are written into their respective preset result fields, and the written fields remain isolated from other fields.
[0064] Through the above implementation method, the server achieves the separation of the execution results of sub-agents from their internal operating states. Only business results that can be consumed by the main link are written back to the stateful result pool, while temporary data and operational details within the sub-agents are retained in the sub-agents' internal execution environment. This approach effectively avoids data conflicts caused by repeated writing of complete state snapshots when multiple sub-agents execute in parallel or continuously, while also reducing the pollution of the main link state by irrelevant large field data.
[0065] In one possible implementation, before the server invokes the main agent, the server performs the following preprocessing operations to provide definite input conditions for the subsequent scheduling process.
[0066] The server first performs entry standardization processing on the user's question. This process includes two sub-stages: intent recognition and question rewriting. In the intent recognition sub-stage, the server categorizes the user's input natural language text into one of the preset abstract task types, including question-and-answer, generation, transformation, and attachment comprehension. In the question rewriting sub-stage, the server converts the original user input text into a structured, standardized question statement. This standardized question statement removes redundant expressions and ambiguous references from the original text, retaining the core business elements and query conditions. After the above processing, the server generates a standardized task intent, which includes a task type label and standardized question text.
[0067] Based on the user identifier carried in the user's question, the server reads the available capability configuration corresponding to that user from the server's local cache or user information database. This available capability configuration records the list of authorized business modules, the range of accessible data sources, and the list of agent capabilities that the user is allowed to invoke. Based on this configuration, the server selects the sub-agents that the user is authorized to use from all sub-agents supported by the server, forming a set of available sub-agents. This set of available sub-agents limits the range of sub-agents that the main agent can select in this round of processing; sub-agents not in this set will not be considered by the main agent as candidates.
[0068] The server preloads the runtime context required by the main agent to perform inference. This runtime context includes at least one of company profile, user preferences, and attachment summary. The company profile includes basic company information, industry category, and key market concerns. User preferences include the user's areas of interest, preferred answering style, and commonly used output formats as shown in past queries. The attachment summary includes the title, document type, and content summary of the attachments uploaded by the user in this query; this summary is the result of the server pre-parsing and summarizing the attachments. After loading the above runtime context into its working memory, the server instantiates it through middleware into a reasoning context that is perceptible to the main agent, enabling the main agent to use this state data when performing task identification and entity parsing.
[0069] The server caches the standardized task intent and the set of available sub-agents in the main agent's invocation context. This invocation context is a parameter storage area reserved by the server for the main agent, and its contents are automatically loaded into the main agent's input interface when the main agent is activated. Through this caching operation, when the server calls the main agent in subsequent steps, the main agent does not need to retrieve the standardized task intent and the set of available sub-agents again, but can directly read the above information from the invocation context as the basis for decision-making.
[0070] Through the above preprocessing operations, the server determines the true intent of the user's question and the boundaries of the available sub-agents in this round before entering the multi-agent collaborative link. This avoids irrelevant sub-agents being mistakenly included in the scheduling link, while ensuring that the main agent has clear and stable input conditions when performing task identification and sub-expert selection.
[0071] In one possible implementation, the process of the server calling the main agent and making it determine the target sub-agent in step S2 above can be implemented in the following specific way.
[0072] After completing the entry point standardization process and runtime context preloading, the server passes the standardized task intent, the set of available sub-agents, and the runtime context of the main agent as input parameters to the main agent's calling interface. Once activated, the main agent retrieves these three pieces of data from its calling context.
[0073] The main intelligent agent determines the target business capabilities required to complete the user's question based on the standardized task intent. This determination process involves: the main intelligent agent parsing the task type label and standardized question text from the standardized task intent; then, according to a pre-defined task capability mapping table, converting the task type label into at least one business capability required to complete that type of task. This task capability mapping table predefines the correspondence between various abstract task types and business capabilities. For example, a financial data query task corresponds to structured data retrieval capabilities, a compliance information query task corresponds to document retrieval and parsing capabilities, and a comprehensive comparative analysis task corresponds to multiple data retrieval and content generation capabilities. The main intelligent agent uses all the mapped business capabilities as the target business capabilities.
[0074] The main agent determines the constraints for executing user queries based on the runtime context. This runtime context includes at least one of company profile, user preferences, and attachment summaries. The main agent extracts the industry category and market focus of the target company involved in the current query from the company profile and uses this information as a business scope constraint. The main agent extracts the areas of interest and commonly used output formats shown in the user's historical queries from the user preferences and uses this information as an answer granularity constraint and output format constraint. The main agent extracts the business topics involved in the attachments uploaded by the user in this query from the attachment summaries and uses these topics as a supplementary query constraint. The main agent summarizes all the above constraints to form the set of constraints selected by the sub-agents in this query.
[0075] The main agent selects matching sub-agents from the available sub-agent set based on the target business capabilities and constraints, designating them as target sub-agents. This selection process involves: the main agent iterating through each sub-agent in the available set and reading its pre-registered capability tag list. For each sub-agent, the main agent determines whether its capability tag list contains at least one of the target business capabilities and whether its applicable scope satisfies all constraints in the constraint set. If a sub-agent's capability tags cover the target business capabilities and its applicable scope does not violate any constraint, the main agent marks the sub-agent as a match. If multiple sub-agents match, the main agent sorts these sub-agents according to their capability matching degree from highest to lowest, selecting one or more sub-agents with the highest matching degree as the target sub-agents for this task.
[0076] In one possible implementation, before the server calls the aggregation assistant, the main agent first performs a result sufficiency judgment operation, and decides whether to directly trigger the aggregation assistant or supplement by calling more sub-agents based on the judgment result.
[0077] The server invokes the main agent, which reads the business results already written to the stateful result pool. The main agent iterates through the preset result fields in the stateful result pool using a pre-defined read interface, retrieving the business results stored in all non-empty fields at the current moment. After summarizing all the read business results, the main agent determines whether these results are sufficient to answer the user's question.
[0078] The criteria for determining the sufficiency of results include the following dimensions: whether the business topics covered by the read business results fully cover all business domains involved in the user's question; whether the number of data entries in the read business results meets the explicit or implicit quantity requirements in the user's question; and whether there are any obvious conflicts or contradictions among the read business results. The main agent comprehensively evaluates all read business results based on the above dimensions. If the evaluation results indicate that the read business results meet the requirements in all the above dimensions, the main agent determines that the business results in the current stateful result pool have reached the sufficiency state. If the evaluation results indicate that at least one dimension does not meet the requirements, it is determined that the sufficiency state has not been reached.
[0079] If the main agent determines that sufficient results have been achieved, it triggers the aggregation assistant to perform subsequent reading and generation operations. The server does not call any additional sub-agents and directly proceeds to step S5, which calls the aggregation assistant.
[0080] If the main agent determines that the result is insufficient, the server performs a supplementary invocation operation. The server selects other sub-agents from among multiple sub-agents, excluding the target sub-agent already invoked in this task, as candidate sub-agents for supplementary invocation. The selection criteria for these candidate sub-agents are the same as the logic used by the main agent in step S2 to determine the target sub-agent; that is, based on the currently missing business capabilities and existing constraints, matching sub-agents are selected from the set of available sub-agents. The server invokes the selected supplementary sub-agent to perform supplementary business processing and writes the supplementary results into the corresponding preset result field in the stateful result pool in the same manner as in step S4.
[0081] After the supplementary results are written, the server calls the main agent again, causing the main agent to reread the business results already written in the stateful result pool, including the original business results and the newly written supplementary results, and re-executes the above-mentioned result sufficiency status judgment operation. If the result sufficiency status is still not reached after the re-judgment, the server repeats the above-mentioned supplementary call and re-judgment process until the result sufficiency status is reached or the preset maximum number of supplementary calls is reached, at which point it terminates and returns a prompt message.
[0082] In one possible implementation, the process of the server calling the aggregation assistant and making it actively read the stateful result pool in step S5 above can be implemented in the following specific way.
[0083] After the main agent determines that the business results in the stateful result pool have reached a sufficient state, the server sends a call command to the aggregation assistant. Upon receiving the call command, the aggregation assistant accesses the stateful result pool through a preset read interface. This preset read interface is a dedicated data channel between the aggregation assistant and the stateful result pool, independent of the write channel used by the sub-agents when writing results.
[0084] The aggregation assistant first retrieves the current status list of each preset result field in the stateful result pool through this preset read interface. This current status list records the names of all preset result fields contained in the stateful result pool and the current status value of each preset result field. This status value indicates whether the corresponding preset result field currently contains a non-empty business result. In one implementation, the status value of each preset result field is represented by a Boolean type; a true value indicates that the field is currently not empty, and a false value indicates that the field is currently empty.
[0085] After obtaining the current status list, the summary assistant iterates through and filters the list. It checks the status value of each preset result field in the current status list, filters out preset result fields with a true status value, and records these filtered fields as a target field set. This target field set only contains preset result fields that currently store non-empty business results; it does not contain any empty fields or fields that have been cleared.
[0086] After determining the target field set, the aggregation assistant reads the currently stored business results from each preset result field in the target field set through the preset read interface. The aggregation assistant then aggregates all the read business results into a single business result set. During the reading process, the aggregation assistant only reads the business result content in the preset result fields; it does not read the internal execution fields of the sub-agent, nor does it read preset result fields that are empty.
[0087] After summarizing the business results set, the aggregation assistant serializes the set into a unified text format. In one implementation, the aggregation assistant reorganizes the business results in the set according to preset serialization rules, ensuring that field names and values appear in pairs, and converts them into a unified text format JSON string. Through this serialization operation, business results that might have contained different data structures, field naming conventions, and data types are converted into a unified text format.
[0088] The summary assistant takes the serialized, uniformly formatted text as the read result and saves it in the summary assistant's working memory as input data for generating the final response.
[0089] Through the above implementation method, the aggregation assistant achieves proactive discovery and targeted reading of non-empty result fields in the stateful result pool. Since the aggregation assistant only reads non-empty fields and serializes the reading results into a unified format, it can obtain clearly structured and sourced evidence input when generating the final response, avoiding omissions or confusion caused by the model passively searching for evidence in the complete dialogue history.
[0090] In one possible implementation, the process of the server performing an overwrite and clear operation on the consumed result field in the stateful result pool in step S6 above can be implemented in the following specific way.
[0091] After the summary assistant generates the final response and the final response has entered the returnable state, the server triggers an overwrite and clear operation. The final response entering the returnable state means that the summary assistant has completed the generation of the final response text and passed the final response text to the server's output buffer, ready to be sent to the user terminal via a persistent connection.
[0092] The server first identifies the preset result fields that the aggregation assistant has used to generate the final response. During the final response generation process, the aggregation assistant records the names of the preset result fields corresponding to the business results it actually reads and uses, and sends this record back to the server. Upon receiving this record, the server identifies all the preset result fields recorded in that record as consumed result fields.
[0093] After the server determines the consumed result fields, it performs an overwrite and clear operation for each consumed result field. The server directly sets the currently stored business results in the consumed result field to an empty set. This clearing operation is an explicit overwrite of the field content, rather than appending an empty message or merely modifying the field's flag status. After this clearing operation, the consumed result fields no longer store any business result data.
[0094] When the server clears the business result, it also simultaneously invalidates the auxiliary status bound to the consumed result field. This auxiliary status is generated and bound to the preset result field when the business result is written. Specifically, the auxiliary status includes at least one of the following: data identifier, request snapshot, and call chain metadata. The data identifier uniquely identifies the original data corresponding to the business result written to this field; the request snapshot records the parameter information of the call request corresponding to this write; and the call chain metadata records the source tool name and external interface call information of the business result. The server invalidates the auxiliary status synchronously with the business result by removing the data identifier from the data identifier set and releasing or marking the request snapshot and call chain metadata as invalid from the working memory. After this synchronization invalidation operation, the deduplication information, tracing information, and degradation information originally bound to the consumed result field no longer have any effect on that field.
[0095] If a predefined result field was read during the summary assistant's reading phase, but the summary assistant ultimately failed to generate a response or the task was interrupted by the user, then that predefined result field will not be determined by the server as a consumed result field. For these fields, the server will not perform operations such as setting the business result to null or invalidating the auxiliary state, but will instead retain or roll back to a safe execution state based on the checkpoint state.
[0096] Through the above implementation, the server achieves immediate invalidation of consumed results in long sessions. Because the server performs an overwrite and clear operation on the consumed result field instead of simply marking it or appending empty messages, the consumed business results are completely removed from the stateful result pool. New tasks in the next round of the conversation cannot read the old results used in this round. The synchronous invalidation of auxiliary states and business results ensures that deduplication identifiers and call chain information do not remain independently in the system, thus preventing the deduplication logic from mistakenly identifying new data as existing data and filtering it out in the next round of tasks.
[0097] In one possible implementation, the process of writing the business results generated after the target sub-agent is executed into the stateful result pool in step S4 above can be implemented in the following specific way.
[0098] The server first obtains the business results generated by the target sub-agent after its execution from the sub-agent's output interface. These business results are the fields that are allowed to be written back, determined after differential write-back filtering. The data format includes structured data records, unstructured full-text documents, semi-structured tables, or text generated from natural language.
[0099] After obtaining a business result, the server determines the target result field corresponding to that business result from multiple preset result fields in a stateful result pool, based on the business source, result form, or task stage of the result. The stateful result pool contains multiple preset result fields, each corresponding to a different business source type or result form type. The server identifies the business source of the current business result, which is the business domain to which the target sub-agent that generated the result belongs. The server also identifies the result form of the business result, including database retrieval result form, document parsing result form, web page content crawling result form, and multimodal understanding result form. The server also identifies the task stage corresponding to the business result, including the initial retrieval stage and the supplementary query stage. Based on at least one of the above identification results, the server selects one field from the multiple preset result fields that matches the business result as the target result field.
[0100] After determining the target result field, the server generates a data identifier for that business result. This data identifier is generated by combining a source prefix and a business primary key, or by combining a source prefix and a content hash value. The source prefix identifies the source of the business result, the business primary key uniquely indexes the data within the source system, and the content hash value uniquely identifies the content of the data itself. After generating the data identifier, the server checks if the data identifier already exists in the data identifier set. The data identifier set is an independent dataset maintained by the server, recording the data identifiers corresponding to all business results written to the stateful result pool in this round of tasks.
[0101] If the query results indicate that the data identifier already exists in the data identifier set, it means that business results with the same source and content have already been written to the stateful result pool. In this case, the server abandons the write operation and does not write the business result to the target result field to avoid duplicate data crowding out the storage space of the stateful result pool and the reading scope of subsequent summary assistants.
[0102] If the query result indicates that the data identifier does not exist in the data identifier set, it means that the business result is new data. The server converts the business result into a unified result item, which includes result content, source type, and metadata. The result content is the core data part of the business result, the source type is used to identify the source of the business result, and the metadata is used to record the timestamp and version information of the business result. The server writes the converted unified result item into the target result field, and at the same time stores the data identifier of the business result into the data identifier set for subsequent write operations to query and compare.
[0103] While writing the unified result item to the target result field, the server generates an auxiliary state bound to that target result field. This auxiliary state includes at least one of the following: data identifier, request snapshot, and call chain metadata. The request snapshot records all key parameters of the user request corresponding to this write operation, and the call chain metadata records the complete call chain from the main agent's scheduling to the sub-agent's execution and finally to the result return. The server binds and stores the generated auxiliary state with the target result field.
[0104] Through the above implementation, the server achieves automatic deduplication at the data level during the process of writing business results into the stateful result pool. The same data is written only once in the same task, avoiding duplicate data occupying storage space and interfering with subsequent answer generation. The binding of auxiliary state and result fields ensures that each business result has complete source traceability capabilities, while also providing a basis for clearing synchronization failures after consumption.
[0105] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.
[0106] Please see Figure 3 This illustration shows a schematic diagram of a multi-agent collaborative question-answering device provided in an exemplary embodiment of this application, hereinafter referred to as device 3. Device 3 can be implemented as all or part of a server through software, hardware, or a combination of both. Device 3 includes: The receiving module 301 is used to receive user questions sent by the user terminal; The determination module 302 is used to invoke the main intelligent agent, so that the main intelligent agent determines the target sub-intelligent agent to be invoked from multiple sub-intelligent agents according to the user question; Execution module 303 is used to invoke the target sub-intelligent agent, so that the target sub-intelligent agent performs business processing corresponding to the user question; The writing module 304 is used to write the business result generated after the target sub-intelligent agent executes the business result into the preset result field corresponding to the business result in the stateful result pool. The generation module 305 is used to call the summary assistant, so that the summary assistant actively reads non-empty preset result fields from the stateful result pool, obtains the read results, and generates a final response based on the read results; The cleanup module 306 is used to perform an overwrite and clear operation on the consumed result field in the stateful result pool after the final reply enters the returnable state. The consumed result field is the preset result field corresponding to the read result and used to generate the final reply.
[0107] For other details regarding the implementation of the above technical solution by each module in the above-mentioned multi-agent collaborative question answering device, please refer to the description in the multi-agent collaborative question answering method provided in the above-mentioned embodiments of the invention, which will not be repeated here.
[0108] It should be noted that the device 3 provided in the above embodiments, when executing the multi-agent collaborative question-answering method, is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the above functions. In addition, the multi-agent collaborative question-answering device and the multi-agent collaborative question-answering method embodiments provided in the above embodiments belong to the same concept, and the implementation process is detailed in the method embodiments, which will not be repeated here.
[0109] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0110] See Figure 4 The diagram shown is a schematic of a computer storage medium provided in an embodiment of this application. The computer storage medium 4 can store multiple instructions (i.e., Figure 4 The computer program shown above), the instructions are adapted to be loaded and executed by a processor as described above. Figure 2 The method steps of the illustrated embodiment can be found in the following documentation for detailed execution. Figure 2 The specific details of the illustrated embodiments will not be elaborated here.
[0111] This application also provides a computer program product that stores at least one instruction, which is loaded and executed by a processor to implement the multi-agent collaborative question-answering method as described in the above embodiments.
[0112] Please see Figure 5 This provides a schematic diagram of a server structure for an embodiment of this application. For example... Figure 5 As shown, the server 500 may include: at least one processor 501, at least one network interface 504, a user interface 503, a memory 505, and at least one communication bus 502.
[0113] The communication bus 502 is used to enable communication between these components.
[0114] The user interface 503 may include input units such as a mouse and keyboard.
[0115] The network interface 504 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).
[0116] The processor 501 may include one or more processing cores. The processor 501 connects to various parts of the server 500 using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 505, and by calling data stored in the memory 505. Optionally, the processor 501 may be implemented using at least one of the following hardware forms: Digital Signal Processor (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 501 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content to be displayed on the screen; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 501 and may be implemented as a separate chip.
[0117] The memory 505 may include random access memory (RAM) or read-only memory. Optionally, the memory 505 may include a non-transitory computer-readable storage medium. The memory 505 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 505 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 505 may also be at least one storage device located remotely from the aforementioned processor 501. Figure 5 As shown, the memory 505, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and application programs.
[0118] exist Figure 5In the server 500 shown, the user interface 503 is mainly used to provide an input interface for users and obtain user input data; while the processor 501 can be used to call the application program stored in the memory 505 and specifically execute, such as Figure 2 The method shown can be referred to for details. Figure 2 As shown, it will not be elaborated further here.
[0119] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory, or random access memory, etc.
[0120] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.
Claims
1. A collaborative question-answering method based on multi-agent systems, characterized in that, The method is executed by a server, which deploys a main intelligent agent, multiple sub-intelligent agents, and a summarizing assistant. The method includes: Receive user questions sent from user terminals; The main intelligent agent is invoked, and the main intelligent agent determines the target sub-intelligent agent to be invoked from among the multiple sub-intelligent agents based on the user's question; Invoke the target sub-agent to perform the business processing corresponding to the user's question; The business results generated after the target sub-agent is executed are written into the preset result field corresponding to the business result in the stateful result pool. The aggregation assistant is invoked to actively read non-empty preset result fields from the stateful result pool, obtain the read results, and generate a final response based on the read results. After the final response enters the returnable state, the consumed result field in the stateful result pool is overwritten and cleared. The consumed result field is the preset result field corresponding to the read result and used to generate the final response.
2. The method according to claim 1, characterized in that, The step of invoking the target sub-agent to execute the business processing corresponding to the user's question includes: Inject the target sub-agent with the sub-agent execution context required to perform the business process; Record the initial state of the target sub-agent before it executes the business process; The target sub-agent is invoked to perform business processing on the task description corresponding to the user question according to the execution context of the sub-agent, and the business result is obtained. After the target sub-agent has finished executing, obtain the current state of the target sub-agent; Compare the current state with the initial state to determine the fields that have changed relative to the initial state and are allowed to be written back; The determined fields are written into the stateful result pool as the business result.
3. The method according to claim 1, characterized in that, Before invoking the main agent, the following is also included: The user's question is processed using standardized entry point processing to generate a standardized task intent; Based on the user identifier carried in the user question, load the available capability configuration corresponding to the user identifier, and determine the set of available sub-agents among the multiple sub-agents based on the available capability configuration; The runtime context of the main agent is preloaded and injected into the inference context of the main agent. The runtime context of the main agent includes at least one of company profile, user preferences and attachment summary. The standardized task intent and the set of available sub-agents are cached in the calling context of the main agent.
4. The method according to claim 3, characterized in that, The invocation of the main intelligent agent, which causes the main intelligent agent to determine the target sub-intelligent agent to be invoked from the plurality of sub-intelligent agents based on the user question, includes: Obtain the standardized task intent, the set of available sub-agents, and the runtime context of the main agent; Based on the standardized task intent, determine the target business capabilities required to complete the user problem; Based on the runtime context of the main intelligent agent, determine the constraints when executing the user question; Based on the target business capability and the constraints, a matching sub-agent is selected from the set of available sub-agents and used as the target sub-agent.
5. The method according to claim 1, characterized in that, Before invoking the aggregation assistant, the method further includes: The main intelligent agent is invoked to read the business results already written in the stateful result pool, and it is determined whether all the read business results have reached the state of sufficient results required to answer the user's question; If the required results are met, the aggregation assistant is triggered to perform the operation of calling the aggregation assistant; If the result sufficiency state is not achieved, other sub-intelligent agents among the multiple sub-intelligent agents, excluding the target sub-intelligent agent, are called in addition. The supplementary results generated by the supplementary execution are written into the stateful result pool, and the step of judging whether all read business results have reached the result sufficiency state is executed again.
6. The method according to claim 1, characterized in that, The step of invoking the aggregation assistant, causing the aggregation assistant to actively read non-empty preset result fields from the stateful result pool to obtain the read results, includes: The aggregation assistant is invoked to obtain the current status list of each preset result field in the stateful result pool through a preset reading interface; The summary assistant is invoked to filter out preset result fields whose status is not empty based on the current status list, and these fields are used as the target field set. The summary assistant is invoked to read the corresponding business results from each preset result field in the target field set through the preset reading interface, thereby obtaining a business result set; The aggregation assistant is invoked to serialize the business result set into a unified format text, and the unified format text is used as the read result.
7. The method according to claim 1, characterized in that, After the final response enters a returnable state, the step of performing an overwrite and clear operation on the consumed result field in the stateful result pool includes: Obtain the preset result field that has been used by the aggregation assistant to generate the final response, and use it as the consumed result field; Set the business results in the consumed results field to an empty set; The auxiliary status bound to the consumed result field is synchronously deactivated with the consumed result field. The auxiliary status is status information generated and bound to the preset result field when the business result is written to the preset result field, including at least one of data identifier, request snapshot and call link metadata.
8. The method according to claim 1, characterized in that, The step of writing the business result generated after the target sub-agent executes the process into a preset result field corresponding to the business result in the stateful result pool includes: Obtain the business results; Based on the business source, result form, or task stage of the business result, determine the target result field corresponding to the business result from multiple preset result fields in the stateful result pool; Generate a data identifier for the business result, and query whether the data identifier already exists in the data identifier set; If the data identifier already exists in the data identifier set, then the business result will not be written into the target result field. If the data identifier does not exist in the data identifier set, the business result is converted into a unified result item, the unified result item is written into the target result field, and the data identifier is stored in the data identifier set. When the unified result item is written to the target result field, an auxiliary state bound to the target result field is generated. The auxiliary state includes at least one of data identifier, request snapshot and call chain metadata.
9. A multi-agent collaborative question-answering device, characterized in that, include: The receiving module is used to receive user questions sent by user terminals; The determination module is used to invoke the main intelligent agent, so that the main intelligent agent determines the target sub-intelligent agent to be invoked from multiple sub-intelligent agents based on the user question; The execution module is used to invoke the target sub-agent, so that the target sub-agent performs business processing corresponding to the user question; The writing module is used to write the business results generated after the target sub-intelligent agent executes the business results into the preset result field corresponding to the business results in the stateful result pool. The generation module is used to call the aggregation assistant, so that the aggregation assistant actively reads non-empty preset result fields from the stateful result pool, obtains the read results, and generates a final response based on the read results; The cleanup module is used to perform an overwrite and clear operation on the consumed result field in the stateful result pool after the final reply enters the returnable state. The consumed result field is the preset result field corresponding to the read result and used to generate the final reply.
10. A server, characterized in that, include: A processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to execute the steps of the multi-agent collaborative question-answering method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Locomotive steam-engine for rail and other roads
US1A
