An automatic question answering method and system based on deep representation mapping and cross-agent interaction

By employing deep representation mapping and cross-agent interaction-based automatic question answering methods, this approach addresses the challenges of individual agents struggling to answer complex questions and the low efficiency of multi-agent interactions, enabling efficient collaborative reasoning and accurate response generation among multiple agents.

CN123140199APending Publication Date: 2026-11-20PEKING UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510650673.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-20
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Individual agents struggle to solve complex problems, and multi-agent interactions are complex and time-consuming. Existing methods involve lengthy and inefficient communication and collaboration processes between models.

Method used

An automatic question-answering method based on deep representation mapping and cross-agent interaction is adopted. Through knowledge extraction, user needs analysis, knowledge relevance analysis and final response generation, the final response is directly generated by the collaboration and competition between the core agent and the auxiliary agent, reducing serial steps and improving reasoning efficiency.

Benefits of technology

It enables efficient collaborative reasoning among multiple agents, reduces sequential steps, improves reasoning efficiency on complex tasks, and generates more accurate responses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123140199A_ABST
    Figure CN123140199A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of information technology and artificial intelligence, and relates to an automatic question answering method and system based on deep representation mapping and cross-agent interaction. The method comprises the following steps: a knowledge extractor receives a question input by a user, extracts relevant candidate knowledge in a knowledge base, and forms a knowledge set; a core agent and an auxiliary agent receive the question input by the user, and perform user demand analysis; the core agent performs correlation analysis on each piece of knowledge in the knowledge set, the auxiliary agent evaluates the correlation analysis performed by the core agent, and determines whether the core agent revises the content of the correlation analysis; the knowledge set obtained by the knowledge extractor is filtered according to the correlation analysis revised by the core agent; and the core agent generates a final reply. The application realizes efficient multi-agent collaborative reasoning based on representation mapping, can reduce the serial steps in the multi-agent reasoning process, and improves the reasoning efficiency on complex tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of information technology and artificial intelligence technology, and specifically relates to an automatic question answering method and system based on deep representation mapping and cross-agent interaction. Background Technology

[0002] Individual intelligent agents are limited by the capabilities of the model itself, making it difficult to answer various complex problems from general domains and to be applicable to complex scenarios.

[0003] Current solutions often employ multiple models (multiple agents). For example, "Chain-of-Discussion: A Multi-Model Framework for Complex Evidence-Based Question Answering" introduces multiple models to perform analysis, discussion, critique, and correction steps, thereby improving the model's reasoning ability. Analysis involves a single agent analyzing user needs; discussion involves integrating the analyses of multiple agents and summarizing them to form a unified conclusion; critique involves one agent analyzing which knowledge needs to be queried, followed by evaluation by other agents, ultimately reaching a unified conclusion (correct or incorrect analysis) through voting; and correction involves one agent attempting to regenerate a more accurate knowledge relevance analysis based on the evaluations of other agents. However, this method involves sequential interaction between models, resulting in a lengthy process and complex, time-consuming multi-agent communication and collaboration. Summary of the Invention

[0004] This invention proposes an automatic question-answering method and system based on deep representation mapping and cross-agent interaction, which realizes multi-agent collaboration for complex tasks in general domains based on representation mappers, in order to solve the problems that existing single agents are difficult to apply to complex scenarios, and the complex and time-consuming communication and collaboration process of multi-agents.

[0005] The technical solution adopted in this invention is as follows:

[0006] An automatic question-answering method based on deep representation mapping and cross-agent interaction includes the following steps:

[0007] The knowledge extractor receives questions input by users, extracts relevant candidate knowledge from the knowledge base, and forms a knowledge set.

[0008] The core intelligent agent and the auxiliary intelligent agent receive user input questions and perform user needs analysis;

[0009] The core agent analyzes the user's input questions and needs, performs a relevance analysis on each piece of knowledge in the knowledge set, assists the core agent in evaluating the relevance analysis, and decides whether the core agent should revise the content of the relevance analysis.

[0010] Based on the relevance analysis after the core intelligent agent is revised, the knowledge set obtained by the knowledge extractor is filtered to obtain the filtered knowledge set.

[0011] The core intelligent agent takes the user's input question, user needs analysis, filtered knowledge set, and relevance analysis of each piece of knowledge in the knowledge set as input to generate the final response.

