Multi-hop RAG question and answer method and system based on path exploration and hyperbolic refining

By dynamically constructing inference trees and hyperbolic refinement, the problems of inference path rigidity and evidence noise in multi-hop RAG question-answering systems are solved, achieving more efficient and accurate multi-hop question-answering and knowledge reasoning.

CN120611030AActive Publication Date: 2025-09-09STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO +1

Patent Information

Application Number
CN202511105844.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-08
Publication Date
2025-09-09
Estimated Expiration
2045-08-08

AI Technical Summary

Technical Problem

When processing complex multi-hop queries, the existing multi-hop RAG question answering system has rigid reasoning paths and evidence noise interference, resulting in poor question answering results and making it difficult to meet the needs of complex problems.

Method used

A multi-hop RAG question-answering method based on path exploration and hyperbolic refinement is adopted. A dynamic inference tree is constructed through Monte Carlo tree search. Highly relevant evidence is screened using hyperbolic space mapping and graph attention network, and the answer is generated in combination with the language model.

Benefits of technology

It improves the coherence and accuracy of multi-hop question answering, optimizes the relevance and robustness of evidence screening, and enhances the interpretability and flexibility of reasoning paths. It is suitable for complex multi-hop question answering and knowledge reasoning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120611030A_ABST
    Figure CN120611030A_ABST
Patent Text Reader

Abstract

The invention relates to a multi-hop RAG question and answer method and system based on path exploration and hyperbolic refining. The method and system are used for solving the problems of reasoning path stiffness and evidence noise interference in the multi-hop question and answer process. The method comprises the steps that complex multi-hop query is received, a multi-level path exploration search strategy is adopted, a hierarchical inference tree is constructed through Monte Carlo tree search, and atomic operations such as direct answering, retrieval answering and sub-question decomposition are sequentially executed to explore an optimal inference path; performing hyperbolic refining on candidate evidences retrieved in the construction process, constructing an evidence graph and performing information spreading by using a graph attention network, thereby performing dynamic reordering and noise suppression on the evidences; and recursively aggregating the processed intermediate question and answer results from bottom to top, and generating a final answer by combining an original query calling language model. According to the method, the continuity and accuracy of multi-hop reasoning are effectively improved, and the method is suitable for natural language processing application such as complex questions and answers and knowledge reasoning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural language processing, and in particular to a multi-hop RAG question-answering method and system based on path exploration and hyperbolic refinement. Background Art

[0002] With the continuous advancement of artificial intelligence and natural language processing technologies, multi-hop question answering (QA) has enormous application value in a variety of fields, including information retrieval, intelligent customer service, medical diagnosis, and legal consulting. Many practical problems involve cross-domain knowledge and hierarchical reasoning processes, making single-step QA inadequate for solving complex problems. To address this, Retrieval-Augmented Generation (RAG) has emerged as a key technical approach to addressing complex multi-hop QA by combining external retrieval evidence with the powerful language understanding capabilities of generative models.

[0003] However, multi-hop RAG faces numerous technical challenges in its implementation. Key technical difficulties in multi-hop question answering include effectively decomposing complex queries, constructing a rational multi-level reasoning path, and balancing the relationship between direct generation and reliance on retrieved evidence. Furthermore, the diversity and potential noise of candidate evidence significantly disrupt the continuity of the reasoning path and the accuracy of the answers, making it difficult to ensure the stability of the overall system.

[0004] Current multi-hop RAG techniques generally rely on predefined rules or static knowledge graphs to construct reasoning paths, limiting their ability to capture the inherent logical relationships in complex queries. Furthermore, existing methods often lack effective sorting and noise filtering mechanisms for retrieved evidence, leading to redundant information being mixed into the final answer, compromising both the effectiveness of the question-answering process and its semantic coherence. These shortcomings make it difficult for existing techniques to fully meet the demands of practical applications when dealing with highly complex, multi-information-intensive problems. Summary of the Invention

[0005] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and provide a multi-hop RAG question answering method and system based on path exploration and hyperbolic refinement, so as to solve or partially solve the problems of fixed and rigid reasoning paths and the presence of evidence noise interference.

