Multi-agent collaborative question and answer enhancement method and system based on heterogeneous data knowledge

Through a multi-agent collaborative question-answering framework, and by utilizing structured processing and parallel retrieval of heterogeneous knowledge bases, the problem of insufficient information integration and knowledge utilization in existing question-answering systems when handling complex tasks is solved, and the accuracy and explainability of answers are improved. It is suitable for application scenarios with high precision requirements such as medical diagnosis and legal consultation.

CN120705277APending Publication Date: 2025-09-26GUANGDONG UNIV OF TECH
View PDF 0 Cites 22 Cited by

Patent Information

Application Number
CN202511099067.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-06
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

Existing question-answering systems have difficulty effectively integrating and utilizing heterogeneous data when processing complex tasks, resulting in limited accuracy and credibility of answers. In addition, large language models are prone to hallucinatory outputs in the absence of external knowledge constraints.

Method used

A multi-agent collaborative question-answering framework is adopted to break down problems through structured processing and named entity recognition. A dual-tower semantic matching model is combined to perform parallel retrieval in heterogeneous knowledge bases. Summary extraction and reflection iteration mechanisms are introduced to improve the accuracy and explainability of information retrieval and reasoning.

Benefits of technology

It enhances the question-answering system's ability to understand complex questions and the quality of its answers, improves the breadth of knowledge coverage and the depth of reasoning, and is suitable for a variety of application scenarios requiring high precision and high reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120705277A_ABST
    Figure CN120705277A_ABST
Patent Text Reader

Abstract

The invention provides a multi-agent collaborative question and answer enhancement method and system based on heterogeneous data knowledge, and belongs to the technical field of information management. The planning optimization intelligent agent carries out structured processing on the input complex natural language problem; a multi-modal retrieval mechanism on the heterogeneous knowledge source is constructed based on the problem disassembly and entity recognition result, and a multi-path recall agent passes through a semantic matching model of a double-tower structure; the abstract extraction agent performs semantic fusion and information extraction on the text segments and the knowledge graph sub-graphs output by the multi-path recall module; logic verification and quality evaluation are carried out on the answers generated by the abstract extraction module by the reflection iteration agent; and by setting a threshold mechanism and combining importance weights of the sub-questions, performing scoring and reflection optimization on the generated answers by utilizing a large language model LLM (Language Language Model). The method can effectively cope with cross-domain and multi-level complex question and answer tasks, and has good expandability and intelligent level.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention provides a multi-agent collaborative question-answering enhancement method and system based on heterogeneous data knowledge, belonging to the field of information management technology. Background Art

[0002] In today's era of information explosion, with the rapid growth of data volumes, how to effectively manage and utilize this massive amount of information has become a critical research topic. Heterogeneous data, including structured knowledge graphs and unstructured text data, constitute the fundamental information source for modern intelligent systems. This diversity of data forms provides rich content for knowledge representation and reasoning, but also brings challenges in integration and processing. To extract valuable information from these complex data sources, multi-agent systems have been widely used in various complex tasks due to their flexibility, adaptability, and parallel processing capabilities. However, existing question-answering systems still face many challenges in integrating and utilizing heterogeneous data. For example, although large language models (LLMs) have demonstrated powerful capabilities in natural language understanding and reasoning, the accuracy and credibility of their answers are limited due to their delayed knowledge updates and the susceptibility to "hallucinations" during reasoning.

[0003] Existing knowledge question answering (KBQA) solutions, including embedding-based and retrieval-enhanced methods, generally suffer from the following shortcomings:

[0004] Disadvantage 1: Existing methods are usually limited to using text strings for basic search tasks, and then immediately perform subsequent generation work based on the initial retrieval operation. There is a lack of further filtering and optimization, resulting in irrelevant or interfering information in the final answer.

[0005] Disadvantage 2: The retrieval-based KBQA method, although it uses retrieval-assisted reasoning, only adopts the semantic matching method of unstructured text, ignoring the mutual correlation between information. As a result, the reasoning accuracy and efficiency on complex questions are low, and the generated answers are incomplete. Summary of the Invention

[0006] The present invention aims to provide a multi-agent collaborative question-answering enhancement method and system based on heterogeneous data knowledge, so as to solve the problems of information retrieval omissions, insufficient knowledge utilization, and incomplete reasoning process in existing intelligent question-answering systems when handling complex tasks. Traditional question-answering systems often rely on a single knowledge source or a centralized reasoning mechanism. When faced with questions involving multi-domain and multi-level semantic relationships, it is difficult to achieve unified modeling and efficient utilization of structured and unstructured knowledge, resulting in limited answer accuracy and completeness. In addition, although large-scale language models have strong natural language understanding capabilities, they are prone to hallucinatory output in the absence of external knowledge constraints, affecting the reliability of the system.

[0007] In order to solve the above problems, the present invention introduces a heterogeneous knowledge base containing structured knowledge graphs and unstructured text data, combined with a multi-agent collaborative reasoning mechanism, to construct a modular and scalable question-answering framework. This framework uses multiple agents with different functions to perform key steps such as question decomposition, multi-way recall, summary extraction and reflection iteration, to achieve an organic combination of fine retrieval and deep reasoning in multi-source heterogeneous knowledge, thereby improving the system's ability to understand complex problems and the quality of answers. The present invention not only enhances the breadth of knowledge coverage and the depth of reasoning logic in the question-answering process, but also improves the interpretability and adaptability of the system, making it suitable for a variety of application scenarios with high precision and high reliability requirements.

[0008] The specific technical solutions provided by the present invention are:

[0009] The multi-agent collaborative question answering enhancement method based on heterogeneous data knowledge includes the following steps:

[0010] Step 1: Structural processing is performed on the complex natural language question input. The original question is decomposed into several semantically clear and logically independent sub-questions through the large language model (LLM). Named entity recognition (NER) is performed on each sub-question to extract key entity information.