[0012] Furthermore, the knowledge extracted by the knowledge extractor includes three categories:

[0013] Necessary knowledge refers to knowledge that is highly relevant to the input problem and that the agent must use to solve it;

[0014] Optional knowledge refers to knowledge that has a certain potential connection with the input problem and can be used for expansion.

[0015] Irrelevant knowledge, that is, knowledge that is not related to the input question and should not be used.

[0016] Furthermore, the user needs analysis includes:

[0017] For any auxiliary agent, before it calculates the probability of the next token, it extracts the representation vector obtained by encoding the current context; the representation vector contains the auxiliary agent's encoding of all the information in the current context, as well as the auxiliary agent's prediction of the subsequently generated content.

[0018] The representation vectors are transformed into the representation space of the core agent using the respective representation mappers of the auxiliary agents;

[0019] The classifier of the core agent itself is used to convert each transformed representation vector and the core agent's own representation vector into multiple sets of log probabilities. Each set of log probabilities corresponds to a probability distribution on the core agent's vocabulary. These probabilities are combined to obtain a distribution. The next token of the core agent is predicted based on the combined distribution.

[0020] The auxiliary agents convert the tokens selected by the core agents into the corresponding tokens in their own vocabulary using their respective word segmenters.

[0021] Furthermore, the representation mapper is constructed using the following steps:

[0022] We collect open-source and closed-source corpora, using articles as units. Each article is divided into segments of a fixed character length L. A document D with a total character length of n is divided into ceil(n / L) text blocks, where ceil is the floor function. The text blocks obtained from dividing document D are denoted as follows, in their original order: <d1,d2,…,d ceil(n / L) >;

[0023] For a certain document in the document library Use agents M1 and M2 respectively to perform ceil(n) (j) / L) times of representation vector extraction, for document D (j) The i-th representation vector extraction is performed on the input text of agents M1 and M2. Where ⊕ indicates sequential text concatenation;

[0024] Using the word segmenters corresponding to agents M1 and M2 to... Convert them into token sequences respectively and Then, the two token sequences are input into agents M1 and M2 respectively; select the token sequence. and The representation vector corresponding to the last token is used as the text obtained by agents M1 and M2 respectively. The overall representation, denoted as and

[0025] and Let M1 be a vector in k1-dimensional real space and k2-dimensional real space, respectively, and let M2 be a representation map from agent M1 to agent M2. Defined as a linear transformation function in and These are trainable parameters;

[0026] For document D (j) The i-th representation vector extraction on the above, with As input to the representation mapper, As the supervised training objective of the representation mapper, the loss function is defined as follows: The parameters W and b are optimized, where ||x||2 represents the L2 norm of vector x.

[0027] Furthermore, the core intelligent agent and the auxiliary intelligent agent perform correlation analysis on the knowledge in the knowledge set using the following steps:

[0028] For the questions and knowledge, the core intelligent agent generates an initial knowledge relevance analysis;

[0029] Multiple agents are used to collaboratively revise the initial knowledge relevance analysis through a competitive mechanism.

[0030] Furthermore, the competitive mechanism includes:

[0031] Each auxiliary agent generates a complete sentence, ending with a Chinese period; representation vectors are collected from each auxiliary agent, with the number of representation vectors equal to the length of the sentence it generates;

[0032] Using the representation mapping model corresponding to each auxiliary agent, the resulting representation vectors are mapped to a single vector in the representation space of the core agent. The mapped vectors summarize the content generated by each auxiliary agent and the opinions of the auxiliary agent.

[0033] The core agent will sum all the representation vectors collected from the auxiliary agents and its own representation vector, and then use this to predict the next token. This process is repeated until the core agent generates a complete sentence, ending with a Chinese period.

[0034] The auxiliary agent converts the newly generated sentence from the core agent into a token sequence of its own vocabulary using a word segmenter and treats this sentence as the preceding text; the knowledge relevance analysis generated by the core agent is equivalent to the summary of the knowledge analysis generated by each of the auxiliary agents and is consistent with the majority opinion of the auxiliary agents.

[0035] An automated question-answering system based on deep representation mapping and cross-agent interaction includes:

[0036] The knowledge extraction module is used to receive user-input questions using a knowledge extractor, extract relevant candidate knowledge from the knowledge base, and form a knowledge set.