[0006] The purpose of the present invention can be achieved by the following technical solutions: According to one aspect of the present invention, a multi-hop RAG question-answering method based on path exploration and hyperbolic refinement is provided, comprising the following steps: Obtaining a multi-hop query input, constructing a multi-level inference tree based on a recursive path exploration search strategy, and obtaining the optimal subtree through Monte Carlo tree search, wherein the path exploration search strategy includes direct answer, post-retrieval answer, and sub-question decomposition; During the path exploration search process, for the current query, the node of the retrieved answer is used, and multiple candidate evidences retrieved are mapped into the hyperbolic space for hyperbolic refinement, and evidence with high relevance to the current query is screened, and an intermediate answer is generated in combination with the current query as the intermediate node of the inference tree; For each node in the optimal subtree, a final answer is obtained through recursive aggregation.

[0007] As a preferred technical solution, the process of mapping the retrieved multiple candidate evidences into a hyperbolic space for hyperbolic refinement includes the following steps: Constructing an evidence graph structure based on the retrieved multiple candidate evidences; Based on the evidence graph structure, after mapping the query and noise-suppressed Euclidean space embeddings into hyperbolic space, a graph attention network is used to perform graph propagation learning to propagate and update the information of nodes in the evidence graph structure, and the evidence is sorted according to the relative characteristics of the node embedding vectors in the evidence graph structure; The query and evidence are sorted and noise-suppressed in the hyperbolic space embedding mapping, and the similarity is calculated to screen multiple pieces of evidence with the highest relevance to the current query.

[0008] As a preferred technical solution, the inference tree includes the following types of nodes that appear alternately according to the tree level: Operation status nodes, including information about the adopted path exploration and search strategy; Text nodes include the current query, evidence, and answer information.

[0009] As an optimal technical solution, the root node of the inference tree is a text class node. After selecting a path exploration search strategy for the query in the text class node, a node of the operation status class is obtained, and the corresponding text class sub-node is further obtained according to the selected path exploration search strategy.

[0010] As a preferred technical solution, in the process of recursively constructing the inference tree, the condition for stopping the recursion is that a preset tree height limit is reached, or all sub-problems are single-hop problems.

[0011] As a preferred technical solution, the Monte Carlo tree search process includes the following steps: Selection: Based on the number of node visits and cumulative scores, the optimal node N to be expanded is selected in the current tree using the upper confidence bound criterion; Exploration: Use multiple path exploration search strategies for node N; Extension: insert the new nodes and their intermediate answers obtained in the exploration step into the inference tree; Backtracking: Update the statistics of the ancestor nodes based on the evaluation score of the new node to guide subsequent selections.

[0012] As a preferred technical solution, the process of obtaining query output through recursive aggregation includes: The nodes in the optimal subtree are recursively aggregated from the bottom up and combined with the original query input. The final query output is generated by calling the language model. For each layer of text-type nodes in the optimal subtree, the current query and the corresponding answer are prompted to enable the large language model to summarize the answer to the current query layer by layer, and finally aggregated into the answer to the initial query.

[0013] As a preferred technical solution, the process of generating an intermediate answer includes the following steps: Based on the filtered evidence that is highly relevant to the current query and the current query, a language model is used to generate an intermediate answer.

[0014] As a preferred technical solution, the path exploration search strategy also includes directly answering simple or single-hop questions using a language model.

[0015] Another aspect of the present invention provides a multi-hop RAG question-answering system based on path exploration and hyperbolic refinement, for implementing the aforementioned multi-hop RAG question-answering method based on path exploration and hyperbolic refinement. The multi-hop RAG question-answering system includes: A multi-level path exploration module, which is used to obtain multi-hop query input, construct a multi-level inference tree based on a recursive path exploration search strategy, and obtain the optimal subtree through Monte Carlo tree search. The path exploration search strategy includes direct answer, post-retrieval answer, and sub-question decomposition; A hyperbolic evidence refinement module is used to map multiple retrieved candidate evidences into a hyperbolic space for hyperbolic refinement during the path exploration search process, using the nodes of the retrieved answers for the current query, screening evidence with high relevance to the current query, and generating an intermediate answer in combination with the current query as an intermediate node of the inference tree; The answer aggregation unit is used to obtain a final answer by recursively aggregating each node in the optimal subtree.

[0016] Compared with the prior art, the present invention has at least one of the following beneficial effects: (1) Improved consistency and accuracy of multi-hop reasoning: The present invention effectively solves the problems of rigid reasoning paths and evidence noise interference in the existing technology by dynamically constructing an inference tree and performing hyperbolic refinement on candidate evidence. The method effectively improves the consistency and accuracy of multi-hop reasoning and is suitable for natural language processing applications such as complex multi-hop question answering and knowledge reasoning.