[0011] The following sub-steps are included:

[0012] S1.1 Preliminary decomposition of complex issues;

[0013] First, the system receives a complex question Q∈L from the user, where L represents the natural language space. It uses a pre-trained large language model (LLM) to perform semantic understanding and task analysis, outputting a set of independent and logically coherent sub-questions:

[0014]

[0015] in represents the set of subproblems, n represents the number of subproblems, q i Represents the i-th subproblem. This splitting process is based on contextual semantic relationship modeling to ensure that each subproblem has a clear semantic boundary and reasoning goal.

[0016] Semantic rewriting of sub-problems S1.2;

[0017] For each subproblem q i Perform semantic rewriting to generate a more expressive question expression:

[0018] q′ i =f rewrite (q i ) (2)

[0019] where f rewrite(·) is a semantic rewriting function driven by the language model, which is used to remove ambiguity, standardize expressions, and enhance keyword features, ultimately obtaining an optimized set of sub-problems:

[0020]

[0021] S1.3 Named Entity Recognition and Entity Extraction;

[0022] After completing the rewriting of the subproblem, the system calculates i Perform named entity recognition (NER) operations to identify key entities related to the question. Let the entity recognition model be M NER , then for each subproblem q i ,have:

[0023]

[0024] Among them E i Represents subproblem q′ i Entity set, e i Represents the entity set involved in the i-th sub-problem, m i Indicates the number of entities identified in this sub-problem. Finally, the entity information of all sub-problems is summarized to form a global entity set:

[0025]

[0026] in Indicates the total number of entities involved in the problem.

[0027] S1.4 output results;

[0028] After the above three sub-steps, the system outputs the following two types of data:

[0029] (1) The sub-problem set Q′ after splitting and rewriting sub ;

[0030] (2) Set of entities related to the problem

[0031] Step 2: Based on the results of question decomposition and entity recognition, a multimodal retrieval mechanism is constructed on heterogeneous knowledge sources. Through the semantic matching model of the dual-tower structure, parallel retrieval is performed in the heterogeneous knowledge base containing structured knowledge graphs and unstructured text data, respectively, to obtain the top k text fragments and knowledge graph subgraphs most relevant to each sub-question, thereby providing comprehensive and diverse information support for subsequent reasoning.

[0032] The following sub-steps are included:

[0033] S2.1 Constructing heterogeneous knowledge base index;

[0034] Heterogeneous knowledge base It consists of two parts:

[0035] (1) Structured Knowledge Graph in Represents a collection of entities, Represents a set of relations;

[0036] (2) Unstructured text library in Represents the jth text content.

[0037] The system pre-indexes these two types of knowledge sources and maps them into a unified vector space using graph embedding and text embedding methods. to support subsequent semantic matching.

[0038] S2.2 Construction of the double-tower semantic matching model;

[0039] For each rewritten subproblem The system uses a double-tower semantic matching model f match (·) for retrieval. The model consists of two independent encoders:

[0040] (1) Query the encoder

[0041] For the rewritten subproblem q, query the encoder E q Map it to vector v q :

[0042] v q =E q (q) = f(W q ·φ(q)+b q ) (6)

[0043] (2) Knowledge Encoder

[0044] For a knowledge item k, the knowledge encoder E k Map it to vector v k :

[0045] v k =E k (k) = g(W k ·ψ(k)+b k ) (7)

[0046] Then the semantic similarity between the query and the knowledge item can be defined as:

[0047]

[0048] in Represents an arbitrary item of knowledge.

[0049] The contrast loss is used as the training objective, aiming to maximize the similarity between positive sample pairs while minimizing the similarity between negative sample pairs. The loss function is defined as follows:

[0050]

[0051] in:

[0052] (q, k + ) represents a query and its corresponding positive sample (i.e., related knowledge item);

[0053] k - Represents negative samples (irrelevant knowledge items);

[0054] m is the margin, which is used to ensure that the similarity between positive sample pairs is significantly higher than that between negative sample pairs.

[0055] S2.3 Multi-source recall strategy;

[0056] Based on the similarity function above, the system performs Top-k search on two types of knowledge sources:

[0057] (1) Unstructured text recall

[0058] In the text library The system calculates all texts and q′ i The similarity scores of are calculated and the top k text segments with the highest scores are selected as candidate answers:

[0059]

[0060] (2) Structured knowledge graph recall

[0061] In the knowledge graph The system first locates the entity e∈E in the subproblem i Related adjacent nodes, build local subgraph Then the subgraph is scored based on the query semantics.

[0062] Subgraph scoring function S(G sub,i |q i ) is defined as the query vector The weighted average similarity with all node embedding vectors in the subgraph:

[0063]

[0064] in:

[0065] V sub,i Represents the local subgraph G sub,i The set of all nodes in ;

[0066] w j is node v j The weight of the node can be determined based on the distance from the node to the query entity or other relevance metrics;

[0067] Calculating query vectors and node embedding vector v j The similarity between them is expressed using cosine similarity:

[0068] This formula is used to quantify the relevance of a local subgraph to the query semantics, so as to filter out the top K most relevant subgraphs from the knowledge graph.

[0069] Finally, the top k subgraphs with the highest similarity are selected:

[0070]

[0071] S2.4 output results;

[0072] After the above recall process, the system generates a i The following two types of information are obtained:

[0073] (1) The corresponding first k relevant text fragments

[0074] (2) The corresponding top k related knowledge graph subgraphs

[0075] Step 3: The summary extraction agent performs semantic fusion and information extraction on the text snippets and knowledge graph subgraphs output by the multi-way recall module. By introducing an information screening mechanism based on the Large Language Model (LLM), it removes redundant and irrelevant content from the candidate information and generates a clearly structured and semantically focused summary for each sub-question, providing high-quality knowledge input for subsequent reasoning.