[0037] The user needs analysis module is used to receive user input questions using the core intelligent agent and the auxiliary intelligent agent, and to perform user needs analysis.

[0038] The knowledge document analysis module is used to analyze the relevance of each piece of knowledge in the knowledge set based on the user's input questions and user needs by the core intelligent agent. It assists the intelligent agent in evaluating the relevance analysis of the core intelligent agent and deciding whether the core intelligent agent should revise the content of the relevance analysis. Based on the revising relevance analysis of the core intelligent agent, the knowledge set obtained by the knowledge extractor is filtered to obtain the filtered knowledge set.

[0039] The final response generation module is used by the core intelligent agent to generate a final response based on the user's input question, user needs analysis, filtered knowledge set, and relevance analysis of each piece of knowledge in the knowledge set.

[0040] The beneficial effects of this invention are as follows:

[0041] This invention realizes efficient multi-agent collaborative reasoning based on representation mapping, which can reduce the serial steps in the multi-agent reasoning process and improve the reasoning efficiency on complex tasks. Attached Figure Description

[0042] Figure 1 This is a flowchart of the steps of the method of the present invention. Detailed Implementation

[0043] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to specific embodiments and accompanying drawings.

[0044] This invention designs an automatic question-answering method and system based on deep representation mapping and cross-agent interaction, aiming to reduce the sequential steps in multi-agent reasoning and improve reasoning efficiency on complex tasks. This representation mapping technology supports both cooperative and competitive reasoning modes among multiple agents. Specifically, this invention includes a knowledge extractor, multiple agents, and several representation mappers.

[0045] Before building this processing system, the representation mapper needs to be trained as follows: First, a large amount of user input corpus is collected and fed into two different agents. During the generation of subsequent content, each agent needs to encode each token in the corpus into a representation vector. A token refers to a basic semantic unit that the natural language text is segmented into, and processed by, a word, a subword / affix / root, or a character, using a word segmenter / segmentation algorithm bound to a specific large language model. Next, two sets of corresponding representation vectors are collected from the input corpus encoded by the two agents. Then, using these corresponding representation vectors as training data, a mapping model, i.e., the representation mapper, is trained. The mapping model's architecture is a convolutional neural network that transforms n vectors into one vector, converting the representation vectors of the last n tokens encoded by one agent into representation vectors in the representation space of the target agent. Through this transformation, different agents only need to convert the representation vectors to change the encoding of one agent to the encoding of another while maintaining the original semantics, enabling more efficient information exchange without introducing an additional "summarization" step.

[0046] The following describes in detail the method for constructing the characterization mapper in this invention.

[0047] Because different agents (large language models) have significantly different structures and parameters, their partitioning of the representation space is inconsistent. Faced with the same input text, even if two agents produce the same prediction (predicting the same token), the generated representation vectors usually differ considerably. The representation vector generated by one agent cannot be directly provided to another agent to generate the log probability of predicting the next token. Therefore, it is necessary to construct a representation mapper between each pair of agents.

[0048] We collect open-source (public) and closed-source (private) corpora, organized by article. Each article is divided into segments of a fixed character length L. For example, a document D with a total character length of n can be divided into ceil(n / L) text blocks, where ceil is the floor function. Let's denote the text blocks obtained from dividing document D in their original order as follows: <d1,d2,…,d ceil(n / L) >

[0049] This invention trains a representation mapper. This involves converting the representation vector of agent M1 into a representation vector that agent M2 can use. Specifically, for a given document in the document library... This invention uses agents M1 and M2 to perform ceil(n) respectively. (j) / L) times of representation vector extraction, for document D (j) The i-th (1≤i≤ceil(n)) (j) / L)) extractions, the input text for agents M1 and M2 is... Where ⊕ indicates ordered text concatenation. To obtain... The corresponding representation vectors are first segmented using the word segmenters corresponding to agents M1 and M2 in this invention. Convert them into token sequences respectively and The two token sequences are then input into agents M1 and M2, respectively. This invention selects the token sequences... and The representation vector corresponding to the last token is used as the text obtained by agents M1 and M2 respectively. The overall representation of it can be denoted as... and

[0050] and These are vectors in k1-dimensional real space and k2-dimensional real space, respectively. Therefore, this invention provides a representation mapper from agent M1 to agent M2. Defined as a linear transformation function in and These are trainable parameters.