[0017] (2) Optimized the relevance and robustness of evidence screening: The present invention first maps the retrieved candidate evidence into a hyperbolic space and then refines it with a graph attention network. By leveraging the hierarchical advantages of hyperbolic geometry to dynamically reorder and suppress noise on the evidence, the relevance and quality of the screened evidence are effectively improved, thereby enhancing the robustness and accuracy of the question-answering system in complex scenarios.

[0018] (3) Enhanced interpretability and flexibility of the reasoning path: The present invention dynamically constructs a hierarchical reasoning tree based on Monte Carlo tree search, alternately using operation state nodes and text nodes to clearly present each step of the strategy selection and answer generation process; this structure not only improves the transparency of the reasoning process, but also can flexibly adjust the depth and branches of the tree according to the query complexity, thereby improving the controllability of the overall system. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 Flowchart of the multi-hop RAG question-answering method based on path exploration and hyperbolic refinement in an embodiment; Figure 2 Schematic diagram of the framework of the multi-hop RAG question-answering method in the embodiment; Figure 3 Schematic diagram of a multi-hop RAG question-answering system based on path exploration and hyperbolic refinement in an embodiment; Figure 4 A histogram showing the test results of an ablation experiment on the absolute match (EM) value of the multi-hop RAG method in the embodiment; Figure 5 A histogram of the test results of the ablation experiment on the F1 value (F1 Score) of the multi-hop RAG method in the embodiment; Figure 6 Schematic diagram of an electronic device in an embodiment. DETAILED DESCRIPTION

[0020] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0021] Example 1 In order to solve the problems existing in the above-mentioned prior art, this embodiment provides a multi-hop RAG question answering method based on path exploration and hyperbolic refinement. Figure 1 , the method comprises the following steps: Step S1: receiving an input including a complex multi-hop query and processing the query using a multi-level path exploration search strategy.

[0022] Specifically, an input containing a complex multi-hop query is received, and the query is processed using a multi-level path exploration search strategy. The exploration strategy includes three atomic operations: direct answer, retrieved answer, and sub-problem decomposition. A hierarchical reasoning tree is constructed based on the Monte Carlo Tree Search (MCTS) strategy, and the node with the highest score in the current path is selected according to the score of each node N selected in the MCTS strategy, ultimately forming an optimal subtree as the multi-hop solution path.

[0023] In step S2, the retrieved multiple candidate evidences are mapped to a hyperbolic space for hyperbolic refinement.

[0024] Specifically, it includes: constructing an evidence graph, using the Graph Attention Network (GAT) for graph propagation learning, and using hypersphere mapping to map the Euclidean embedding to hyperbolic space, thereby achieving dynamic reordering and noise suppression of evidence.

[0025] Step S3, recursively perform and generate an intermediate answer.

[0026] Specifically, the evidence obtained in step S2 that is highly relevant to the current question is combined with the current query, and an intermediate answer is generated by calling the language model as an intermediate node of the reasoning tree.

[0027] In step S4, the nodes in the best answer tree are recursively aggregated from bottom to top to generate the final answer.

[0028] Specifically, the nodes in the best answer tree obtained in step S1 and step S3 are recursively aggregated from bottom to top, combined with the original query, and the final answer is generated by calling the language model.

[0029] In one embodiment, Figure 2 As shown in the figure, the atomic operations under the multi-level exploration path strategy include: direct answer, which directly calls the language model to generate the answer for simple or single-hop queries; answer after retrieval, which calls the language model to generate the answer after appending retrieval evidence information to the query; sub-problem decomposition, which performs semantic decomposition on complex problems, generates several sub-problems, and recursively performs atomic operations until a complete reasoning path is formed.