[0076] The following sub-steps are included:

[0077] S3.1 Input data preparation

[0078] The summary extraction module receives the results from the multi-way recall stage:

[0079] For the i-th subproblem q′ i , and its corresponding unstructured text recall result is

[0080] The corresponding knowledge graph subgraph recall result is

[0081] in, represents the top k relevant knowledge items recalled in the text base and graph respectively.

[0082] S3.2 Noise information filtering and semantic scoring;

[0083] First, use the pre-trained language model M LLM Perform semantic evaluation on all recalled contents and calculate their correlation with the current sub-question q′ i Relevance score:

[0084] s t (t ij )=f score (q′ i , t ij )=Sim LLM (E(q′ i ),E(t ij )) (13)

[0085] s g (g ij )=f score (q′ i ,g ij )=Sim LLM (E(q′ i ),E(g ij )) (14)

[0086] in:

[0087] E(·) represents the embedding vector extracted by LLM;

[0088] Sim LLM (·,·) represents the function used within the language model to measure semantic similarity (such as dot product or cosine similarity);

[0089] s t (·) and s g (·) denote the relevance scores of text segments and graph subgraphs, respectively.

[0090] The system then sets a threshold θ and only retains content with a score higher than this threshold:

[0091]

[0092] S3.3 Targeted information extraction and summary generation;

[0093] After completing the noise filtering, the system further calls the LLM model to integrate information and generate summaries for the retained text and graph content.

[0094] Specifically, define a summary generation function f summarize (·), whose input is the question context q′ i and filtered collections of knowledge content Output is structured summary information a i :

[0095]

[0096] This function is implemented as follows:

[0097] (1) For each knowledge item Extract the related keyword set W j =Keywords(k j );

[0098] (2) Construct keyword co-occurrence graph G KW =(W,E), where node w∈W represents a keyword and edge e uv ∈E means that two keywords co-occur in multiple knowledge items;

[0099] (3) Using Graph Neural Network (GNN) to KW Perform semantic aggregation to obtain the core keyword weight distribution α={α1,α2,...,α |W|};

[0100] (4) Using LLM to generate question-oriented q′ based on keyword weights and original knowledge content i Abstract text of a i .

[0101] S3.4 output results;

[0102] The summary extraction module ultimately outputs the following two types of information:

[0103] (1) For each sub-problem q′ i Summary information of a i , as input to subsequent reflection iteration modules;

[0104] (2) Corresponding keyword weight distribution α i , used to assist in explaining the source and credibility of the summary content.

[0105] Step 4: The reflective iterative agent logically verifies and evaluates the quality of the answers generated by the summary extraction module. By setting a threshold mechanism and combining the importance weights of the sub-questions, the large language model (LLM) is used to score and reflectively optimize the generated answers, ensuring that the final output meets the system's preset standards for semantic accuracy, information completeness, and reasoning consistency.

[0106] The following sub-steps are included:

[0107] S4.1 Input data preparation;

[0108] The Reflection Iteration module receives the following inputs:

[0109] (1) The i-th sub-problem q′ after decomposition i

[0110] (2) The preliminary answer a output by the summary extraction module i

[0111] (3) Entity set E corresponding to the sub-problem i ={e i1 , e i2 ,...,e im}

[0112] At the same time, the system assigns a weight ω to each subproblem i ∈[0, 1], indicating its importance in the entire problem:

[0113]

[0114] Where n is the total number of subproblems.

[0115] S4.2 Answer scoring and quality assessment;

[0116] The system uses a pre-trained language model M LLM For each answer a i Conduct multi-dimensional scoring, including:

[0117] (1) Semantic match: measures the semantic consistency between the answer and the question;

[0118] (2) Information completeness: Determine whether the answer covers all key entities mentioned in the question;

[0119] (3) Logical consistency: Evaluate whether there are logical contradictions within the answer.

[0120] The scoring function is defined as:

[0121] s i =f score (q′ i , a i )∈[0,1] (19)

[0122] where f score (·) is a comprehensive scoring function implemented by LLM, integrating the above multiple evaluation dimensions.

[0123] The final weighted score is calculated as follows:

[0124]

[0125] S4.3 Reflection and iteration mechanism;

[0126] The system sets a threshold τ∈[0,1] to determine whether the current answer meets the output standard:

[0127] (1) If S ≥ τ, the current answer is considered to be of good quality and the final answer is output;

[0128] (2) If S<τ, the process enters the reflective iteration phase, and a maximum of three iterations are allowed.

[0129] During each iteration, the system does the following:

[0130] Change the current answer to a i and ratings i Input LLM and guide it to generate reflective feedback information r i , point out the problems in the answer;

[0131] Using reflective feedback i With the original problem q′ i As a new prompt, regenerate the optimized answer a′ i ;

[0132] Update the current weighted score S and determine whether the output condition is met.

[0133] Formally, the update process of the tth iteration is expressed as:

[0134]

[0135] If in a certain iteration S (t) ≥τ or reaches the maximum number of iterations T max =3, then terminate the iteration process and output the final answer:

[0136]

[0137] S4.4 output results;

[0138] The reflection and iteration module ultimately outputs the following two types of information:

[0139] (1) Final integrated answer A final ;

[0140] (2) Reflective feedback information r for each sub-question i , which can be used to explain the answer optimization process and enhance the interpretability of the system.