[0051] For document D (j) The i-th representation extraction on the present invention uses As input to the representation mapper, As the supervised training objective of the representation mapper, the loss function is defined as follows: The Adam algorithm (Ilya Loshchilov, Frank Hutter. Decoupled Weight Decay Regularization. ICLR2019. URL: https: / / openreview.net / forum?id=Bkg6RiCqY7) is used to optimize the parameters W and b, where ||x||2 represents the L2 norm of vector x.

[0052] Based on the aforementioned representation mapper, this invention proposes an automatic question-answering method based on deep representation mapping and cross-agent interaction. Before the entire process begins, one agent needs to be designated as the core component for encoding and decoding during the reasoning process (hereinafter referred to as the "core agent"). The remaining agents are responsible for providing representation vectors to the core agent during the reasoning process to achieve cooperation and competition (hereinafter referred to as "auxiliary agents"). The knowledge extractor selects relevant candidate knowledge from the knowledge base to form a knowledge set based on the user's input question. All agents (including the core agent and all auxiliary agents) directly analyze the question, and the core agent integrates the representation vectors of each agent to directly obtain a logarithmic probability with a "summarizing effect," thus enabling multiple agents to collaboratively obtain an analysis of the user's input question. Then, the core agent performs a preliminary analysis of each piece of knowledge in the knowledge set, which is evaluated by the auxiliary agents. Through multi-agent competition, the correct knowledge analysis is directly generated without the need for step-by-step inter-agent criticism. The specific process is as follows: Figure 1 As shown below, a detailed description will be provided.

[0053] The first step is the knowledge extraction stage.

[0054] In this stage, the knowledge extractor receives the user's input question and retrieves relevant candidate knowledge from the knowledge base based on the input question, returning a knowledge set. For example, the knowledge extractor selects 10 pieces of knowledge most relevant to the input question from the knowledge base. These extracted knowledge pieces can generally be divided into three categories: necessary knowledge, which is highly relevant to the input question and must be used by the agent to solve the problem; optional knowledge, which has some potential connection to the input question and can be used for expansion; and irrelevant knowledge, which is unrelated to the input question and should not be used. The knowledge extractor itself does not know which category a particular piece of knowledge belongs to. After this step, a knowledge set related to the question is obtained, which is then used by multiple agents to judge the applicability of each piece of knowledge in subsequent steps.

[0055] The second step is the user needs analysis phase.

[0056] In this stage, all agents receive the user's input question, perform reasoning in parallel, and the core agent generates an analysis of the user's input question. This stage specifically includes the following steps:

[0057] 1) For any auxiliary agent, before calculating the probability of the next token, extract its representation vector encoded by the current context. This representation vector is the encoding of all the preceding information in the current state by this auxiliary agent, and also includes the corresponding auxiliary agent's prediction of the subsequently generated content.

[0058] 2) Then, the representation vectors are transformed into the representation space of the core agent using the respective representation mappers of the auxiliary agents.

[0059] 3) Next, the core agent's own classifier is used to convert each transformed representation vector and the core agent's own representation vector into multiple sets of log probabilities. Note that each set of log probabilities corresponds to a probability distribution on the core agent's vocabulary. Therefore, they are combined (e.g., by weighted averaging) to obtain a distribution, and the core agent's next token is predicted based on this combined distribution.

[0060] The representation vector is obtained by inputting the token sequence into the large language model and processing it through all the Transformer layers. Inputting the representation vector into the token classifier of a specific large language model yields a set of score vectors. The dimension of the score vectors is equal to the number of tokens in the vocabulary of the corresponding word segmenter of that large language model. The higher the score for a token, the more likely that token should be output.

[0061] 4) The auxiliary agents convert the tokens selected by the core agent into corresponding tokens in their own vocabularies using their respective word segmenters. In this generation process utilizing a mapping model, the core agent collects the encodings of the preceding text from all auxiliary agents at each step. This means that each auxiliary agent's understanding of the preceding text and predictions of subsequent content are aggregated at the core agent, which then predicts the next token. This progressive aggregation and analysis process is equivalent to the core agent summarizing the ideas of all agents at each generation, enabling multiple agents to "cooperate" and thus compressing the independent "summarization" steps. After this step, a detailed analysis of user needs can be obtained.