[0030] Specifically, for direct answers to atomic operations (such as the subquery: What is Maxwell's country?), the prompt project is used to input the question into the Large Language Model (LLM). The large language model includes but is not limited to Mistral-7B, Qwen2-7B, and Qwen2-72B. The LLM directly generates the answer to this query. As an optimal solution, it fully utilizes the rich prior knowledge in the LLM and avoids introducing additional noise that would otherwise reduce the effect. For answers after atomic operation retrieval (such as the subquery: When was the first American Nobel Prize in Physics?), this method connects to the RAG process, that is, the pipeline generated after retrieval to solve simpler queries that require additional knowledge. By starting the initialization search engine such as Best Matching 25, BM25 retrieves relevant evidence from a graph-structured knowledge base (built by matching sentences with keywords or connecting sentences based on semantic similarity) that is relevant to the current query. This evidence is then further filtered through hyperbolic refinement to identify a top-K list of high-quality, pre-test evidence that is highly relevant to the current query. Prompt engineering then enables the LLM to generate the current answer. For atomic sub-problems (e.g., the initial query: Which country won the Nobel Prize in Physics first, the United States or the United States?), Prompt engineering is used to enable the LLM to break down complex multi-hop problems into several logically simpler ones for step-by-step solution. Answering all sub-problems is a preferred approach. Traditional RAG processes focus more on retrieval and fail to adequately address the reasoning requirements of multi-hop problems. Decomposing multi-hop problems into sub-problems effectively achieves this. It is important to note that the templates in the Prompt engineering described above are carefully designed.

[0031] In one embodiment, Figure 2As shown in the figure, the structure of the hierarchical reasoning tree includes two different types of nodes: operation state nodes and question-answer text nodes. Specifically, operation state nodes contain the selected atomic operation type, while question-answer text nodes contain the actual current query, evidence, and answer information. The two types of nodes appear alternately according to the tree's hierarchy. The root node is the question-answer text node. After performing an atomic operation on the query contained in the current node, a child node of the operation state class is obtained. Subsequently, corresponding question-answer text subnodes are further obtained based on the atomic operation. The child nodes obtained by the atomic operation direct answer and the answer after retrieval are one, which should contain the answer to the query. The atomic operation subproblem decomposition will cause the tree to branch, resulting in several child nodes containing subproblems. It is important to note that the subproblem decomposition will be performed recursively until the preset tree height limit is reached or all subproblems are confirmed to be single-hop problems.

[0032] In one embodiment, Figure 2 As shown in Figure 1, the MCTS search strategy includes: node selection, exploration, expansion, and backpropagation within a hierarchical inference tree. Specifically, it consists of four steps: Selection: Based on the number of node visits and cumulative scores, the optimal node N to be expanded is selected in the current tree using the upper confidence bound (UCB) criterion; Exploration: Tries the three aforementioned atomic operations on node N; Expansion: Inserts the new node and its intermediate answers obtained in the exploration step into the inference tree; Backpropagation: Updates the statistics of its ancestor nodes based on the evaluation score of the new node to guide subsequent selection. This process is repeated until a halting condition is met (e.g., reaching the maximum number of nodes or obtaining a sufficiently high-scoring subtree), and the "best answer subtree" T is selected from the tree.

[0033] In one embodiment, Figure 2 As shown in the figure, the hyperbolic refinement of candidate evidence includes: constructing a graph structure for multiple retrieved evidences, and using a graph attention network to propagate and update the information between nodes in the graph to dynamically adjust the correlation between each piece of evidence, and sorting and noise suppression of evidence according to the relative characteristics of the embedding vectors.

[0034] Specifically, all evidence retrieved from the initial search is combined with the current query to form a fully connected graph. This assumes that all current evidence and the query are highly correlated. Each piece of evidence and query is treated as a node in the fully connected graph (this graph is not related to the graph structure in the knowledge base). This graph includes: content (evidence or query), graph index in the knowledge base (if any), neighbors in the knowledge base (if any), and content features (such as embeddings). This fully connected graph is then passed through a graph attention network (GAT) for graph propagation learning. After multiple rounds of information propagation, the features of each node in the previously fully connected graph are updated, and the weights of each edge are changed. The GAT has now learned the correlations between the features of the evidence and the query in the graph through the attention mechanism. The top-K highest-weighted evidence features that are most similar to the query features are then reselected, thus finding k pieces of evidence that are highly correlated with the query, further reducing the impact of noise on the LLM. It is worth noting that the embedding model here uses the multifactor dimensionality reduction (MDR) model trained when building the knowledge base.

[0035] In one embodiment, Figure 2 As shown, hypersphere mapping involves mapping query and evidence embeddings from Euclidean space to hyperbolic space, such as the Poincaré sphere model. This overcomes the embedding distortion problem of Euclidean space (when a tree or graph structure has many hops, the embeddings in Euclidean space may exhibit a mismatch, resulting in a low semantic similarity between the actual sentences despite a close Euclidean distance), and better captures the semantic hierarchy between the embeddings. Specifically, during the embedding selection process, the Euclidean embeddings are transformed into hyperbolic embeddings using a special calculation formula between the Poincaré sphere and Euclidean space. It is important to note that the Möbius multiplication and addition operations in hyperbolic space differ somewhat from those in Euclidean space.

[0036] In one embodiment, Figure 2 As shown, bottom-up recursive aggregation involves aggregating the subquestions and corresponding results of each intermediate question and answer from the bottom up, following the hierarchical order of the best answer tree, recursively obtaining the answer to the parent question until the final answer is generated. Specifically, for each question-answer text node in the tree, the current query and corresponding answer are processed through the prompt process, allowing the LLM to summarize the answer to the current query layer by layer, ultimately aggregating the answer to the initial query.

[0037] In summary, compared with the existing technology, the embodiment of the present application proposes a general multi-hop RAG question answering method and framework. First, the question and candidate evidence are mapped to a hyperbolic space and hierarchically refined with the help of a graph attention network, transforming complex knowledge graph reasoning into a simple iterative exploration process; then, the reasoning path is dynamically generated and evaluated through Monte Carlo tree search, and the optimal subtree is selected using a comprehensive scoring function composed of relevance, language model confidence and path length to achieve efficient and accurate answer derivation; the framework supports "plug-and-play (PnP)" style replacement of retrievers, models and graph algorithms to meet the needs of rapid cross-domain transplantation; at the same time, a large language model is introduced to iteratively verify and supervise the intermediate answers, and the multi-hop reasoning capability is cyclically improved; finally, by integrating the natural language interaction advantages of the large language model with the structured reasoning capabilities of the graph reasoning algorithm, a question-answering experience that is both natural, easy to use and highly interpretable is provided to knowledge graph users.

[0038] Example 2 Based on Example 1, this embodiment provides a multi-hop RAG question-answering system based on path exploration and hyperbolic refinement, such as Figure 3 ,include: A multi-level path exploration module 302 is used to process input containing complex multi-hop queries and generate a hierarchical reasoning tree based on Monte Carlo tree search. This module supports atomic operations such as direct answer, searched answer, and sub-question decomposition; The hyperbolic evidence refinement module 304 is used to construct a graph structure, update the graph attention propagation, and perform embedding conversion on the candidate evidence retrieved by the multi-level path exploration module, thereby achieving dynamic reordering and noise suppression of the evidence; The answer aggregation unit 306 is used to recursively aggregate the intermediate results generated by the multi-level path exploration module and the hyperbolic refinement module from bottom to top, and generate the final answer by combining it with the original query by calling the language model.

[0039] For specific limitations of the multi-hop RAG system based on path exploration and hyperbolic refinement, please refer to the limitations of the multi-hop RAG method based on path exploration and hyperbolic refinement above, which will not be repeated here.

[0040] Each module in the aforementioned multi-hop RAG system based on path exploration and hyperbolic refinement can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0041] To verify the effectiveness of the solution of the present invention, experimental tests are conducted on the multi-hop RAG method and system based on path exploration and hyperbolic refinement. Benchmark experiments and ablation experiments are carried out respectively, and the experimental results are deeply analyzed to verify the effectiveness of the method and the contribution of each module.