[0141] The present invention also provides a multi-agent collaborative question-answering enhancement system based on heterogeneous data knowledge, which integrates multiple agent modules, including but not limited to a question-decomposition agent, a multi-way recall agent, a summary extraction agent, and a reflective iterative agent. Each agent is responsible for a specific task in the question-answering process: the question-decomposition agent is used to decompose complex questions into smaller, more manageable questions; the multi-way recall agent is able to perform efficient retrieval in structured and unstructured data; the summary extraction agent focuses on extracting key information from the retrieval results; and the reflective iterative agent performs logical verification and optimization based on the intermediate results to improve the quality of the final answer. In this way, the present invention not only fully utilizes the knowledge potential of heterogeneous data, but also enhances the flexibility and adaptability of the system, especially when facing cross-domain, multi-level complex problems, it can provide more accurate, complete, and explainable answers. This method is particularly suitable for application scenarios that require high precision and reliability, such as medical diagnosis, legal consultation, etc., greatly improving the practical value and application scope of the intelligent question-answering system.

[0142] The technical solution provided by the present invention has the following technical effects:

[0143] (1) Improve the ability to handle complex questions: By breaking down complex questions into multiple sub-questions and extracting key semantic information using named entity recognition technology, the system can more accurately understand the intent of the question, thereby effectively responding to cross-domain, multi-level complex question-answering tasks.

[0144] (2) Enhance the ability to comprehensively utilize heterogeneous knowledge sources: The present invention integrates structured knowledge graphs and unstructured text data to build a unified knowledge representation framework, supporting efficient retrieval and semantic matching in multi-source heterogeneous data, thereby improving knowledge coverage and reasoning depth.

[0145] (3) Improve the accuracy and explainability of answer generation: Through the summary extraction agent, the recall results are filtered and key content is refined to avoid redundant interference, ensuring that the generated answers are accurate and logically clear, while retaining the source basis, thereby enhancing the explainability and credibility of the system.

[0146] (4) Implementing dynamic optimization and self-reflection mechanisms: Introducing a reflective iterative agent module, which determines the quality of the current answer and performs feedback optimization by setting scoring thresholds and weighting mechanisms. This mechanism automatically triggers the iterative regeneration process when the output standard is not met, significantly improving the robustness and stability of the final answer.

[0147] (5) Good scalability and application adaptability: The present invention adopts a modular design, with clear responsibilities and flexible collaboration between each intelligent agent, which facilitates functional expansion and model replacement according to specific application scenarios. It is suitable for professional fields with high risks and high precision requirements such as medicine, law, and finance. BRIEF DESCRIPTION OF THE DRAWINGS

[0148] Figure 1 Flowchart of the present invention. DETAILED DESCRIPTION

[0149] The specific technical solutions of the present invention are described with reference to the accompanying drawings and embodiments.

[0150] like Figure 1 As shown in Figure 1, the multi-agent collaborative question answering enhancement method based on heterogeneous data knowledge includes the following steps:

[0151] Step 1: The first step of our method is to structure the complex natural language input question. Using a large language model (LLM), the original question is decomposed into several semantically clear and logically independent sub-questions. Named Entity Recognition (NER) is then performed on each sub-question to extract key entity information. This process aims to provide precise retrieval targets and semantic anchors for subsequent multi-way recall, improving the accuracy and interpretability of the overall question-answering system.

[0152] The following sub-steps are included:

[0153] S1.1 Preliminary decomposition of complex issues;

[0154] First, the system receives a complex question Q∈L from the user, where L represents the natural language space. It uses a pre-trained large language model (LLM) to perform semantic understanding and task analysis, outputting a set of independent and logically coherent sub-questions:

[0155]

[0156] Where n represents the number of subproblems, q i Represents the i-th subproblem. This splitting process is based on contextual semantic relationship modeling to ensure that each subproblem has a clear semantic boundary and reasoning goal.

[0157] Semantic rewriting of sub-problems S1.2;

[0158] In order to improve the matching accuracy in the subsequent retrieval stage, for each sub-question q i Perform semantic rewriting to generate a more expressive question expression:

[0159] q′ i =f rewrite (q i ) (2)

[0160] where f rewrite (·) is a semantic rewriting function driven by the language model, which is used to remove ambiguity, standardize expressions, and enhance keyword features, ultimately obtaining an optimized set of sub-problems:

[0161]

[0162] S1.3 Named Entity Recognition and Entity Extraction;

[0163] After completing the rewriting of the subproblem, the system calculates i Perform named entity recognition (NER) operations to identify key entities related to the question. Let the entity recognition model be M NER , then for each subproblem q i ,have:

[0164]

[0165] where e i Represents the entity set involved in the i-th sub-problem, m i Indicates the number of entities identified in this sub-problem. Finally, the entity information of all sub-problems is summarized to form a global entity set:

[0166]

[0167] in Indicates the total number of entities involved in the problem.

[0168] S1.4 output results;

[0169] After the above three sub-steps, the system outputs the following two types of data:

[0170] (1) The sub-problem set Q′ after splitting and rewriting sub ;

[0171] (2) Set of entities related to the problem

[0172] These outputs will serve as important inputs to the multi-way recall module in the next stage, used to accurately locate relevant information in the heterogeneous knowledge base.

[0173] Step 2: The second step of the present invention is to build a multimodal retrieval mechanism for heterogeneous knowledge sources based on the results of question decomposition and entity recognition. This module uses a dual-tower semantic matching model to perform parallel searches in a heterogeneous knowledge base containing structured knowledge graphs and unstructured text data, respectively, to obtain the top k most relevant text fragments and knowledge graph subgraphs for each subquestion, thereby providing comprehensive and diverse information support for subsequent reasoning.

[0174] The following sub-steps are included:

[0175] S2.1 Constructing heterogeneous knowledge base index;

[0176] Heterogeneous knowledge base used in this invention It consists of two parts:

[0177] (1) Structured Knowledge Graph in Represents a collection of entities, Represents a set of relations;

[0178] (2) Unstructured text library in Represents the jth text content.

[0179] The system pre-indexes these two types of knowledge sources and maps them into a unified vector space using graph embedding and text embedding methods. to support subsequent semantic matching.

[0180] S2.2 Construction of the double-tower semantic matching model;

