Proposition Combination Optimization Multi-Hop Retrieval Method and Device for Multi-Domain Knowledge Hinges
The method constructs a proposition network from atomic propositions across domains to optimize multi-hop retrieval, addressing inefficiencies in RAG frameworks by enhancing coherence and accuracy in cross-domain knowledge retrieval, ensuring reliable and high-quality answers.
Patent Information
- Application Number
- CN202510485784.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2045-04-17
AI Technical Summary
The existing multi-hop question and answer system has problems such as redundant information, noisy information, long system response time, difficulty in tracking and verifying the reasoning process, and insufficient cross-domain knowledge recognition when dealing with multi-domain knowledge cross-border problems, resulting in poor reasoning effect in complex fields.
By obtaining cross-domain questions and non-structural documents, proposition extraction is carried out to build a proposition network, using entity co-existence relationships to build a multi-domain knowledge hinge, pruning and optimizing the search space, dynamically update candidate proposition combinations, generate the optimal proposition combination set, and input a large language model to generate answers.
It improves the accuracy and interpretability of inference of multi-domain knowledge cross-cutting questions, ensures the reliability and efficiency of answers, and is suitable for complex cross-domain question-and-answer tasks.
Smart Images

Figure CN119988690B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data processing, and particularly to a propositional combination optimization multi-hop retrieval method and device for multi-domain knowledge hinges. Background Art
[0002] With the development of large language model (LLM) technology, multi-hop question answering, as an important application of natural language processing, has received extensive attention in fields such as intelligent question answering systems, knowledge reasoning, and information retrieval. Multi-hop question answering requires the system to extract and combine information from multiple documents and construct answers through multi-step reasoning. To improve the accuracy of answers, the retrieval-augmented generation (RAG) framework is commonly used at present to enhance the generation quality by combining external knowledge bases.
[0003] However, the existing RAG framework has obvious deficiencies in dealing with multi-hop question answering tasks. Due to the use of document-level retrieval methods, the retrieval results often contain a large amount of redundant information, reducing the system efficiency. At the same time, in order to obtain a complete reasoning chain, traditional methods usually adopt a multi-round retrieval strategy, which requires repeatedly calling the large language model for query rewriting. This not only increases the system response time but also easily introduces noise information, affecting the accuracy of reasoning. In addition, due to the strong context dependence between document fragments, it is difficult to trace and verify the reasoning process, affecting the reliability of the system in practical applications.
[0004] Especially in complex problems involving the intersection of multiple domain knowledge, traditional methods face greater challenges. Since most existing retrieval frameworks often focus on knowledge retrieval in a single domain, they fail to effectively capture the internal connections of cross-domain knowledge. This leads to broken chains or incorrect answers in multi-hop reasoning involving fields such as medicine and law. In addition, in these fields, the implicit relationships between knowledge are relatively complex, and existing frameworks often lack the recognition and utilization of these complex connections, resulting in limited effects in practical applications.
[0005] Therefore, traditional methods still face significant challenges, especially when dealing with cross-domain reasoning tasks. It is necessary to find more efficient, accurate, and interpretable retrieval and reasoning methods to meet application scenarios with high requirements for reasoning accuracy and interpretability, thereby ensuring the reliability of the model output content. Summary of the Invention
[0006] Based on this, in view of the above technical problems, it is necessary to provide a propositional combination optimization multi-hop retrieval method and device for multi-domain knowledge hinges.
[0007] A propositional combination optimization multi-hop retrieval method for multi-domain knowledge hinges, the method includes:
[0008] Obtain cross - domain problems and domain - related unstructured documents; the cross - domain problems include at least two different domains; the unstructured documents include domain knowledge;
[0009] Extract propositions from each unstructured document to obtain an atomic proposition set containing multiple atomic propositions;
[0010] Take each atomic proposition in the atomic proposition set as a node, and construct a proposition network according to the entity co - occurrence relationship between atomic propositions; the paths in the proposition network are multi - domain knowledge hinges;
[0011] Initialize several candidate proposition combinations, select the neighbor propositions of each atomic proposition in each candidate proposition combination in the proposition network through a pre - set pruning method, and obtain several new candidate proposition combinations according to each candidate proposition combination and the corresponding neighbor propositions; each candidate proposition combination is a multi - domain knowledge hinge;
[0012] Calculate the combination score according to the similarity between the cross - domain problem and the proposition combination. If the combination score of the new candidate proposition combination is higher than that of the current candidate proposition combination, update the current candidate proposition combination, and iteratively update each candidate proposition combination until the iteration stop condition is met, then output the optimal proposition combination set;
[0013] Input the optimal proposition combination set into a pre - trained large language model to generate an answer corresponding to the cross - domain problem.
[0014] In one embodiment, it further includes: performing semantic segmentation on the unstructured document using a sliding window to obtain multiple segmented contents; using a pre - trained large language model to convert the segmented contents into independent atomic propositions.
[0015] In one embodiment, it further includes: if the atomic propositions share the same entity, there is an entity co - occurrence relationship between the atomic propositions, and connect the atomic propositions with an entity co - occurrence relationship to construct a proposition network.
[0016] In one embodiment, it further includes: splice each atomic proposition in the proposition combination, and perform text encoding on the splicing result to obtain a proposition combination encoding vector; perform text encoding on the cross - domain problem to obtain a cross - domain problem encoding vector; obtain the combination score of the proposition combination according to the similarity between the proposition combination encoding vector and the cross - domain problem encoding vector; the proposition combination includes candidate proposition combinations and new candidate proposition combinations.
[0017] In one embodiment, it further includes: obtaining the set of neighbor propositions of each atomic proposition in the proposition network for each candidate proposition combination; obtaining the direct relevance based on the similarity between each atomic proposition and the cross-domain problem, and obtaining the neighbor relevance based on the similarity between each neighbor proposition in the set of neighbor propositions and the cross-domain problem; calculating the pruning score of each atomic proposition according to the direct relevance of each atomic proposition and the corresponding maximum neighbor relevance; if the pruning score corresponding to the atomic proposition is higher than the threshold, retaining the neighbor proposition corresponding to the maximum neighbor relevance.
[0018] In one embodiment, the pruning score is:
[0019] Score(p) = α·R(p) + (1-α)·maxR(v);
[0020] where p represents the atomic proposition, R(p) represents the direct relevance between p and the cross-domain problem, v represents the neighbor proposition of p, v ∈ N(p), N(p) is the set of neighbor propositions of p, α is the weight coefficient, and R(v) represents the neighbor relevance between v and the cross-domain problem.
[0021] In one embodiment, it further includes: sorting and organizing the optimal proposition combination set to obtain an inference chain, and processing the inference chain through a pre-trained large language model to generate an answer corresponding to the cross-domain problem.
[0022] In one embodiment, it further includes: performing an early stopping check when iteratively updating each candidate proposition combination; the early stopping check includes: obtaining the preset number of early stopping rounds, and if the candidate proposition combination is not updated in multiple consecutive iterations and the number of iteration rounds meets the number of early stopping rounds, terminating the search in advance.
[0023] A proposition combination optimization multi-hop retrieval device for multi-domain knowledge hinges, the device includes:
[0024] A data acquisition module for acquiring cross-domain problems and domain-related unstructured documents; the cross-domain problems include at least two different domains; the unstructured documents include domain knowledge;
[0025] A proposition extraction module for extracting propositions from each unstructured document to obtain an atomic proposition set containing multiple atomic propositions;
[0026] A network construction module for using each atomic proposition in the atomic proposition set as a node and constructing a proposition network according to the entity co-occurrence relationship between atomic propositions; the paths in the proposition network are multi-domain knowledge hinges;
[0027] A pruning module, which is used to initialize several candidate proposition combinations, select the neighbor propositions of each atomic proposition in each candidate proposition combination in the proposition network through a preset pruning method, and obtain several new candidate proposition combinations according to each candidate proposition combination and the corresponding neighbor propositions;
[0028] An updating module, which is used to calculate a combination score according to the similarity between the cross-domain problem and the proposition combination. If the combination score of the new candidate proposition combination is higher than that of the current candidate proposition combination, update the current candidate proposition combination, and iteratively update each candidate proposition combination until the condition for stopping the iteration is met, and then output the optimal proposition combination set;
[0029] An answer generation module, which is used to input the optimal proposition combination set into a pre-trained large language model to generate an answer corresponding to the cross-domain problem.
[0030] A computer device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0031] Obtain a cross-domain problem and domain-related unstructured documents; the cross-domain problem includes at least two different domains; the unstructured documents include domain knowledge;
[0032] Extract propositions from each unstructured document to obtain an atomic proposition set containing multiple atomic propositions;
[0033] Use each atomic proposition in the atomic proposition set as a node, and construct a proposition network according to the entity co-occurrence relationship between atomic propositions; the paths in the proposition network are multi-domain knowledge hinges;
[0034] Initialize several candidate proposition combinations, select the neighbor propositions of each atomic proposition in each candidate proposition combination in the proposition network through a preset pruning method, and obtain several new candidate proposition combinations according to each candidate proposition combination and the corresponding neighbor propositions;
[0035] Calculate a combination score according to the similarity between the cross-domain problem and the proposition combination. If the combination score of the new candidate proposition combination is higher than that of the current candidate proposition combination, update the current candidate proposition combination, and iteratively update each candidate proposition combination until the condition for stopping the iteration is met, and then output the optimal proposition combination set;
[0036] Input the optimal proposition combination set into a pre-trained large language model to generate an answer corresponding to the cross-domain problem.
[0037] A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0038] Obtain cross - domain questions and domain - related unstructured documents; the cross - domain questions include at least two different domains; the unstructured documents include domain knowledge;
[0039] Extract propositions from each unstructured document to obtain an atomic proposition set containing multiple atomic propositions;
[0040] Take each atomic proposition in the atomic proposition set as a node, and construct a proposition network according to the entity co - occurrence relationship between atomic propositions; the paths in the proposition network are multi - domain knowledge hinges;
[0041] Initialize several candidate proposition combinations, select the neighbor propositions of each atomic proposition in each candidate proposition combination in the proposition network through a pre - set pruning method, and obtain several new candidate proposition combinations according to each candidate proposition combination and the corresponding neighbor propositions;
[0042] Calculate the combination score according to the similarity between the cross - domain question and the proposition combination. If the combination score of the new candidate proposition combination is higher than that of the current candidate proposition combination, update the current candidate proposition combination, and iteratively update each candidate proposition combination until the condition for stopping the iteration is met, and then output the optimal proposition combination set;
[0043] Input the optimal proposition combination set into a pre - trained large - language model to generate an answer corresponding to the cross - domain question.
[0044] The above - mentioned proposition combination optimization multi - hop retrieval method and device for multi - domain knowledge hinges. First, obtain cross - domain questions and relevant unstructured documents, extract propositions to generate an atomic proposition set, providing structured information for subsequent reasoning. By identifying the relationships between atomic propositions, construct a proposition network, which can capture semantic connections between different domains, especially the role of cross - domain knowledge hinges, enhancing knowledge fusion and reasoning coherence. Initialize several candidate proposition combinations and optimize the search space through pruning methods to reduce redundant propositions and ensure retrieval efficiency. Calculate the combination score according to the similarity between the cross - domain question and the proposition combination, dynamically update the candidate proposition combination, and finally output the optimal proposition combination set. This process improves the accuracy and relevance of the reasoning chain through iterative optimization. Finally, input the optimal proposition combination into a pre - trained large - language model to generate an answer, ensuring the accuracy and interpretability of the answer. In the embodiments of the present invention, in scenarios of complex problems involving multiple domains, the reliability of the answers output by the large - language model can be improved, and high - quality and accurate content can be efficiently generated to meet the actual application requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 It is a schematic flowchart of a proposition combination optimization multi - hop retrieval method for multi - domain knowledge hinges in an embodiment;
[0046] Figure 2 Schematic diagram for constructing a proposition network in an embodiment
[0047] Figure 3 Overall flowchart of the method framework of the present invention in an embodiment
[0048] Figure 4 Structural block diagram of a proposition combination optimization multi-hop retrieval device for multi-domain knowledge hinges in an embodiment
[0049] Figure 5 Internal structure diagram of a computer device in an embodiment Specific implementation manners
[0050] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0051] In an embodiment, as Figure 1 shown, a proposition combination optimization multi-hop retrieval method for multi-domain knowledge hinges is provided, including the following steps:
[0052] Step 102, obtaining cross-domain problems and domain-related unstructured documents.
[0053] The cross-domain problems include at least two different domains. The unstructured documents include domain knowledge. The present invention has wide application value in professional fields that require rigorous reasoning, especially in scenarios that require connecting multi-domain knowledge. Its efficient information retrieval and interpretable reasoning process provide reliable technical support for complex question-and-answer tasks.
[0054] In the embodiment of the present invention, the cross-domain problem may be the risk factors of a certain disease and its association with lifestyle. In the scenario of multi-domain attribution analysis of chronic disease risk factors, the present invention constructs a two-domain proposition network of medical clinical knowledge and health management data. Through the atomization parsing technology, the system standardizes the representation of clinical entities such as pathological mechanisms and biomarkers in medical literature, and lifestyle entities such as behavior patterns and environmental factors in health monitoring data. Based on the cross-domain knowledge hinge recognition algorithm, the system automatically discovers the association propositions connecting medical diagnosis criteria and lifestyle assessment indicators (such as the interaction relationship between metabolic syndrome and sleep disorder), and constructs a multi-hop reasoning link. When dealing with complex health consultations, the system can quickly generate an integrated decision-making path covering pathological explanations, behavior intervention suggestions and prognosis assessments, significantly improving the cross-domain knowledge collaboration efficiency.
[0055] In addition, it can also be applied to processing complex legal document retrieval and reasoning tasks. For the problem of applying provisions in multiple fields in cross-border legal scenarios, a composite proposition graph covering civil, commercial, and administrative supervision fields is established. Through a legal element deconstruction engine, the system transforms the clause texts of different legal systems into atom propositions with logical associations and identifies the implicit associations of cross-domain legal elements. When dealing with legal reasoning tasks involving multi-jurisdiction collaboration, the system can automatically construct a three-dimensional reasoning network connecting substantive law clauses, procedural law provisions, and regulatory regulations, effectively solving the problem of missing elements caused by traditional single-field retrieval and achieving accurate matching and traceability analysis of multi-dimensional legal elements.
[0056] Step 104: Extract propositions from each unstructured document to obtain an atom proposition set containing multiple atom propositions.
[0057] By splitting the unstructured document into atom propositions, the information of each sentence or paragraph can be transformed into a more basic and structured unit, which helps to eliminate information redundancy and improve the clarity and accuracy of the reasoning process. An atom proposition can independently express a complete fact or view, and it has semantic integrity, context independence, and atomicity.
[0058] Step 106: Take each atom proposition in the atom proposition set as a node and construct a proposition network according to the entity co-occurrence relationship between atom propositions.
[0059] The nodes of the proposition network are atom propositions, and the edges are semantic connections between atom propositions. The proposition network is an undirected graph G=(V, E), where the node set V corresponds to the proposition set, and the edge set E represents the semantic connections between propositions. By establishing the proposition network, relevant propositions are organized into a graph structure (undirected graph) according to their semantic relationships.
[0060] The paths in the proposition network are multi-field knowledge hinges. By constructing the proposition network, it is beneficial to identify multi-field knowledge hinges, which refer to key propositions or nodes that can connect knowledge in different fields. Each field has its own specific knowledge system and terminology, and there may be some shared concepts, entities, or relationships between these fields. Multi-field knowledge hinges are the bridges that can establish connections between different fields. They connect the knowledge of each field, enabling the method of the present invention to cross field barriers and perform effective information fusion and reasoning.
[0061] The system first deconstructs the document data in different fields into a series of atomic knowledge propositions, and then constructs a proposition network based on the entity co-occurrence relationship between propositions. Any path in this proposition network is a multi-field knowledge hinge. Among so many potential paths, several knowledge hinges most relevant to the user's question are searched for. Specifically, through the BeamSearch iterative proposition retrieval method, according to the user's question, the relevance of these knowledge hinges is sorted to obtain several most relevant knowledge hinges. By identifying multi-field knowledge hinges, the present invention can focus on the propositions related to specific cross-field knowledge hinges, avoiding the interference of irrelevant propositions, greatly improving the retrieval efficiency, and also being able to avoid broken links and redundant information in reasoning. By effectively identifying and utilizing these hinges, the method of the present invention can establish connections between multiple fields, perform in-depth reasoning, and finally generate reliable and interpretable answers.
[0062] Step 108, initialize several candidate proposition combinations, select the neighbor propositions of each atomic proposition in the proposition network for each candidate proposition combination through a pre-set pruning method, and obtain several new candidate proposition combinations according to each candidate proposition combination and the corresponding neighbor propositions.
[0063] Each candidate proposition combination is a multi-field knowledge hinge. Through the iterative proposition retrieval algorithm of the present invention, iterative search is performed in the proposition network to select the proposition set most relevant to the question. The algorithm will dynamically adjust the search path according to the characteristics of the input question, avoiding the overhead of multiple LLM calls in traditional methods. During the search process, the proposition combination can be gradually expanded, and a pre-set pruning mechanism is utilized to improve the efficiency and accuracy.
[0064] Step 110, calculate the combination score according to the similarity between the cross-field question and the proposition combination. If the combination score of the new candidate proposition combination is higher than that of the current candidate proposition combination, update the current candidate proposition combination, and iteratively update each candidate proposition combination until the iteration stop condition is met, and then output the optimal proposition combination set.
[0065] By evaluating the contribution degree of propositions in different combinations, the most critical propositions can be identified, and the top K proposition combinations with the highest similarity to the question are the most relevant knowledge hinges. In this way, the system can identify the "knowledge hinges" connecting different fields and obtain hinge propositions. These hinge propositions may play a crucial role in the cross-field reasoning process, helping the system effectively combine the knowledge of different fields.
[0066] Step 112, input the optimal proposition combination set into a pre-trained large language model to generate an answer corresponding to the cross-field question.
[0067] After performing propositional retrieval, an optimal set of propositional combinations is obtained, and finally an answer is generated based on the optimal set of propositional combinations. Since these propositions are extracted from unstructured documents and form a complete propositional network, the large language model can effectively combine multiple propositions into a coherent reasoning chain to obtain an accurate answer.
[0068] In the above propositional combination optimization multi-hop retrieval method for multi-domain knowledge hinges, first, cross-domain questions and related unstructured documents are obtained, propositional extraction is performed to generate a set of atomic propositions, providing structured information for subsequent reasoning. By identifying the relationships between atomic propositions and constructing a propositional network, semantic connections between different domains can be captured, especially the role of cross-domain knowledge hinges, enhancing knowledge fusion and the coherence of reasoning. Initialize several candidate propositional combinations and optimize the search space through pruning methods to reduce redundant propositions and ensure retrieval efficiency. Perform combination scoring based on the similarity between cross-domain questions and propositional combinations, dynamically update the candidate propositional combinations, and finally output the optimal set of propositional combinations. This process improves the accuracy and relevance of the reasoning chain through iterative optimization. Finally, the optimal propositional combinations are input into a pre-trained large language model to generate answers, ensuring the accuracy and interpretability of the answers. In the embodiments of the present invention, in scenarios of complex problems involving multiple domains, the reliability of the answers output by the large language model can be improved, and high-quality and accurate content can be efficiently generated to meet the actual application requirements.
[0069] In one embodiment, propositional extraction is performed on each unstructured document to obtain a set of atomic propositions containing multiple atomic propositions, including: using a sliding window to perform semantic segmentation on the unstructured document to obtain multiple segmented contents; using a pre-trained large language model to convert the segmented contents into independent atomic propositions. In this embodiment, first, the sliding window mechanism is used to perform semantic segmentation on the long document to maintain the coherence of the context, and then an extraction strategy based on the large language model is adopted to convert the unstructured document into a set of atomic propositions, ensuring that each proposition is an independent and complete factual statement. During this process, pronoun resolution and entity normalization are automatically performed to ensure that each proposition has semantic integrity, context independence, and atomicity.
[0070] In one embodiment, a propositional network is constructed according to the entity co-occurrence relationship between atomic propositions, including: if the atomic propositions share the same entity, there is an entity co-occurrence relationship between the atomic propositions, and the atomic propositions with an entity co-occurrence relationship are connected to construct a propositional network.
[0071] In this embodiment, as Figure 2The schematic diagram of propositional network construction is shown. The basic structure of the propositional network is presented in the figure, where nodes represent atomic propositions and the connections between nodes indicate the entity co-occurrence relationship between propositions. The bold nodes and connections represent multi-domain knowledge hinges. Through this connection method based on entity co-occurrence, the system can establish associations between propositions to support subsequent multi-step reasoning processes.
[0072] Constructing a propositional network based on entity co-occurrence relationship means establishing a connection between two propositions when they share the same entity. A propositional network is constructed through the connection relationships between propositions, and multi-domain knowledge hinge nodes are identified to provide structural support for subsequent multi-hop reasoning.
[0073] In one embodiment, the combined score is calculated based on the similarity between the cross-domain problem and the propositional combination, including: concatenating each atomic proposition in the propositional combination and performing text encoding on the concatenated result to obtain the propositional combination encoding vector; performing text encoding on the cross-domain problem to obtain the cross-domain problem encoding vector; obtaining the combined score of the propositional combination according to the similarity between the propositional combination encoding vector and the cross-domain problem encoding vector; the propositional combination includes a candidate propositional combination and a new candidate propositional combination.
[0074] In this embodiment, the propositional score dynamic update mechanism identifies key propositions by capturing the contribution degree of propositions in different combinations. For the propositional combination PC, its score is calculated as follows:
[0075] score(PC) = similarity(encode(concat(PC)), encode(q));
[0076] where PC is the propositional combination, concat is the concatenation function, encode is the text encoding function, and similarity is the semantic similarity calculation function. This mechanism can effectively identify those propositions that exhibit semantic emergence in the combination, especially the hinge propositions connecting multi-domain knowledge.
[0077] In one embodiment, the neighbor propositions of each atomic proposition in the propositional network are selected through a pre-set pruning method, including: obtaining the neighbor proposition set of each atomic proposition in the propositional network for each candidate propositional combination; obtaining the direct relevance according to the similarity between each atomic proposition and the cross-domain problem, and obtaining the neighbor relevance according to the similarity between each neighbor proposition in the neighbor proposition set and the cross-domain problem; calculating the pruning score of each atomic proposition according to the direct relevance of each atomic proposition and the corresponding maximum neighbor relevance; if the pruning score corresponding to the atomic proposition is higher than the threshold, then retain the neighbor proposition corresponding to the maximum neighbor relevance.
[0078] In this embodiment, the pruning mechanism reduces the search space by evaluating the local and neighborhood relevance of propositions. This design allows a proposition to potentially become an important intermediate node in reasoning or a knowledge hinge even if its direct relevance to the problem is low, as long as the relevance of its neighboring propositions is high.
[0079] Among them, the candidate proposition combinations require reliable initial values. Initializing the candidate proposition combinations includes: First, use a text encoding model (such as BERT) to calculate the vector representation of the input problem q, providing a basis for subsequent proposition scoring. Calculate the relevance score of each proposition to the problem according to the semantic similarity between the problem and each proposition. Based on the initial relevance scores, the system selects several of the most relevant proposition combinations as candidates, and these initial combinations will provide a starting point for subsequent iterations. Record the current best proposition combination score to ensure that the optimal solution can be tracked during the iteration process. Monitor whether there is improvement during the iteration. If there is no score improvement for several consecutive rounds, terminate in advance. The above process is the initialization stage, and the combination results of the initialization stage are used to initialize the candidate proposition combinations.
[0080] In one embodiment, the pruning score is:
[0081] Score(p) = α·R(p) + (1-α)·maxR(v);
[0082] Where p represents an atomic proposition, R(p) represents the direct relevance of p to the cross-domain problem, v represents the neighboring propositions of p, v∈N(p), N(p) is the set of neighboring propositions of p, α is the weight coefficient, and R(v) represents the neighbor relevance of v to the cross-domain problem.
[0083] In one embodiment, the method further includes: performing an early stopping check when iteratively updating each candidate proposition combination; the early stopping check includes: obtaining a preset number of early stopping rounds. If the candidate proposition combinations are not updated in multiple consecutive iterations and the number of iteration rounds meets the early stopping rounds, terminate the search in advance. In this embodiment, by monitoring the convergence of the search process, the search is terminated in advance when no proposition combination with a higher score can be found in r consecutive iterations. The early stopping mechanism avoids excessive exploration, significantly reducing the computational overhead while ensuring the quality of the retrieval results.
[0084] In one embodiment, inputting the optimal proposition combination set into a pre-trained large language model to generate an answer corresponding to the cross-domain problem includes: sorting and organizing the optimal proposition combination set to obtain an inference chain, and processing the inference chain through the pre-trained large language model to generate an answer corresponding to the cross-domain problem.
[0085] In this embodiment, the optimal proposition combination retrieved is obtained, and the final answer is generated using a large language model. First, the optimal proposition combination is sorted and organized to construct a complete reasoning chain. By identifying the knowledge hinges related to the question, that is, extracting the most relevant propositions from multiple fields, the system enhances the efficiency and accuracy of cross-field reasoning. This method is more efficient in terms of information density compared to traditional text passage retrieval and enables the proposition combination to be directly used for reasoning by the large language model, thereby generating more targeted answers. This technical means selects the top K most relevant proposition combinations as "knowledge hinges", then inputs these propositions together with the input question into the large language model, and uses its powerful reading comprehension ability to generate accurate and explanatory answers. In this way, the system improves the efficiency of cross-field multi-hop question answering while ensuring the accuracy and interpretability of the answers. This embodiment particularly focuses on the role of multi-field knowledge hinges and then generates accurate and interpretable answers based on this structured evidence. In this way, the system not only ensures the accuracy of the answers but also provides clear reasoning basis.
[0086] In a specific embodiment, as Figure 3 shown, a general flowchart of the method framework of the present invention is provided, where: the input part includes unstructured documents and questions; the proposition processing part shows a proposition extraction module and a proposition network construction module; the retrieval optimization part includes a Beam Search iterative proposition retrieval module and its three key mechanisms (dynamic update of proposition scoring, pruning, and early stopping); finally, there is an answer generation part that generates the final answer based on the retrieved optimal proposition combination. The Beam Search iterative proposition retrieval algorithm of the present invention can be represented by the following pseudocode:
[0087]
[0088] Through the coordinated action of these three mechanisms, the present invention achieves efficient multi-hop retrieval: dynamic scoring update ensures the accuracy of reasoning, the pruning mechanism reduces the search space, and the early stopping mechanism optimizes the computational efficiency. The entire retrieval process not only maintains the integrity of reasoning but also significantly improves the system performance, especially in scenarios where cross-field knowledge connection is required.
[0089] It should be understood that although Figure 1 the steps in the flowchart are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, Figure 1At least some of the steps may include multiple sub-steps or multiple stages, and these sub-steps or stages do not necessarily need to be executed and completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages does not necessarily need to be sequential, but can be executed alternately or in turn with at least a part of other steps or sub-steps or stages of other steps.
[0090] In one embodiment, as Figure 4 shown, a multi-hop retrieval device for propositional combination optimization oriented to multi-domain knowledge hinges is provided, including:
[0091] A data acquisition module 402, configured to acquire cross-domain questions and domain-related unstructured documents; the cross-domain questions include at least two different domains; the unstructured documents include domain knowledge;
[0092] A proposition extraction module 404, configured to extract propositions from each unstructured document to obtain an atomic proposition set including a plurality of atomic propositions;
[0093] A network construction module 406, configured to use each atomic proposition in the atomic proposition set as a node, and construct a proposition network according to the entity co-occurrence relationship between atomic propositions; the paths in the proposition network are multi-domain knowledge hinges;
[0094] A pruning module 408, configured to initialize several candidate proposition combinations, select neighbor propositions of each atomic proposition in the proposition network for each candidate proposition combination through a preset pruning method, and obtain several new candidate proposition combinations according to each candidate proposition combination and the corresponding neighbor propositions; each candidate proposition combination is a multi-domain knowledge hinge;
[0095] An update module 410, configured to calculate a combination score according to the similarity between the cross-domain question and the proposition combination. If the combination score of the new candidate proposition combination is higher than that of the current candidate proposition combination, update the current candidate proposition combination, and iteratively update each candidate proposition combination until the condition for stopping iteration is met, and then output an optimal proposition combination set;
[0096] An answer generation module 412, configured to input the optimal proposition combination set into a pre-trained large language model to generate an answer corresponding to the cross-domain question.
[0097] For the specific limitations of the propositional combination optimization multi-hop retrieval device for multi-domain knowledge hinges, reference can be made to the limitations of the propositional combination optimization multi-hop retrieval method for multi-domain knowledge hinges in the foregoing text, which will not be elaborated here. Each module in the above-mentioned propositional combination optimization multi-hop retrieval device for multi-domain knowledge hinges can be implemented in whole or in part by software, hardware, and their combination. The above-mentioned modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each of the above modules.
[0098] In one embodiment, a computer device is provided. The computer device can be a terminal, and its internal structure diagram can be as Figure 5 shown. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a propositional combination optimization multi-hop retrieval method for multi-domain knowledge hinges. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covered on the display screen, or a button, a trackball, or a touchpad provided on the shell of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0099] Those skilled in the art can understand that Figure 5 the structure shown in
[0100] is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0101] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the steps of the method in the above-mentioned embodiment.
[0102] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.
[0103] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0104] The above-described embodiments only represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A multi-hop retrieval method for propositional combination optimization oriented to multi-domain knowledge hinges, characterized in that The method includes: Obtaining cross-domain problems and domain-related unstructured documents; the cross-domain problems include at least two different domains; the unstructured documents include domain knowledge; Performing proposition extraction on each unstructured document to obtain an atomic proposition set containing multiple atomic propositions; Taking each atomic proposition in the atomic proposition set as a node, and constructing a proposition network according to the entity co-occurrence relationship between atomic propositions; the paths in the proposition network are multi-domain knowledge hinges; the multi-domain knowledge hinge is a proposition chain composed of atomic propositions connecting different domain knowledge; Initializing several candidate proposition combinations, selecting the neighbor propositions of each atomic proposition in each candidate proposition combination in the proposition network through a pre-set pruning method, and obtaining several new candidate proposition combinations according to each candidate proposition combination and the corresponding neighbor propositions; each candidate proposition combination includes nodes on the multi-domain knowledge hinge; Calculating a combination score according to the similarity between the cross-domain problem and the proposition combination. If the combination score of the new candidate proposition combination is higher than that of the current candidate proposition combination, update the current candidate proposition combination, and iteratively update each candidate proposition combination until the iteration stop condition is met, and then output the optimal proposition combination set; Inputting the optimal proposition combination set into a pre-trained large language model to generate an answer corresponding to the cross-domain problem.
2. The method according to claim 1, wherein The performing proposition extraction on each unstructured document to obtain an atomic proposition set containing multiple atomic propositions includes: Using a sliding window to perform semantic segmentation on the unstructured document to obtain multiple segmented contents; Using a pre-trained large language model to convert the segmented contents into independent atomic propositions.
3. The method according to claim 1, wherein Constructing a proposition network according to the entity co-occurrence relationship between atomic propositions includes: If the atomic propositions share the same entity, there is an entity co-occurrence relationship between the atomic propositions, and the atomic propositions with an entity co-occurrence relationship are connected to construct a proposition network.
4. The method according to claim 1, characterized in that, Calculating a combination score according to the similarity between the cross-domain problem and the proposition combination includes: Concatenating each atomic proposition in the proposition combination and performing text encoding on the concatenated result to obtain a proposition combination encoding vector; Performing text encoding on the cross-domain problem to obtain a cross-domain problem encoding vector; Obtaining the combination score of the proposition combination according to the similarity between the proposition combination encoding vector and the cross-domain problem encoding vector; the proposition combination includes candidate proposition combinations and new candidate proposition combinations.
5. The method according to claim 1, characterized in that Selecting the neighbor propositions of each atomic proposition in each candidate proposition combination in the proposition network through a pre-set pruning method includes: Obtaining the neighbor proposition set of each atomic proposition in each candidate proposition combination in the proposition network; Obtaining the direct relevance according to the similarity between each atomic proposition and the cross-domain problem, and obtaining the neighbor relevance according to the similarity between each neighbor proposition in the neighbor proposition set and the cross-domain problem; Calculating the pruning score of each atomic proposition according to the direct relevance of each atomic proposition and the corresponding maximum neighbor relevance; If the pruning score corresponding to the atomic proposition is higher than the threshold, retain the neighbor proposition corresponding to the maximum neighbor relevance.
6. The method according to claim 5, characterized in that, The pruning score is: Score(p) = α·R(p) + (1-α)·maxR(v) Among them, p represents an atomic proposition, R(p) represents the direct relevance of p to the cross-domain problem, v represents the neighbor proposition of p, v ∈ N(p), N(p) is the set of neighbor propositions of p, α is the weight coefficient, and R(v) represents the neighbor relevance of v to the cross-domain problem.
7. The method according to claim 1, wherein Input the optimal proposition combination set into the pre-trained large language model to generate the answer corresponding to the cross-domain problem, including: Sort and organize the optimal proposition combination set to obtain an inference chain, and process the inference chain through the pre-trained large language model to generate the answer corresponding to the cross-domain problem.
8. The method according to claim 1, characterized in that, The method further includes: When iteratively updating each candidate proposition combination, perform early stopping check; the early stopping check includes: Obtain the pre-set number of early stopping rounds. If the candidate proposition combination has not been updated for multiple consecutive iterations and the number of iteration rounds meets the number of early stopping rounds, terminate the search in advance.
9. A propositional combination optimization multi-hop retrieval device for multi-domain knowledge hinges, characterized in that The device includes: A data acquisition module for acquiring cross-domain problems and domain-related unstructured documents; the cross-domain problems include at least two different domains; the unstructured documents include domain knowledge; A proposition extraction module for extracting propositions from each unstructured document to obtain an atomic proposition set containing multiple atomic propositions; A network construction module for taking each atomic proposition in the atomic proposition set as a node and constructing a proposition network according to the entity co-occurrence relationship between atomic propositions; the paths in the proposition network are multi-domain knowledge hinges; the multi-domain knowledge hinge is a proposition chain composed of atomic propositions connecting different domain knowledge; A pruning module for initializing several candidate proposition combinations, selecting the neighbor propositions of each atomic proposition in each candidate proposition combination in the proposition network through a pre-set pruning method, and obtaining several new candidate proposition combinations according to each candidate proposition combination and the corresponding neighbor propositions; each candidate proposition combination includes nodes on the multi-domain knowledge hinge; An update module for calculating a combination score according to the similarity between the cross-domain problem and the proposition combination. If the combination score of the new candidate proposition combination is higher than the current candidate proposition combination, update the current candidate proposition combination, iteratively update each candidate proposition combination, and output the optimal proposition combination set until the iteration stop condition is met; An answer generation module for inputting the optimal proposition combination set into the pre-trained large language model to generate the answer corresponding to the cross-domain problem.
Citation Information
Patent Citations
Method for representing semanteme and relation between semanteme in natural language, reasoning method and artificial intelligence system
CN115168560A
Inference method and device for multi-hop question and answer of knowledge graph and storage medium
CN118503366A