[0062] In one embodiment of the present invention, k (k≥3) agents M1,…,M are used. k Collaborative generation of user needs analysis, in which agent M c (1≤c≤k) is the core agent, and the other agents are auxiliary agents. In the process of generating user requirement analysis, for question q, the initial input received by all agents is: "The user's question is:" ⊕q ⊕ "Now you need to generate a detailed user requirement analysis:", and then specific user requirement analyses need to be generated for each token. The specific algorithm includes the following steps:

[0063] 1) Initially (t=1), the input text received by the agent is the initial input as described above, denoted as T1, and the generated user demand analysis token sequence R is an empty sequence.

[0064] 2) Obtain and transform the representation of each agent. Utilize agent M i The corresponding word segmenter will segment the current input text T t Encoded as a token sequence Will Input to agent M i This yields the representation vector for each token; only those tokens are selected and collected. The representation vector corresponding to the last token is denoted as Used to predict the next token.

[0065] 3) For the assistant agent, use the agent M i To agent M c Representation mapper Will Transformed into core intelligent agent M c Acceptable representation vector Then use the core agent M c The token classifier will Convert to token score For the core agent, directly use the core agent M. cThe token classifier will Convert to token score

[0066] 4) Calculate the average of the token scores: According to the rating results y t Predict the next token r t+1 If r t+1 To terminate the token generation process, end the token generation process and save the token sequence R; otherwise, update the user requirements analysis token sequence: R←R⊕ <r t+1 >

[0067] 5) Utilizing the core intelligent agent M c The corresponding word segmenter restores the user demand analysis token sequence R back to text, denoted as T. R Update the input text for the next time step: T t+1 ←T t ⊕T R .

[0068] The third step is the knowledge document analysis phase.

[0069] In this stage, the core agent analyzes the user's input question and needs to generate a relevance analysis for each retrieved piece of knowledge. The auxiliary agent evaluates the core agent's relevance analysis and decides whether the core agent should revise the analysis content. This stage specifically includes the following steps:

[0070] 1) The core intelligent agent receives the user's input question, user needs analysis, and knowledge content as input for the intelligent agent. It performs a relevance analysis on each piece of knowledge retrieved to determine whether a piece of knowledge is related to the user's input question and whether it is helpful in solving the problem, thus forming an initial knowledge relevance analysis.

[0071] In the process of generating the initial knowledge relevance analysis, for question q and a piece of knowledge g returned by the retrieval machine, only the core agent generates the initial knowledge relevance analysis, and the initial input it receives is:

[0072] The user's question is: "⊕q⊕" Regarding the knowledge returned by the search engine: "⊕g⊕"

[0073] "Now you need to analyze whether this knowledge is directly related to the user's question and helps answer the user's question:"

[0074] The core agent will then generate an initial knowledge relevance analysis for each token, denoted as p. init .

[0075] 2) The subsequent generation process employs a novel "competitive generation" method proposed in this invention. It introduces a competitive relationship between multiple agents, generating content through multiple rounds of competition, thereby enhancing the agents' reasoning capabilities. Each round of competition is similar to "speculation and decoding," as detailed below:

[0076] First, each auxiliary agent generates a complete sentence, ending with a Chinese period (full stop). From each auxiliary agent, several representation vectors are collected, the number of which is equal to the length of the sentence it generates.

[0077] Then, using the representation mapping model corresponding to each auxiliary agent, the resulting representation vectors are mapped to single vectors in the representation space of the core agent. These transformed vectors summarize the content generated by each auxiliary agent and the opinions of the auxiliary agent.

[0078] Next, the core agent begins generation. The core agent sums the representation vectors collected from all the auxiliary agents with its own representation vector, and then uses this sum to predict the next token. This step is repeated until the core agent also generates a complete sentence, ending with a period (or period in Chinese).

[0079] Finally, the auxiliary agent uses a word segmenter to convert the newly generated sentence from the core agent into a token sequence of its own vocabulary, and treats this sentence (i.e., the newly generated sentence from the core agent) as the preceding context. This concludes one round of "competitive generation." The knowledge relevance analysis generated by the core agent in this way is equivalent to a summary of the knowledge analyses generated by each of the auxiliary agents, and it aligns with the majority opinion of the auxiliary agents, thus utilizing multi-agent competition to skip the "summary" step.