[0181] For each rewritten subproblem The system uses a double-tower semantic matching model f match (·) for retrieval. The model consists of two independent encoders:

[0182] (1) Query the encoder

[0183] For the rewritten subproblem q, query the encoder E q Map it to vector v q :

[0184] v q =E q (q) = f(W q ·φ(q)+b q ) (6)

[0185] (2) Knowledge Encoder

[0186] For a knowledge item k, the knowledge encoder E k Map it to vector v k :

[0187] v k =E k (k) = g(W k ·ψ(k)+b k ) (7)

[0188] Then the semantic similarity between the query and the knowledge item can be defined as:

[0189]

[0190] in Represents an arbitrary item of knowledge.

[0191] Contrastive Loss is used as the training objective, aiming to maximize the similarity between positive sample pairs while minimizing the similarity between negative sample pairs. The loss function is defined as follows:

[0192]

[0193] in:

[0194] (q,k + ) represents a query and its corresponding positive sample (i.e., related knowledge item);

[0195] k - Represents negative samples (irrelevant knowledge items);

[0196] m is the margin, which is used to ensure that the similarity between positive sample pairs is significantly higher than that between negative sample pairs.

[0197] S2.3 Multi-source recall strategy;

[0198] Based on the similarity function above, the system performs Top-k search on two types of knowledge sources:

[0199] (1) Unstructured text recall

[0200] In the text library The system calculates all texts and q′ i The similarity scores of are calculated and the top k text segments with the highest scores are selected as candidate answers:

[0201]

[0202] (2) Structured knowledge graph recall

[0203] In the knowledge graph The system first locates the entity e∈E in the subproblem i Related adjacent nodes, build local subgraph Then the subgraph is scored based on the query semantics.

[0204] Subgraph scoring function S(G sub,i |q i ) is defined as the query vector The weighted average similarity with all node embedding vectors in the subgraph:

[0205]

[0206] in:

[0207] V sub,i Represents the local subgraph Gsub,i The set of all nodes in ;

[0208] w j is node v j The weight of the node can be determined based on the distance from the node to the query entity or other relevance metrics;

[0209] Calculating query vectors and node embedding vector v j The similarity between them is expressed using cosine similarity:

[0210] This formula is used to quantify the relevance of a local subgraph to the query semantics, so as to filter out the top K most relevant subgraphs from the knowledge graph.

[0211] Finally, the top k subgraphs with the highest similarity are selected:

[0212]

[0213] S2.4 output results;

[0214] After the above recall process, the system generates a i The following two types of information are obtained:

[0215] (1) The corresponding first k relevant text fragments

[0216] (2) The corresponding top k related knowledge graph subgraphs

[0217] These results will serve as important input to the next stage summary extraction and fusion module to generate preliminary answers and support subsequent reflection iterative optimization.

[0218] Step 3: The third step of the present invention involves the summary extraction agent performing semantic fusion and information extraction on the text fragments and knowledge graph subgraphs output by the multi-way recall module. This module uses a large language model (LLM)-based information filtering mechanism to remove redundant and irrelevant content from a large amount of candidate information. It then generates a clearly structured, semantically focused summary for each sub-question, providing high-quality knowledge input for subsequent reasoning.

[0219] The following sub-steps are included:

[0220] S3.1 Input data preparation

[0221] The summary extraction module receives the results from the multi-way recall stage:

[0222] For the i-th subproblem q′ i , and its corresponding unstructured text recall result is

[0223] The corresponding knowledge graph subgraph recall result is

[0224] in, represents the top k relevant knowledge items recalled in the text base and graph respectively.

[0225] S3.2 Noise information filtering and semantic scoring;

[0226] In order to improve the quality of information, the system first uses the pre-trained language model M LLM Perform semantic evaluation on all recalled contents and calculate their correlation with the current sub-question q′ i Relevance score:

[0227] s t (t ij )=f score (q′ i , t ij )=Sim LLM (E(q′ i ),E(t ij )) (13)

[0228] s g (g ij )=f score (q′ i ,g ij )=Sim LLM (E(q′ i ),E(g ij )) (14)

[0229] in:

[0230] E(·) represents the embedding vector extracted by LLM;

[0231] Sim LLM (·,·) represents the function used within the language model to measure semantic similarity (such as dot product or cosine similarity);

[0232] s t (·) and s g (·) denote the relevance scores of text segments and graph subgraphs, respectively.

[0233] The system then sets a threshold θ and only retains content with a score higher than this threshold:

[0234]

[0235] S3.3 Targeted information extraction and summary generation;

[0236] After noise filtering is completed, the system further calls the LLM model to integrate information and generate summaries for the retained text and graph content. Specifically, a summary generation function f is defined summarize (·), whose input is the question context q′ i and filtered collections of knowledge content Output is structured summary information a i :

[0237]

[0238] This function is implemented as follows:

[0239] (1) For each knowledge item Extract the related keyword set W j =Keywords(k j );

[0240] (2) Construct keyword co-occurrence graph G KW =(W, E), where node w∈W represents a keyword and edge e uv ∈E means that two keywords co-occur in multiple knowledge items;

[0241] (3) Using Graph Neural Network (GNN) to KW Perform semantic aggregation to obtain the core keyword weight distribution α={α1,α2,...,α |W|};

[0242] (4) Using LLM to generate question-oriented q′ based on keyword weights and original knowledge content i Abstract text of a i .

[0243] S3.4 output results;

[0244] The summary extraction module ultimately outputs the following two types of information:

[0245] (1) For each sub-problem q′ i Summary information of α i , as input to subsequent reflection iteration modules;

[0246] (2) Corresponding keyword weight distribution α i , used to assist in explaining the source and credibility of the summary content.

[0247] This module effectively improves the answer quality and explainability of the question-answering system, laying a solid foundation for accurate reasoning in complex tasks.