[0042] In one embodiment, the experiment is conducted in the following environment: the hardware is an NVIDIA A800 GPU (80 GB) and an Intel Xeon CPU; the software is Ubuntu 22.04, Python 3.10, PyTorch 2.1, and Transformers 4.35.

[0043] The experiments include benchmarking and ablation experiments. Specifically, the benchmark experiments used four public multi-hop question answering datasets: HotpotQA, 2WikiMultiHopQA, MuSiQue, and MultiHopRAG. The comparison methods included BeamRetrieval, GenGround, OPEN-RAG, and TRACE. The evaluation metrics used were Exact Match (EM) and F1.

[0044] In the ablation experiment, based on the complete method, the following key modules are removed for comparison: path exploration module, hyperbolic refinement module, and answer aggregation unit. The rest of the process remains unchanged, and the benchmark experimental steps are repeated to obtain the EM and F1 of each ablation version.

[0045] As shown in Table 1, the experimental results show good results. Specifically, our method outperforms the comparison methods on all datasets. On the MuSiQue dataset, EM and F1 reach 48.4% and 61.9%, respectively, which are approximately 6.7 percentage points and 6.6 percentage points higher than the OPEN-RAG method. On the 2WikiMultiHopQA dataset, EM improves from 51.6% to 62.6%, and F1 improves from 61.0% to 70.2%.