[0080] In one embodiment of the present invention, k (k≥3) agents M1,…,M are used. k The initial knowledge relevance analysis is collaboratively revised through a competitive mechanism, in which agent M... c (1≤c≤k) is the core agent, and the other agents are auxiliary agents. During the correction of the knowledge relevance analysis, for a question q and a piece of knowledge g, the initial input received by all agents is: "The user's question is: "⊕q⊕" For a piece of knowledge returned by the retrieval machine: "⊕g⊕" The original knowledge relevance analysis was "⊕p init ⊕“However, this analysis may be incorrect. You need to rethink and generate a more accurate knowledge relevance analysis and clearly determine whether this knowledge is relevant to the user's question or not in the last sentence:”, and then generate the corrected knowledge relevance analysis sentence by sentence.

[0081] The specific algorithm for generating the corrected knowledge relevance analysis includes the following steps:

[0082] (1) Initially (t=1), the input text received by the agent is the initial input as described above, denoted as T1.

[0083] (2) Using the intelligent agent M i The corresponding word segmenter will segment the current input text T t Encoded as a token sequence Will Input to agent M i By agent M i Generate a complete sentence token by token in an autoregressive manner, ending with a period. Denote the length of the newly generated token sequence as... After generating the period tokens, we obtain the representation vector for each token (including all input tokens and all new output tokens before the period). Only the representation vectors from these tokens are selected and collected. The representation vectors corresponding to the last token and the tokens before the period are denoted as: in

[0084] (3) Next, the core intelligent agent M c Based on the generation results of all agents, a new sentence is generated. Specifically, this includes:

[0085] Assume the regenerated token sequence P is empty. The core agent regenerates the next sentence for knowledge relevance analysis (token-by-token). Obtain the representation of each model at the position corresponding to the current token. If the current agent is the core agent, skip this step; otherwise, obtain the representation of the auxiliary agent M. i The corresponding relative positions in the generated sentences

[0086] Using the auxiliary agent M i To the core intelligent agent M c Representation mapper Will Transformed into core intelligent agent M c Acceptable representation vector Using the core intelligent agent M c The token classifier will represent the vector Convert to a rating vector With T t ⊕P as the core intelligent agent M c Input the last token and obtain the score vector. Max pooling is performed on all rating vectors to obtain the final rating: The score vector y is based on the integration of predictions from all agents. t Predict the next token p u+1 .

[0087] If p t+1 To terminate the token generation process or use a period token, end the token generation process and save the token sequence P. Otherwise, update the token sequence: P←P⊕ <p u+1 >

[0088] (4) Utilizing the core intelligent agent M c The corresponding token segmenter restores the regenerated token sequence P back into text, denoted as T. P Update the input text for the next time step: T t+1 ←T t ⊕T P Among them, T P For one sentence.

[0089] (5) If the last token of sequence P is a stop token, then the process of generating knowledge relevance analysis ends. Otherwise, continue generating the next sentence for knowledge relevance analysis.

[0090] 3) Finally, based on the revised relevance analysis of the core intelligent agent, the knowledge set obtained by the knowledge extractor from the knowledge base is filtered. After this step, a filtered knowledge set is obtained. It is a proper subset of the original knowledge set, containing only knowledge that is helpful in achieving user needs.

[0091] The knowledge generated by the agent is decoded by regular expressions. If the last sentence explicitly contains the word "relevant" and does not contain the word "irrelevant", then the knowledge is considered to be relevant to the user's question and is retained; otherwise, the knowledge is considered to be irrelevant and is discarded.

[0092] The fourth step is the final response generation stage.

[0093] In this stage, the core intelligent agent receives user input, user needs analysis, the retrieved knowledge set (i.e., the filtered knowledge set obtained in the third step), and the relevance analysis of each piece of knowledge in the knowledge set as input, and generates the final response.

[0094] The input is: "The user's question is: "⊕q⊕" The knowledge set related to the question is: "⊕G⊕" The analysis of the user's question is: "⊕R⊕" The analysis of the knowledge is: "⊕P⊕" Now please generate the answer to the user's question:

[0095] Here, G represents the filtered knowledge set, R represents the user needs analysis generated in the previous stage, and P represents the knowledge relevance analysis generated in the previous stage (analyses corresponding to multiple pieces of knowledge are concatenated). Finally, the core intelligent agent directly generates the final answer.