[0248] Step 4: The fourth step of the present invention involves the reflective iterative agent performing logical verification and quality assessment on the answers generated by the summary extraction module. This module uses a threshold mechanism, combined with the importance weights of the sub-questions, and a large language model (LLM) to score and reflectively optimize the generated answers, ensuring that the final output meets the system's preset standards for semantic accuracy, information completeness, and reasoning consistency.

[0249] The following sub-steps are included:

[0250] S4.1 Input data preparation;

[0251] The Reflection Iteration module receives the following inputs:

[0252] (1) The i-th sub-problem q′ after decomposition i

[0253] (2) The preliminary answer a output by the summary extraction module i

[0254] (3) Entity set E corresponding to the sub-problem i ={e i1 , e i2 ,...,e im}

[0255] At the same time, the system assigns a weight ω to each subproblem i ∈[0, 1], indicating its importance in the entire problem:

[0256]

[0257] Where n is the total number of subproblems.

[0258] S4.2 Answer scoring and quality assessment;

[0259] The system uses a pre-trained language model M LLM For each answer a i Conduct multi-dimensional scoring, including:

[0260] (1) Semantic match: measures the semantic consistency between the answer and the question;

[0261] (2) Information completeness: Determine whether the answer covers all key entities mentioned in the question;

[0262] (3) Logical consistency: Evaluate whether there are logical contradictions within the answer.

[0263] The scoring function is defined as:

[0264] s i =f score (q′ i , ai )∈[0,1] (19)

[0265] where f score (·) is a comprehensive scoring function implemented by LLM, integrating the above multiple evaluation dimensions.

[0266] The final weighted score is calculated as follows:

[0267]

[0268] S4.3 Reflection and iteration mechanism;

[0269] The system sets a threshold τ∈[0, 1] to determine whether the current answer meets the output standard:

[0270] (1) If S ≥ τ, the current answer is considered to be of good quality and the final answer is output;

[0271] (2) If S < τ, the process enters the reflective iteration phase, with a maximum of three iterations allowed.

[0272] During each iteration, the system does the following:

[0273] Change the current answer to a i and ratings i Input LLM and guide it to generate reflective feedback information r i , point out the problems in the answer;

[0274] Using reflective feedback i With the original problem q′ i As a new prompt, regenerate the optimized answer a′ i ;

[0275] Update the current weighted score S and determine whether the output condition is met.

[0276] Formally, the update process of the tth iteration is expressed as:

[0277]

[0278]

[0279] If in a certain iteration S (t) ≥τ or reaches the maximum number of iterations T max =3, then terminate the iteration process and output the final answer:

[0280]

[0281] S4.4 output results;

[0282] The reflection and iteration module ultimately outputs the following two types of information:

[0283] (1) Final integrated answer A final ;

[0284] (2) Reflective feedback information r for each sub-question i , which can be used to explain the answer optimization process and enhance the interpretability of the system.

[0285] By introducing a scoring mechanism and iterative optimization strategy, this module significantly improves the robustness and accuracy of the question-answering system in handling complex tasks. It is particularly suitable for application scenarios with high requirements on answer quality.

[0286] Example 1

[0287] This embodiment is used for medical diagnosis consultation:

[0288] User question: "I've been experiencing fatigue, headaches, and occasional rapid heartbeats lately. What could be causing this?"

[0289] Problem decomposition and structured processing: The system first breaks down the problem into several more specific sub-questions, such as, "What diseases may cause persistent fatigue?", "What factors cause headaches?" and "What are the potential medical causes of rapid heartbeat?" while identifying key symptoms such as fatigue, headaches and rapid heartbeat.

[0290] Multi-way recall retrieval mechanism: Based on the above sub-questions, the system searches heterogeneous knowledge bases, including structured knowledge graphs (such as medical databases) and unstructured text data (such as medical literature). Using a dual-tower semantic matching model, it searches these resources for the most relevant answer fragments and knowledge graph subgraphs for each sub-question.

[0291] Summarization and information extraction: Filter out the most important content from the retrieved information and generate concise and clear summary of the answer. For example, "Fatigue may be caused by anemia or hypothyroidism; headache may be due to migraine or tension headache; rapid heartbeat may indicate arrhythmia."

[0292] Reflection and Iteration: The system scores and optimizes the generated answers. Answers are first scored based on multiple dimensions, such as semantic alignment, information completeness, and logical consistency. If the score falls below a preset threshold, the system enters a reflection and iteration phase. The system analyzes the shortcomings of the current answer and utilizes a large language model to generate a new, improved answer. This process is repeated up to three times to ensure that the final output meets the system's preset standards.

[0293] Example 2

[0294] This embodiment is used for legal consultation:

[0295] User asked: "I encountered a situation in my lease contract where the landlord did not provide maintenance services as agreed. What should I do?"

[0296] Problem decomposition and structured processing: The system breaks down the problem into several smaller questions, such as, "What are the tenant's rights in the lease contract?", "How do I formally notify the landlord to fulfill their maintenance obligations?", "What legal measures can I take if the landlord does not respond?" and identifies key entities such as the lease contract, landlord, and maintenance service.

[0297] Multi-channel recall retrieval mechanism: Based on these sub-questions, the system searches legal databases and case law for relevant information, obtaining content such as the provisions of the Lease Contract Law and relevant case analysis. Using a dual-tower semantic matching model, the system searches these resources for the most relevant answer fragments and legal provisions for each sub-question.

[0298] Summary extraction and information refinement: The system extracts the most critical content from the retrieved information and generates a concise and clear summary of the answer. For example, "According to Article X of the Lease Contract Law, tenants have the right to require the landlord to make necessary repairs in a timely manner. If the landlord fails to comply, you can file a formal complaint in writing and consider filing a lawsuit in the local court to protect your rights."