[0046] Table 1 Benchmark test results

[0047] Reference Figure 4 and Figure 5 The results of the ablation experiment are as follows. Figure 4 and Figure 5 It can be seen that: (1) After removing MCTS, EM on the HotpotQA dataset dropped by about 8% and F1 dropped by about 6%; EM on the MuSiQue dataset dropped by about 12% and F1 dropped by about 10%; (2) After removing the hypersphere mapping, EM on the 2WikiMultiHopQA dataset drops by about 7% and F1 drops by about 8%; (3) After removing recursive aggregation, EM on the MultiHopRAG dataset drops by about 5% and F1 drops by about 4%.

[0048] The experiments fully demonstrate the significant role of the key technologies of multi-level path exploration, hyperbolic evidence refinement and bottom-up recursive aggregation described in the present invention in improving the performance of complex multi-hop question answering. Specifically, the path exploration strategy is a preferred solution. MCTS can balance exploration and utilization in the multi-hop space, effectively restore cross-segment logic, and avoid the spread of erroneous paths. The hyperbolic refinement mechanism is a preferred solution. Hypersphere mapping combined with GAT propagation enhances hierarchical semantic modeling, so that highly relevant evidence obtains a higher ranking weight and improves retrieval accuracy. The recursive aggregation process is also indispensable. Bottom-up aggregation maintains the contextual consistency of the answers to each sub-question, reduces information loss and conflict, and achieves a more coherent final answer. The above all show that the multi-hop RAG method and system based on path exploration and hyperbolic refinement have high versatility and robustness: the present invention performs well in entity-related, wiki-style, complex combination and open domain multi-hop scenarios, verifying the wide applicability of each module design.

[0049] In summary, the present invention effectively addresses existing problems in the prior art, such as rigid reasoning paths and evidence noise, by dynamically constructing an inference tree and performing hyperbolic refinement on candidate evidence. This method effectively improves the coherence and accuracy of multi-hop reasoning and is suitable for natural language processing applications such as complex multi-hop question answering and knowledge reasoning.

[0050] Example 3 Based on the above embodiments, this embodiment provides an electronic device, including: one or more processors and a memory, wherein the memory stores one or more programs, and the one or more programs include instructions for executing the multi-hop RAG question-answering method based on path exploration and hyperbolic refinement as described in Example 1.

[0051] like Figure 6 As mentioned above, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 Of course, in addition to software implementation, the present invention does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0052] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0053] Example 4 This embodiment provides a computer-readable storage medium, including one or more programs for execution by one or more processors of an electronic device, wherein the one or more programs include instructions for executing the multi-hop RAG question-answering method based on path exploration and hyperbolic refinement of Example 1.

[0054] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.

[0055] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and such modifications or substitutions are intended to be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.

Claims

1. A multi-hop RAG question answering method based on path exploration and hyperbolic refinement, characterized in that: The steps include: Obtaining a multi-hop query input, constructing a multi-level inference tree based on a recursive path exploration search strategy, and obtaining the optimal subtree through Monte Carlo tree search, wherein the path exploration search strategy includes direct answer, post-retrieval answer, and sub-question decomposition; During the path exploration search process, for the current query, the node of the retrieved answer is used, and multiple candidate evidences retrieved are mapped into the hyperbolic space for hyperbolic refinement, and evidence with high relevance to the current query is screened, and an intermediate answer is generated in combination with the current query as the intermediate node of the inference tree; For each node in the optimal subtree, a final answer is obtained through recursive aggregation.