[0096] In the complete process, the knowledge extractor retrieves and the agents filter to obtain knowledge that helps to meet the user's needs. Multiple agents jointly evaluate the text (joint evaluation refers to the text generated through competitive evaluation, which reflects the selection preferences of all agents) to avoid agent illusion, thus generating more accurate and beneficial responses.

[0097] Another embodiment of the present invention provides an automatic question-answering system based on deep representation mapping and cross-agent interaction, comprising:

[0098] The knowledge extraction module is used to receive user-input questions using a knowledge extractor, extract relevant candidate knowledge from the knowledge base, and form a knowledge set.

[0099] The user needs analysis module is used to receive user input questions using the core intelligent agent and the auxiliary intelligent agent, and to perform user needs analysis.

[0100] The knowledge document analysis module is used to analyze the relevance of each piece of knowledge in the knowledge set based on the user's input questions and user needs by the core intelligent agent. It assists the intelligent agent in evaluating the relevance analysis of the core intelligent agent and deciding whether the core intelligent agent should revise the content of the relevance analysis. Based on the revising relevance analysis of the core intelligent agent, the knowledge set obtained by the knowledge extractor is filtered to obtain the filtered knowledge set.

[0101] The final response generation module is used by the core intelligent agent to generate a final response based on the user's input question, user needs analysis, filtered knowledge set, and relevance analysis of each piece of knowledge in the knowledge set.

[0102] The above division of modules is merely illustrative. In practical applications, the functions described above can be assigned to different functional modules as needed to complete all or part of the functions described in the aforementioned method. The specific working process of each module can be found in the corresponding process in the aforementioned method embodiments, and will not be repeated here.

[0103] Another embodiment of the present invention provides a computer device (computer, server, smartphone, etc.) including a memory and a processor, the memory storing a computer program configured to be executed by the processor, the computer program including instructions for performing the steps of the method of the present invention.

[0104] Another embodiment of the present invention provides a computer-readable storage medium (such as ROM / RAM, disk, optical disk) storing a computer program that, when executed by a computer, implements the various steps of the method of the present invention.

[0105] The specific embodiments of the present invention disclosed above are intended to help understand the content of the present invention and to implement it accordingly. Those skilled in the art will understand that various substitutions, changes, and modifications are possible without departing from the spirit and scope of the present invention. The present invention should not be limited to the content disclosed in the embodiments of this specification; the scope of protection of the present invention is defined by the claims.

Claims

1. An automatic question-answering method based on deep representation mapping and cross-agent interaction, characterized in that, Includes the following steps: The knowledge extractor receives questions input by users, extracts relevant candidate knowledge from the knowledge base, and forms a knowledge set. The core intelligent agent and the auxiliary intelligent agent receive user input questions and perform user needs analysis; The core agent analyzes the user's input questions and needs, performs a relevance analysis on each piece of knowledge in the knowledge set, assists the core agent in evaluating the relevance analysis, and decides whether the core agent should revise the content of the relevance analysis. Based on the relevance analysis after the core intelligent agent is revised, the knowledge set obtained by the knowledge extractor is filtered to obtain the filtered knowledge set. The core intelligent agent takes the user's input question, user needs analysis, filtered knowledge set, and relevance analysis of each piece of knowledge in the knowledge set as input to generate the final response.

2. The method according to claim 1, characterized in that, The knowledge extracted by the knowledge extractor includes three categories: Necessary knowledge refers to knowledge that is highly relevant to the input problem and that the agent must use to solve it; Optional knowledge refers to knowledge that has a certain potential connection with the input problem and can be used for expansion. Irrelevant knowledge, that is, knowledge that is not related to the input question and should not be used.

3. The method according to claim 1, characterized in that, The user needs analysis includes: For any auxiliary agent, before it calculates the probability of the next token, it extracts the representation vector obtained by encoding the current context; the representation vector contains the auxiliary agent's encoding of all the information in the current context, as well as the auxiliary agent's prediction of the subsequently generated content. The representation vectors are transformed into the representation space of the core agent using the respective representation mappers of the auxiliary agents; The classifier of the core agent itself is used to convert each transformed representation vector and the core agent's own representation vector into multiple sets of log probabilities. Each set of log probabilities corresponds to a probability distribution on the core agent's vocabulary. These probabilities are combined to obtain a distribution. The next token of the core agent is predicted based on the combined distribution. The auxiliary agents convert the tokens selected by the core agents into the corresponding tokens in their own vocabulary using their respective word segmenters.