[0299] Reflection and Iteration: The system scores and refines the generated answers. The system first evaluates the quality of the answers, including whether they accurately reflect the legal provisions, whether all key points are fully covered, and whether there are any logical contradictions. If the answer does not meet the preset standards, the system will use a large language model to provide reflective feedback, identify areas for improvement, and attempt to generate an optimized answer. This process is repeated up to three times until the answer meets the system's quality requirements.

Claims

1. A multi-agent collaborative question-answering enhancement method based on heterogeneous data knowledge, characterized by: The following steps are involved: Step 1: The planning and optimization agent performs structured processing on the complex natural language input question. The large language model (LLM) is used to decompose the original question into several semantically clear and logically independent sub-questions. Named entity recognition (NER) is performed on each sub-question to extract key entity information. Step 2: Based on the results of question decomposition and entity recognition, a multimodal retrieval mechanism is constructed for heterogeneous knowledge sources. The multi-recall agent uses a dual-tower semantic matching model to perform parallel searches in a heterogeneous knowledge base containing structured knowledge graphs and unstructured text data. It obtains the top k most relevant text fragments and knowledge graph subgraphs for each sub-question, providing comprehensive and diverse information support for subsequent reasoning. Step 3: The summary extraction agent performs semantic fusion and information extraction on the text fragments and knowledge graph subgraphs output by the multi-way recall module; By introducing an information screening mechanism based on a large language model (LLM), redundant and irrelevant content is removed from candidate information, and a clearly structured and semantically focused summary is generated for each sub-question, providing high-quality knowledge input for subsequent reasoning. Step 4: The reflective iterative agent performs logical verification and quality assessment on the answers generated by the summary extraction module; By setting a threshold mechanism and combining the importance weights of sub-questions, the generated answers are scored and reflected upon using the large language model (LLM), ensuring that the final output meets the system's preset standards in terms of semantic accuracy, information completeness, and reasoning consistency.

2. The multi-agent collaborative question-answering enhancement method based on heterogeneous data knowledge according to claim 1 is characterized in that: Step 1 includes the following sub-steps: S1.1 Preliminary decomposition of complex issues; First, the system receives a complex question Q∈L input by the user, where L represents the natural language space. It then uses a pre-trained large language model (LLM) to perform semantic understanding and task analysis, and outputs a set of independent and logically coherent sub-questions: in represents the set of subproblems, n represents the number of subproblems, q i represents the i-th sub-problem; the splitting process is based on contextual semantic relationship modeling to ensure that each sub-problem has clear semantic boundaries and reasoning goals; Semantic rewriting of sub-problems S1.2; For each subproblem q i Perform semantic rewriting to generate a more expressive question expression: q′ i =f rewrite (q i ) (2) where q′ i represents the subproblem after semantic rewriting, f rewrite (·) is a semantic rewriting function driven by the language model, which is used to remove ambiguity, standardize expressions, and enhance keyword features, ultimately obtaining an optimized set of sub-problems: S1.3 Named Entity Recognition and Entity Extraction; After completing the subproblem rewriting, the system calculates i Perform named entity recognition (NER) operations to identify key entities related to the question; let the entity recognition model be M NER , then for each subproblem q i ,have: Among them E i Represents subproblem q′ i Entity set, e i Represents the entity set involved in the i-th sub-problem, m i Indicates the number of entities identified in this subproblem; finally, the entity information of all subproblems is aggregated to form a global entity set: in Indicates the total number of entities involved in the problem; S1.4 output results; The system outputs the following two types of data: (1) The sub-problem set Q′ after splitting and rewriting sub ; (2) Set of entities related to the problem 3. The method for enhancing multi-agent collaborative question-answering based on heterogeneous data knowledge according to claim 2 is characterized in that: Step 2 includes the following sub-steps: S2.1 Constructing heterogeneous knowledge base index; Heterogeneous knowledge base It consists of two parts: (1) Structured Knowledge Graph in Represents a collection of entities, Represents a set of relations; (2) Unstructured text library in Indicates the text content of article j; The system pre-indexes these two types of knowledge sources and maps them into a unified vector space using graph embedding and text embedding methods. In order to support subsequent semantic matching; S2.2 Construction of the double-tower semantic matching model; For each rewritten subproblem The system uses a double-tower semantic matching model f match (·) for retrieval; the model includes two independent encoders: (1) Query the encoder For the rewritten subproblem q, query the encoder E q Map it to vector v q : v q =E q (q)=f(W q ·φ(q)+b q ) (6) (2) Knowledge Encoder For a knowledge item k, the knowledge encoder E k Map it to vector v k : v k =E k (k)=g(W k ·ψ(k)+b k ) (7) Then the semantic similarity between the query and the knowledge item is defined as: in represents any item of knowledge; The contrast loss is used as the training objective, aiming to maximize the similarity between positive sample pairs and minimize the similarity between negative sample pairs; the loss function is defined as follows: in: (q, k + ) represents a query and its corresponding positive sample (i.e., related knowledge item); k - Represents negative samples (irrelevant knowledge items); m is the margin, which is used to ensure that the similarity between positive sample pairs is significantly higher than that between negative sample pairs; S2.3 Multi-source recall strategy; The system performs Top-k search on two types of knowledge sources based on the similarity function: (1) Unstructured text recall In the text library The system calculates all texts and q′ i The similarity scores of are calculated and the top k text segments with the highest scores are selected as candidate answers: (2) Structured knowledge graph recall In the knowledge graph The system first locates the entity e∈E in the subproblem i Related adjacent nodes, build local subgraph Then the subgraph is scored based on the query semantics; Subgraph scoring function S(G sub,i |q i ) is defined as the query vector The weighted average similarity with all node embedding vectors in the subgraph: in: V sub,i Represents the local subgraph G sub,i The set of all nodes in ; w j is node v j The weight of the node is determined based on the distance from the node to the query entity or other relevance metrics; Calculating query vectors and node embedding vector v j The similarity between them is expressed using cosine similarity: This formula is used to quantify the relevance of a local subgraph to the query semantics, so as to filter out the top K most relevant subgraphs from the knowledge graph; Finally, the top k subgraphs with the highest similarity are selected: S2.4 output results; After the above recall process, the system generates a i The following two types of information are obtained: (1) The corresponding first k relevant text fragments (2) The corresponding top k related knowledge graph subgraphs 4. The method for enhancing multi-agent collaborative question-answering based on heterogeneous data knowledge according to claim 3 is characterized in that: Step 3 includes the following sub-steps: S3.1 Input data preparation The summary extraction module receives the results from the multi-way recall stage: For the i-th subproblem q′ i , and its corresponding unstructured text recall result is The corresponding knowledge graph subgraph recall result is in, represents the top k relevant knowledge items recalled in the text base and graph respectively; S3.2 Noise information filtering and semantic scoring; First, use the pre-trained language model M LLM Perform semantic evaluation on all recalled contents and calculate their correlation with the current sub-question q′ i Relevance score: s t (t ij )=f score (q′ i ,t ij )=Sim LLM (E(q′ i ),E(t ij )) (13) s g (g ij )=f score (q i ,g ij )=Sim LLM (E(q i ),E(g ij j)) (14) in: E(·) represents the embedding vector extracted by LLM; Sim LLM (·,·) represents the function used within the language model to measure semantic similarity; s t (·) and s g (·) denotes the relevance scores of text segments and graph subgraphs, respectively; The system then sets a threshold θ and only retains content with a score above this threshold: S3.3 Targeted information extraction and summary generation; After noise filtering, the system further uses the LLM model to integrate information and generate summaries for the retained text and graph content; Specifically, define a summary generation function f summarize (·), whose input is the question context q′ i and filtered collections of knowledge content Output is structured summary information a i : This function is implemented as follows: (1) For each knowledge item Extract the related keyword set W j =Keywords(k j ); (2) Construct keyword co-occurrence graph G KW =(W, E), where node w∈W represents a keyword and edge e uv ∈E means that two keywords appear together in multiple knowledge items; (3) Using Graph Neural Network (GNN) to KW Perform semantic aggregation to obtain the core keyword weight distribution α={α1,α2,...,α |W| }; (4) Using LLM to generate question-oriented q′ based on keyword weights and original knowledge content i Abstract text of a i ; S3.4 output results; The summary extraction module ultimately outputs the following two types of information: (1) For each sub-problem q′ i Summary information of a i , as input to subsequent reflection iteration modules; (2) Corresponding keyword weight distribution α i , used to assist in explaining the source and credibility of the summary content.