2. The multi-hop RAG question answering method based on path exploration and hyperbolic refinement according to claim 1, characterized in that: The process of mapping the retrieved multiple candidate evidences into the hyperbolic space for hyperbolic refinement includes the following steps: Constructing an evidence graph structure based on the retrieved multiple candidate evidences; Based on the evidence graph structure, after mapping the query and noise-suppressed Euclidean space embeddings into hyperbolic space, a graph attention network is used to perform graph propagation learning to propagate and update the information of nodes in the evidence graph structure, and the evidence is sorted according to the relative characteristics of the node embedding vectors in the evidence graph structure; The query and evidence are sorted and noise-suppressed in the hyperbolic space embedding mapping, and the similarity is calculated to screen multiple pieces of evidence with the highest relevance to the current query.

3. The multi-hop RAG question answering method based on path exploration and hyperbolic refinement according to claim 1, characterized in that: The inference tree includes the following types of nodes that appear alternately according to the tree level: Operation status nodes, including information about the adopted path exploration and search strategy; Text nodes include the current query, evidence, and answer information.

4. The multi-hop RAG question answering method based on path exploration and hyperbolic refinement according to claim 3, characterized in that: The root node of the inference tree is a text class node. After selecting a path exploration search strategy for the query in the text class node, a node of the operation state class is obtained, and the corresponding text class child node is further obtained according to the selected path exploration search strategy.

5. The multi-hop RAG question answering method based on path exploration and hyperbolic refinement according to claim 1, characterized in that: In the process of recursively constructing the inference tree, the recursion is stopped when a preset tree height limit is reached or all sub-problems are single-hop problems.

6. The multi-hop RAG question answering method based on path exploration and hyperbolic refinement according to claim 1, characterized in that: The Monte Carlo tree search process includes the following steps: Selection: Based on the number of node visits and cumulative scores, the optimal node N to be expanded is selected in the current tree using the upper confidence bound criterion; Exploration: Use multiple path exploration search strategies for node N; Extension: insert the new nodes and their intermediate answers obtained in the exploration step into the inference tree; Backtracking: Update the statistics of the ancestor nodes based on the evaluation score of the new node to guide subsequent selections.

7. The multi-hop RAG question answering method based on path exploration and hyperbolic refinement according to claim 1, characterized in that: The process of obtaining the query output through recursive aggregation includes: The nodes in the optimal subtree are recursively aggregated from the bottom up and combined with the original query input. The final query output is generated by calling the language model. For each layer of text-type nodes in the optimal subtree, the current query and the corresponding answer are summarized layer by layer through the prompt project in the large language model, and finally aggregated into the answer to the initial query.

8. The multi-hop RAG question answering method based on path exploration and hyperbolic refinement according to claim 1, characterized in that: The process of generating an intermediate answer includes the following steps: Based on the filtered evidence that is highly relevant to the current query and the current query, a language model is used to generate an intermediate answer.

9. The multi-hop RAG question answering method based on path exploration and hyperbolic refinement according to claim 1, characterized in that: The path exploration search strategy also includes using a language model to directly answer simple or single-hop questions.

10. A multi-hop RAG question answering system based on path exploration and hyperbolic refinement, characterized in that: For implementing the multi-hop RAG question-answering method based on path exploration and hyperbolic refinement according to any one of claims 1 to 9, the multi-hop RAG question-answering system comprises: A multi-level path exploration module, which is used to obtain multi-hop query input, construct a multi-level inference tree based on a recursive path exploration search strategy, and obtain the optimal subtree through Monte Carlo tree search. The path exploration search strategy includes direct answer, post-retrieval answer, and sub-question decomposition; A hyperbolic evidence refinement module is used to map multiple retrieved candidate evidences into a hyperbolic space for hyperbolic refinement during the path exploration search process, using the nodes of the retrieved answers for the current query, screening evidence with high relevance to the current query, and generating an intermediate answer in combination with the current query as an intermediate node of the inference tree; The answer aggregation unit is used to obtain a final answer by recursively aggregating each node in the optimal subtree.

Citation Information

Patent Citations

  • Knowledge graph multi-hop question and answer reasoning method and device and computer equipment

    CN116992008A

  • Question and answer reasoning method and system for representing hierarchical hyperbolic graph on knowledge graph

    CN118052289A

  • Multi-modal intelligent medical scene dynamic reasoning method and device based on medical knowledge

    CN119294534A

  • Large language model reasoning question and answer enhancement method for multi-hop question

    CN119378686A

  • Knowledge graph question and answer method based on Monte Carlo tree search and multi-agent cooperation

    CN119884330A

Cited By

  • Enhanced LLM-RAG multi-hop question and answer method based on logic tree reasoning

    CN121212348A