4. The method according to claim 1, characterized in that, The representation mapper is constructed using the following steps: We collect open-source and closed-source corpora, using articles as units. Each article is divided into segments of a fixed character length L. A document D with a total character length of n is divided into ceil(n / L) text blocks, where ceil is the floor function. The text blocks obtained from dividing document D are denoted as follows, in their original order: <d1,d2,…,d ceil(n / L) >; For a certain document in the document library Use agents M1 and M2 respectively to perform ceil(n) (j) / L) times of representation vector extraction, for document D (j) The i-th representation vector extraction is performed on the input text of agents M1 and M2. in Indicates sequential text concatenation; Using the word segmenters corresponding to agents M1 and M2 to... Convert them into token sequences respectively and Then, the two token sequences are input into agents M1 and M2 respectively; select the token sequence. and The representation vector corresponding to the last token is used as the text T obtained by agents M1 and M2 respectively. i (j) The overall representation, denoted as and and Let M1 be a vector in k1-dimensional real space and k2-dimensional real space, respectively, and let M2 be a representation map from agent M1 to agent M2. Defined as a linear transformation function in and These are trainable parameters; For document D (j) The i-th representation vector extraction on the above, with As input to the representation mapper, As the supervised training objective of the representation mapper, the loss function is defined as follows: The parameters W and b are optimized, where ||x||2 represents the L2 norm of vector x.

5. The method according to claim 4, characterized in that, The parameters W and b are optimized using the Adam algorithm.

6. The method according to claim 1, characterized in that, The core intelligent agent and the auxiliary intelligent agent perform correlation analysis on the knowledge in the knowledge set using the following steps: For the questions and knowledge, the core intelligent agent generates an initial knowledge relevance analysis; Multiple agents are used to collaboratively revise the initial knowledge relevance analysis through a competitive mechanism.

7. The method according to claim 6, characterized in that, The competitive mechanism includes: Each auxiliary agent generates a complete sentence, ending with a Chinese period; representation vectors are collected from each auxiliary agent, with the number of representation vectors equal to the length of the sentence it generates; Using the representation mapping model corresponding to each auxiliary agent, the resulting representation vectors are mapped to a single vector in the representation space of the core agent. The mapped vectors summarize the content generated by each auxiliary agent and the opinions of the auxiliary agent. The core agent will sum all the representation vectors collected from the auxiliary agents and its own representation vector, and then use this to predict the next token. This process is repeated until the core agent generates a complete sentence, ending with a Chinese period. The auxiliary agent converts the newly generated sentence from the core agent into a token sequence of its own vocabulary using a word segmenter and treats this sentence as the preceding text; the knowledge relevance analysis generated by the core agent is equivalent to the summary of the knowledge analysis generated by each of the auxiliary agents and is consistent with the majority opinion of the auxiliary agents.

8. An automatic question-answering system based on deep representation mapping and cross-agent interaction, characterized in that, include: The knowledge extraction module is used to receive user-input questions using a knowledge extractor, extract relevant candidate knowledge from the knowledge base, and form a knowledge set. The user needs analysis module is used to receive user input questions using the core intelligent agent and the auxiliary intelligent agent, and to perform user needs analysis. The knowledge document analysis module is used to analyze the relevance of each piece of knowledge in the knowledge set based on the user's input questions and user needs by the core intelligent agent. It assists the intelligent agent in evaluating the relevance analysis of the core intelligent agent and deciding whether the core intelligent agent should revise the content of the relevance analysis. Based on the revising relevance analysis of the core intelligent agent, the knowledge set obtained by the knowledge extractor is filtered to obtain the filtered knowledge set. The final response generation module is used by the core intelligent agent to generate a final response based on the user's input question, user needs analysis, filtered knowledge set, and relevance analysis of each piece of knowledge in the knowledge set.

9. A computer device, characterized in that, It includes a memory and a processor, the memory storing a computer program configured to be executed by the processor, the computer program including instructions for performing the method of any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a computer, implements the method according to any one of claims 1 to 7.