5. The method for enhancing multi-agent collaborative question-answering based on heterogeneous data knowledge according to claim 4 is characterized in that: Step 4 includes the following sub-steps: S4.1 Input data preparation; The Reflection Iteration module receives the following inputs: (1) The i-th sub-problem q′ after decomposition i (2) The preliminary answer a output by the summary extraction module i (3) Entity set E corresponding to the sub-problem i ={e i1 , e i2 ,...,e im } At the same time, the system assigns a weight ω to each subproblem i ∈[0, 1], indicating its importance in the entire problem: Where n is the total number of subproblems; S4.2 Answer scoring and quality assessment; The system uses a pre-trained language model M LLM For each answer a i Conduct multi-dimensional scoring, including: (1) Semantic match: measures the semantic consistency between the answer and the question; (2) Information completeness: Determine whether the answer covers all key entities mentioned in the question; (3) Logical consistency: assess whether there are logical contradictions within the answer; The scoring function is defined as: s i =f score (q′ i ,a i )∈[0,1] (19) where f score (·) is the comprehensive scoring function implemented by LLM, integrating the above multiple evaluation dimensions; The final weighted score is calculated as follows: S4.3 Reflection and iteration mechanism; The system sets a threshold τ∈[0, 1] to determine whether the current answer meets the output standard: (1) If S ≥ τ, the current answer is considered to be of good quality and the final answer is output; (2) If S < τ, then enter the reflective iteration phase, allowing a maximum of 3 iterations; During each iteration, the system does the following: Change the current answer to a i and ratings i Input LLM and guide it to generate reflective feedback information r i , point out the problems in the answer; Using reflective feedback i With the original problem q′ i As a new prompt, regenerate the optimized answer a′ i ; Update the current weighted score S and determine whether the output conditions are met; Formally, the update process of the tth iteration is expressed as: If in a certain iteration S (t) ≥τ or reaches the maximum number of iterations T max =3, then terminate the iteration process and output the final answer: S4.4 output results; The reflection and iteration module ultimately outputs the following two types of information: (1) Final integrated answer A final ; (2) Reflective feedback information r for each sub-question i , used to explain the answer optimization process and enhance the interpretability of the system.

6. A multi-agent collaborative question-answering enhancement system based on heterogeneous data knowledge, characterized by: A method for implementing a multi-agent collaborative question-answering enhancement method based on heterogeneous data knowledge as described in any one of claims 1 to 5, comprising a question decomposition agent, a multi-way recall agent, a summary extraction agent, and a reflection and iteration agent; Problem-breaking agents are used to break down complex problems into more manageable smaller ones; Multi-way recall agents enable efficient retrieval in both structured and unstructured data; The summary extraction agent focuses on extracting key information from the retrieval results; The reflective iterative agent performs logical verification and optimization based on the intermediate results to improve the quality of the final answer.

Citation Information

Cited By

  • Video retrieval method based on retrieval agent

    CN120892603A

  • A video retrieval method based on retrieval agent

    CN120892603B

  • Large model question and answer method and system based on knowledge base

    CN120929576A

  • A knowledge base-based large model question answering method and system

    CN120929576B

  • Multi-agent cooperation enhancement method, system and equipment based on knowledge graph

    CN121031647A