A retrieval augmented reasoning method based on hypothesis-driven cognitive cycle

CN122964236APending Publication Date: 2026-10-23HENAN CHUANGHE INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611337889.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-31
Publication Date
2026-10-23

AI Technical Summary

Technical Problem

[0003]但是,现有技术的检索过程通常以输入问题整体作为检索对象,检索结果与问题表面语义相关时即可参与后续生成,难以识别生成过程中具体哪一处中间判断缺乏可靠知识支撑

Benefits of technology

本发明提供的一种基于假设驱动认知循环的检索增强推理方法,包括以下步骤:获取输入问题,调用大语言模型生成初始假设图谱,计算所述初始假设图谱中各个假设节点的知识置信度;提取所述知识置信度低于预设阈值的节点作为知识盲区节点,得到包含所述知识盲区节点的假设状态图谱;基于所述假设状态图谱中的知识盲区节点构造定向检索词;将所述定向检索词输入外部知识库进行匹配查询,获取对应的外部证据片段;计算所述外部证据片段与对应知识盲区节点的语义对齐度,得到证据对齐验证矩阵;基于所述证据对齐验证矩阵对所述假设状态图谱进行图谱更新,若更新后的假设状态图谱的全局置信度满足收敛条件,则基于更新后的假设状态图谱提取经验证的逻辑推理链并输出最终答案,解决了如何在检索增强推理过程中准确发现知识支撑不足的推理环节,并使最终输出具有可验证的逻辑依据的技术问题,实现了对推理过程中知识支撑不足的假设节点进行定向识别和外部证据验证,并将通过验证的证据纳入假设状态图谱,使最终答案能够基于经验证的逻辑推理链生成,降低无依据假设对推理结果的影响,提高检索增强推理的准确性、可解释性和可追溯性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122964236A_ABST
    Figure CN122964236A_ABST
Patent Text Reader

Abstract

The present application relates to a kind of search enhancement reasoning method based on hypothesis-driven cognitive cycle, it is related to cognitive search technical field, including the following steps, obtain input question, call large language model and generate initial hypothesis atlas and calculate the knowledge confidence of each hypothesis node;Determine the node below the preset threshold as knowledge blind area node, construct hypothesis state atlas;Accordingly generate directional search word, obtain evidence fragment from external knowledge base;The semantic alignment degree of evidence fragment and knowledge blind area node is calculated, and evidence alignment verification matrix is obtained;Accordingly update atlas, when global confidence meets convergence condition, extract verified logical reasoning chain and output final answer.The technical problem of how to accurately find the reasoning link that knowledge support is insufficient in the process of search enhancement reasoning is solved, and the final output has the technical problem of verifiable logical basis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cognitive retrieval technology, and in particular to a retrieval enhancement reasoning method based on hypothesis-driven cognitive loop. Background Technology

[0002] With the application of large language models in scenarios such as intelligent question answering, professional knowledge consultation, assisted analysis, and information retrieval, retrieval-enhanced generation technology typically first retrieves several relevant texts from document libraries, web page libraries, or domain knowledge bases based on the user's question. Then, the retrieved texts and the question are input into a language model, which generates the response. In scenarios requiring multi-step reasoning, such as interpreting medical literature, analyzing equipment malfunctions, querying laws and regulations, or summarizing research data, the system's output often includes not only direct facts but also explanations, judgments, and conclusive relationships between multiple facts.

[0003] However, existing retrieval processes typically treat the entire input question as the retrieval object. Search results are used as long as they are semantically related to the question's surface meaning, making it difficult to identify which intermediate judgments lack reliable knowledge support during the generation process. This can lead to situations where the retrieved text supports some background facts but fails to cover key reasoning arguments. The language model may still complete the conclusion based on textual associations, resulting in gaps in the logical chain of the final answer. Therefore, accurately identifying reasoning steps lacking sufficient knowledge support during retrieval-enhanced reasoning and ensuring the final output has verifiable logical evidence has become a pressing technical problem. Summary of the Invention

[0004] The purpose of this invention is to at least partially solve one of the technical problems existing in the prior art.

[0005] To achieve the above objectives, this invention provides a retrieval-enhanced reasoning method based on hypothesis-driven cognitive loops, comprising: The input question is obtained, and a large language model is called to generate an initial hypothesis graph. The knowledge confidence of each hypothesis node in the initial hypothesis graph is calculated. Nodes with knowledge confidence scores below a preset threshold are extracted as knowledge blind spots, and a hypothesis state map containing these knowledge blind spots is obtained. Targeted search terms are constructed based on the knowledge blind spots in the hypothetical state graph. The targeted search terms are input into an external knowledge base for matching and querying to obtain corresponding external evidence fragments. Calculate the semantic alignment degree between the external evidence fragment and the corresponding knowledge blind spot node to obtain the evidence alignment verification matrix; The hypothesis state graph is updated based on the evidence alignment verification matrix. If the global confidence of the updated hypothesis state graph satisfies the convergence condition, the verified logical reasoning chain is extracted based on the updated hypothesis state graph and the final answer is output.

[0006] Furthermore, the process of obtaining the input problem, calling the large language model to generate an initial hypothesis graph, and calculating the knowledge confidence of each hypothesis node in the initial hypothesis graph includes: Obtain the input question, input the input question into the prompt word template, and call the large language model to generate an initial hypothesis graph containing multiple entity nodes and causal relationship edges; Obtain the output probability distribution of the large language model when generating each entity node, and calculate the normalized information entropy of the output probability distribution; The inverse of the normalized information entropy is used as the inherent certainty of the node, and combined with the transit weight of the causal relationship edge, the knowledge confidence of each hypothetical node in the initial hypothesis graph is calculated.

[0007] Furthermore, the step of extracting nodes with knowledge confidence scores below a preset threshold as knowledge blind spots, and obtaining a hypothesis state graph containing the knowledge blind spots, includes: The initial hypothesis graph is topologically sorted, and nodes with knowledge confidence scores below a preset threshold are extracted as knowledge blind spots according to the topological hierarchy. For each of the aforementioned knowledge blind spots, its downstream connected nodes are marked as cascade failure nodes; The knowledge blind zone nodes and the cascaded failure nodes are masked in the initial hypothesis graph to obtain a hypothesis state graph containing the knowledge blind zone nodes.

[0008] Furthermore, the step of masking the knowledge blind spot nodes and the cascaded failure nodes in the initial hypothesis graph to obtain a hypothesis state graph containing the knowledge blind spot nodes includes: Calculate the topological shortest path length from the cascaded failed node to the knowledge blind spot node; Based on the shortest path length of the topology, soft mask weights that decrease with the path length are assigned to the cascaded failure nodes, and hard mask weights that block the information flow are assigned to the knowledge blind spot nodes. The soft mask weights and hard mask weights are injected as node attributes into the initial hypothesis graph to complete the operation of masking the knowledge blind zone nodes and the cascaded failure nodes in the initial hypothesis graph, thereby obtaining a hypothesis state graph containing the knowledge blind zone nodes and the distribution of mask weights.

[0009] Furthermore, the construction of targeted search terms based on the knowledge blind spots in the hypothetical state graph includes: In the hypothetical state graph, the parent node, child node, and other parent nodes of the child node of the knowledge blind spot node are extracted to form the Markov blanket set of the knowledge blind spot node. Extract the semantic feature vector of each node in the Markov blanket set, and then perform a weighted concatenation with the initial semantic features of the knowledge blind zone node; Based on the concatenated feature vector and the attribute labels of the knowledge blind spots in the hypothetical state graph, a targeted search term containing contextual constraints is constructed.

[0010] Furthermore, the step of extracting the parent node, child node, and other parent nodes of the child node from the hypothetical state graph to form the Markov blanket set of the knowledge blind node includes: In the hypothetical state graph, based on directed edge traversal, the parent node, child node, and other parent nodes of the child node of the knowledge blind zone node are extracted as the initial blanket node group. A counterfactual mask perturbation is applied to the knowledge blind zone node to block information transmission between it and the initial blanket node group, and the divergence change of the marginal probability distribution of each node in the initial blanket node group before and after the perturbation is calculated. Nodes whose divergence change is greater than a preset causal sensitivity threshold are selected as core context nodes. Based on the topological connected subgraph of the core context nodes, a Markov blanket set of the knowledge blind zone nodes is constructed.

[0011] Furthermore, the construction of directional search terms containing context constraints based on the concatenated feature vector and the attribute labels of the knowledge blind spots in the hypothetical state graph includes: The concatenated feature vectors are input into the decoupled autoencoder to separate the structural feature vectors representing the depth of the graph hierarchy and the semantic feature vectors representing the content of entities. The attribute labels of the knowledge blind zone nodes in the hypothetical state graph are parsed and mapped to an exclusive hard constraint mask used to limit the boundary of the knowledge domain. Relational predicates are generated based on the structural feature vectors, entity slots are generated based on the semantic feature vectors, and the relational predicates, entity slots, and exclusive hard constraint masks are combined according to a preset logical template to construct targeted search terms containing contextual constraints.

[0012] Furthermore, the step of inputting the targeted search terms into an external knowledge base for matching and querying to obtain corresponding external evidence fragments includes: The targeted search terms are input into an external knowledge base for multi-hop dense vector matching query to recall the initial candidate text set; Extract the timestamp attribute of each text in the initial candidate text set, and apply a penalty weighting to the matching score of each text using a preset time decay function; Sort the texts from highest to lowest according to the weighted matching scores, and extract the top-K texts to obtain the corresponding external evidence fragments.

[0013] Furthermore, the step of calculating the semantic alignment degree between the external evidence fragment and the corresponding knowledge blind spot node to obtain the evidence alignment verification matrix includes: The external evidence fragments are used as premises, and the hypothetical statements of the corresponding knowledge blind spots are used as hypotheses, which are then input into the pre-trained natural language reasoning model. Output the implied probability, neutral probability, and contradictory probability of the premise to the hypothesis, and use the difference between the implied probability and the contradictory probability as the semantic alignment degree between the external evidence fragment and the corresponding knowledge blind spot node. The semantic alignment of all knowledge blind spot nodes with their corresponding external evidence fragments is arranged in two dimensions to obtain the evidence alignment verification matrix.

[0014] Furthermore, the hypothesis state graph is updated based on the evidence alignment verification matrix. If the global confidence of the updated hypothesis state graph satisfies the convergence condition, then the verified logical reasoning chain is extracted based on the updated hypothesis state graph and the final answer is output, including: Extract the maximum alignment value corresponding to each knowledge blind spot node from the evidence alignment verification matrix; When the maximum alignment value is greater than the preset acceptance threshold, the hypothesis statement of the corresponding knowledge blind node in the hypothesis state graph is replaced by the corresponding external evidence fragment, and the mask mark of the node is removed, thus completing the graph update operation of the hypothesis state graph and obtaining the updated hypothesis state graph. Calculate the weighted sum of the confidence scores of all nodes in the updated hypothetical state graph, and use it as the global confidence score; If the global confidence level is greater than the preset convergence threshold, it is determined that the global confidence level of the updated hypothesis state graph meets the convergence condition. Then, graph traversal is performed along the causal relationship edges in the updated hypothesis state graph to extract the verified logical reasoning chain and output the final answer.

[0015] Technical effect This invention provides a retrieval-enhanced reasoning method based on hypothesis-driven cognitive loops, comprising the following steps: obtaining an input question; calling a large language model to generate an initial hypothesis graph; calculating the knowledge confidence of each hypothesis node in the initial hypothesis graph; extracting nodes with knowledge confidence below a preset threshold as knowledge blind spots, obtaining a hypothesis state graph containing the knowledge blind spots; constructing targeted search terms based on the knowledge blind spots in the hypothesis state graph; inputting the targeted search terms into an external knowledge base for matching queries to obtain corresponding external evidence fragments; calculating the semantic alignment between the external evidence fragments and the corresponding knowledge blind spots, obtaining an evidence alignment verification matrix; and based on the evidence alignment verification matrix... The algorithm updates the hypothesis state graph. If the global confidence of the updated hypothesis state graph meets the convergence condition, a verified logical reasoning chain is extracted based on the updated hypothesis state graph, and the final answer is output. This solves the technical problem of how to accurately identify reasoning links with insufficient knowledge support in the retrieval augmented reasoning process and ensure that the final output has verifiable logical basis. It enables targeted identification and external evidence verification of hypothesis nodes with insufficient knowledge support in the reasoning process, and incorporates the verified evidence into the hypothesis state graph, so that the final answer can be generated based on the verified logical reasoning chain. This reduces the impact of unfounded hypotheses on the reasoning results and improves the accuracy, interpretability, and traceability of retrieval augmented reasoning. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a schematic diagram of the steps of a retrieval-enhanced reasoning method based on hypothesis-driven cognitive loop in one embodiment of the present invention; Figure 2 This is one embodiment of the present invention. Figure 1 A schematic diagram of step S1; Figure 3 This is one embodiment of the present invention. Figure 1 A schematic diagram of step S2.

[0018] The objectives, features, and advantages of this invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0019] The embodiments of the present invention are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention. The step numbers in the following embodiments are set only for ease of explanation, and there is no limitation on the order between the steps. The execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.

[0020] The following describes in detail, with reference to the accompanying drawings, a retrieval enhancement reasoning method based on hypothesis-driven cognitive loop proposed according to an embodiment of the present invention.

[0021] like Figures 1-3 As shown, an embodiment of the present invention provides a retrieval-enhanced reasoning method based on hypothesis-driven cognitive loops, comprising: S1, Obtain the input question, call the large language model to generate an initial hypothesis graph, and calculate the knowledge confidence of each hypothesis node in the initial hypothesis graph.

[0022] S11, Obtain the input question, input the input question into the prompt word template, and call the large language model to generate an initial hypothesis graph containing multiple entity nodes and causal relationship edges; S12, obtain the output probability distribution of the large language model when generating each entity node, and calculate the normalized information entropy of the output probability distribution; S13, the reciprocal of the normalized information entropy is used as the inherent certainty of the node, and the knowledge confidence of each hypothetical node in the initial hypothesis graph is calculated in combination with the transit weight of the causal relationship edge.

[0023] Specifically, upon receiving an input question, it is first verified as parsable natural language text, and the input question is written into a pre-configured prompt word template. The prompt word template defines a unified structure for the large language model to return entity nodes, directed causal edges between entity nodes, and the propagation weights of each causal edge. Each entity node carries a unique node identifier and entity text, and each causal edge records the source node identifier, target node identifier, relation type, and propagation weight. When calling the large language model, the model version, decoding method, and randomness parameters are fixed to maintain consistency in the graph generation. The generated results undergo structural verification, and records with duplicate node identifiers, empty entity text, missing relation edge endpoints, or incomplete relation directions are deleted to obtain an initial hypothesis graph. The causal relationships in this graph are used to characterize the inferences to be verified in response to the input question, and are not used as established facts.

[0024] Subsequently, when the large language model generates the entity text for each entity node, the output probability distribution corresponding to each output word that makes up the entity text is read synchronously. For any output word, the output probability of all candidate words is calculated according to the definition of information entropy, and the calculation result is normalized by the natural logarithm of the number of candidate word sets to obtain the normalized information entropy of the output word. For an entity node composed of multiple output words, the arithmetic mean of the normalized information entropy of each output word is taken as the normalized information entropy of the entity node. The lower the normalized information entropy, the more concentrated the candidate generation results of the model for that entity node. To avoid the inverse calculation failing when the normalized information entropy is zero, a fixed calculation lower limit greater than zero is preset; when the normalized information entropy is lower than the calculation lower limit, it participates in subsequent processing according to the calculation lower limit.

[0025] Based on this, the reciprocal of the normalized information entropy protected by the lower bound is determined as the intrinsic certainty of the node. The propagation weight of the causal relationship edge is determined by the output probability of the corresponding relationship type and is limited to between zero and one. The larger the propagation weight, the stronger the propagation support of the causal relationship edge for the knowledge confidence of the target node. For hypothetical nodes with incoming edges, the arithmetic mean of the propagation weights of all incoming edges is calculated, and this mean is multiplied by the intrinsic certainty of the hypothetical node to obtain the knowledge confidence of the hypothetical node. For hypothetical nodes without incoming edges, the propagation weight is treated as one, so that its knowledge confidence is determined only by the intrinsic certainty of the node. The knowledge confidence is a dimensionless value and is compared using the same calculation lower bound and the same threshold calibration calibrator in the subsequent knowledge blind spot identification process. In this embodiment, the above scheme can simultaneously characterize the uncertainty of entity node generation and the reliability of causal relationship propagation, providing a consistent data foundation for identifying hypothetical nodes with insufficient knowledge support.

[0026] S2, extract the nodes whose knowledge confidence is lower than a preset threshold as knowledge blind zone nodes, and obtain the hypothesis state map containing the knowledge blind zone nodes.

[0027] S21, perform topological sorting on the initial hypothesis graph, and extract nodes whose knowledge confidence is lower than a preset threshold as knowledge blind spot nodes according to the topological level; S22, for each of the knowledge blind spots, mark its downstream connected nodes as cascade failure nodes.

[0028] Specifically, the direction of causal edges is uniformly from the cause node to the result node. First, the number of incoming edges for each entity node in the initial hypothesis graph is counted, and entity nodes with zero incoming edges are placed in a sorting queue. When multiple candidate nodes exist simultaneously, they are output sequentially according to their fixed node identifiers. For each entity node output, its causal edge pointing to a downstream node is deleted, and the number of incoming edges for the corresponding downstream node is updated, until the topological sorting of all entity nodes is completed. If any unoutput nodes remain, it indicates the presence of a directed closed loop in the initial hypothesis graph. In this case, the current graph is marked as structurally abnormal and returned to the graph generation stage for regeneration, ensuring that subsequent judgments are based on unidirectional causal dependencies.

[0029] After completing the topological sorting, the knowledge confidence of each entity node is read sequentially from upstream to downstream, and compared with a pre-defined knowledge confidence threshold. When the knowledge confidence of any entity node is significantly lower than the threshold, it is marked as a knowledge blind spot node. Subsequently, starting from each knowledge blind spot node, its successor nodes are traversed layer by layer along the causal relationship edges. Entity nodes reachable via one or more directed causal relationships, excluding the knowledge blind spot node itself, are marked as cascade failure nodes. Visited nodes are recorded during the traversal to avoid duplicate marking when multiple propagation paths converge. When a cascade failure node simultaneously meets the knowledge blind spot node condition, its knowledge blind spot mark is retained, and a cascade failure mark is added. In this embodiment, the above scheme can locate nodes with insufficient knowledge support and their potential impact range, providing clear targets for subsequent retrieval and graph correction.

[0030] S23, the knowledge blind zone nodes and the cascaded failure nodes are masked in the initial hypothesis graph to obtain a hypothesis state graph containing the knowledge blind zone nodes.

[0031] S231, Calculate the shortest topological path length from the cascaded failure node to the knowledge blind spot node; S232, based on the shortest path length of the topology, assign soft mask weights that decrease with the path length to the cascaded failure nodes, and assign hard mask weights that block the information flow to the knowledge blind spot nodes. S233, the soft mask weights and hard mask weights are injected as node attributes into the initial hypothesis graph to complete the operation of masking the knowledge blind zone nodes and the cascaded failure nodes in the initial hypothesis graph, thereby obtaining a hypothesis state graph containing the knowledge blind zone nodes and the distribution of mask weights.

[0032] Specifically, the shortest path length refers to the minimum number of causal edges traversed from a knowledge blind node to a cascaded failure node along the causal relationship edges. Since the initial hypothesis graph has been topologically sorted, its causal edges all point from upstream cause nodes to downstream result nodes, allowing path searching from low to high topological levels. For each knowledge blind node, it is used as the starting point of the path, sequentially visiting its direct successor nodes and their successors. The shortest path length corresponding to a cascaded failure node directly connected to the knowledge blind node is recorded as a causal relationship edge, and the path length increases with each subsequent traversal of a causal relationship edge. When the same cascaded failure node can be reached via multiple directed paths, the search result with the shortest path length is retained to represent the most direct causal dependency between the cascaded failure node and the knowledge blind node. If a marked cascaded failure node cannot be reached from its corresponding knowledge blind node along a directed causal relationship edge, it is treated as a marking consistency anomaly and is not included in the mask weight allocation.

[0033] Subsequently, a single-hop attenuation coefficient with a value greater than zero and less than one is pre-defined and maintained unchanged during the same round of hypothetical state graph generation. For each cascaded failure node, the single-hop attenuation coefficient is continuously multiplied by its topological shortest path length to obtain the soft mask weight. Thus, the closer the cascaded failure node is to a knowledge blind spot node, the larger the soft mask weight; as the topological shortest path length increases, the soft mask weight decreases. For cascaded failure nodes jointly affected by multiple knowledge blind spot nodes, each shortest path length is retained, and the smallest topological shortest path length is selected to calculate the effective soft mask weight, thereby determining the mask priority of the cascaded failure node according to the nearest knowledge blind spot node.

[0034] For knowledge-blind nodes, a hard mask weight is set to zero, ensuring that these nodes do not provide usable knowledge support during subsequent information transmission and logical chain extraction, thus blocking unverified information flows. If an entity node is simultaneously marked as a knowledge-blind node and a cascade failure node, the hard mask takes priority, maintaining its weight at zero and not being replaced by a soft mask weight. After weight calculation, without altering the entity node text, knowledge confidence, causal relationship edge direction, or transmission weight, mask type, mask weight, associated knowledge-blind node identifier, and corresponding topological shortest path length are written for each relevant entity node, forming a hypothetical state graph containing the knowledge-blind nodes and mask weight distribution. In this embodiment, the above scheme can distinguish unverified knowledge sources and their downstream influence ranges at different levels, providing a controllable node marking basis for subsequent targeted retrieval and graph updates.

[0035] S3, construct targeted search terms based on the knowledge blind spot nodes in the hypothetical state graph.

[0036] S31, in the hypothetical state graph, extract the parent node, child node, and other parent nodes of the child node of the knowledge blind spot node to form the Markov blanket set of the knowledge blind spot node.

[0037] S311, In the hypothetical state graph, based on directed edge traversal, the parent node, child node, and other parent nodes of the child node of the knowledge blind zone node are extracted as the initial blanket node group. S312, apply a counterfactual mask perturbation to the knowledge blind zone node to block the information transmission between it and the initial blanket node group, and calculate the divergence change of the marginal probability distribution of each node in the initial blanket node group before and after the perturbation. S313, select nodes whose divergence change is greater than a preset causal sensitivity threshold as core context nodes, and construct a Markov blanket set of knowledge blind zone nodes based on the topological connected subgraph of the core context nodes.

[0038] Specifically, for any knowledge blind spot node, inbound and outbound edge traversals are performed along the directed causal relationship edges. Nodes with causal relationship edges pointing to this knowledge blind spot node are identified as parent nodes, and nodes pointed to by this knowledge blind spot node are identified as child nodes. Then, for each child node, all its parent nodes are extracted, and the knowledge blind spot node itself is removed. After deduplication of parent nodes, child nodes, and other parent nodes of child nodes using node identifiers, an initial blanket node group is formed. This initial blanket node group only retains nodes that have a direct causal relationship with the knowledge blind spot node or form a local dependency relationship through shared child nodes, without extending to upstream or downstream nodes at more distant levels.

[0039] Subsequently, a graph replica with the same structure and node attributes as the hypothetical state graph is constructed, and counterfactual masking perturbations are applied to the knowledge-blind nodes in the graph replica. Specifically, the effective propagation weights of all causal relationship edges with the knowledge-blind node as the source or target node are reset to zero, so that the knowledge-blind node no longer propagates or receives information to its parent node, child node, or other parent nodes of its child node in this calculation; the original hypothetical state graph remains unchanged. For the graphs before and after the perturbation, the binary states of entity nodes (hypothesis true and hypothesis false) are used. The local state probability of the node is determined using the output probability distribution retained when generating entity nodes using the large language model, and forward probability propagation is performed according to the topological order and the propagation weights of causal relationship edges to obtain the marginal probability distribution of each node in the initial carpet node group.

[0040] For the same node, the Jensen-Shannon divergence is used to calculate the divergence change for two sets of marginal probability distributions before and after the perturbation. The calculation first obtains the mean distribution of the two sets of marginal probability distributions, then measures the relative entropy of the original marginal probability distribution and the marginal probability distribution after the perturbation relative to the mean distribution, and averages the two results; state terms with zero probability are treated as having zero contribution. The divergence change is a non-negative dimensionless value; the larger the value, the more significant the change in the marginal probability distribution of the node after severing the information association of the knowledge blind zone node. Nodes with divergence changes strictly greater than a preset causal sensitivity threshold are identified as core context nodes; the causal sensitivity threshold is pre-calibrated based on the same probability propagation and divergence calculation caliber. Using the knowledge blind zone node as an anchor point, the original topological connectivity between core context nodes and between the core context nodes and the anchor point is preserved, while isolated nodes not connected to the anchor point are deleted, thus forming a Markov blanket set of knowledge blind zone nodes. In this embodiment, the above scheme can filter out context information with substantial probabilistic influence on knowledge blind zone nodes from locally associated nodes, providing a compact and verifiable set of conditions for subsequent retrieval constraints.

[0041] S32, extract the semantic feature vector of each node in the Markov blanket set, and perform weighted concatenation with the initial semantic features of the knowledge blind zone node.

[0042] Specifically, the entity text of each core context node and the entity text of the knowledge blind node in the Markov blanket set are encoded using the same semantic encoding model to obtain semantic feature vectors with consistent dimensions, and each vector is normalized. The proportion of the divergence change of the core context node to the sum of the divergence changes of all core context nodes is used as the concatenation weight; the larger the divergence change, the higher the weight of the semantic feature vector of the corresponding node. Subsequently, the weighted semantic feature vectors are concatenated in a fixed order of parent node, child node, other parent nodes of the child node, and node identifier, and then concatenated with the initial semantic features of the knowledge blind node to obtain joint semantic features containing local causal context. In this embodiment, the above scheme can preserve the original semantics of the knowledge blind node and highlight the context information with stronger causal relationship with it.

[0043] S33. Based on the concatenated feature vector and the attribute labels of the knowledge blind spots in the hypothetical state graph, construct targeted search terms containing contextual constraints.

[0044] S331, the concatenated feature vector is input into the decoupled autoencoder to separate the structural feature vector representing the depth of the graph hierarchy and the semantic feature vector representing the entity content; S332, parse the attribute labels of the knowledge blind zone nodes in the hypothetical state graph and map them into an exclusive hard constraint mask used to limit the boundary of the knowledge domain; S333, Generate relational predicates based on the structural feature vectors, generate entity slots based on the semantic feature vectors, and combine the relational predicates, entity slots, and the exclusive hard constraint mask according to a preset logical template to construct targeted search terms containing contextual constraints.

[0045] Specifically, the concatenated feature vector is input into a pre-trained decoupled autoencoder. The decoupled autoencoder includes a structural encoding branch, a semantic encoding branch, and a joint decoding branch. The structural encoding branch outputs a structural feature vector, the semantic encoding branch outputs a semantic feature vector, and the joint decoding branch reconstructs the concatenated feature vector based on the two types of feature vectors. During training, the topological hierarchy of nodes in the hypothetical graph is used as structural supervision information, ensuring that the structural encoding branch remains sensitive to the hierarchical positions and connection directions formed by parent nodes, child nodes, and other parent nodes of child nodes. The semantic encoding result corresponding to the entity node text is used as semantic supervision information, ensuring that the semantic encoding branch retains entity content, domain terminology, and contextual meaning. During training, the correlation between the two types of feature vectors is simultaneously constrained, ensuring that the structural encoding branch does not carry the main differences in entity content, and the semantic encoding branch does not carry the main differences in topological hierarchy. The integrity of the decoupling result is controlled by the difference between the reconstructed result after joint decoding and the original concatenated feature vector. If the reconstruction difference of the current input exceeds the allowable range determined during training, no targeted search terms are generated, and the input is marked as a feature decoupling anomaly.

[0046] After decoupling, the attribute labels of the knowledge blind zone nodes in the hypothesis state graph are read. These attribute labels include at least one of the following: domain label, object type label, time validity label, or scope of application label, which can characterize the knowledge domain boundary. The attribute labels are matched against a preset domain ontology and constraint mapping table, and the allowed domain, excluded domain, excluded object, or invalid range corresponding to the attribute label is converted into an exclusive hard constraint mask. This exclusive hard constraint mask is used to limit the candidate retrieval range of the external knowledge base; any document, paragraph, or index item that does not satisfy the mask is not matched. When attribute labels map contradictory boundary conditions, conflict markers are retained, and attribute label normalization processing is returned; conflicts are not eliminated by reducing or deleting constraints. This exclusive hard constraint mask differs from the aforementioned hard mask weights; the former limits the knowledge domain boundary of the retrieval results, while the latter blocks the information flow of knowledge blind zone nodes within the initial hypothesis graph.

[0047] Next, the structural feature vector is input into the relational predicate decoder, which outputs relational predicates that match the topological hierarchy, causal direction, and local connectivity from a preset relational predicate lexicon. The relational predicate lexicon uses the same causal relationship type as the initial hypothesis graph. The semantic feature vector is input into the entity slot decoder to generate corresponding entity slot text. Entity normalization is then performed on the generated text, retaining only entity slots that match the entity text of knowledge blind zone nodes, core context nodes, or a preset thesaurus. Subsequently, the entity slots, relational predicates, and exclusive hard constraint masks are combined according to a preset logical template. The entity slots corresponding to parent nodes are located upstream in the causal relationship, and the entity slots corresponding to child nodes are located downstream. Other parent nodes of the child nodes are inserted as common conditions to define the position of the relational predicate. The exclusive hard constraint mask is written into the search terms as a non-relaxable filtering condition. If a required entity slot or relational predicate is missing from the template, the construction of that search term is stopped to avoid initiating external queries with an incomplete structure. In this embodiment, the above-described scheme can transform local causal structures, entity semantics, and knowledge domain boundaries into targeted search terms with contextual constraints, thereby improving the targeting of external evidence retrieval.

[0048] S4, input the targeted search terms into an external knowledge base for matching and querying to obtain the corresponding external evidence fragments.

[0049] S41, input the targeted search terms into an external knowledge base for multi-hop dense vector matching query to recall the initial candidate text set; S42, extract the timestamp attribute of each text in the initial candidate text set, and apply a penalty weighting to the matching score of each text using a preset time decay function; S43. Sort the texts from highest to lowest according to the weighted matching scores, and extract the Top-K texts to obtain the corresponding external evidence fragments.

[0050] Specifically, documents in the external knowledge base are pre-segmented into text units according to paragraphs or semantically complete fragments, and a dense vector index, text identifier, source identifier, and timestamp attribute are established for each text unit. The targeted search terms are input into the semantic encoding model corresponding to the dense vector index to obtain search term vectors. Within the knowledge domain defined by the exclusive hard constraint mask, the semantic similarity between the search term vectors and the vectors of each text unit is calculated to complete the first-hop matching query. For text units with high matching scores in the first hop that have not been accessed, the entities, relations, and constraint information corresponding to entity slots and relation predicates are extracted as search anchors, and these anchors, together with the original targeted search terms, constitute the input for the next hop search. The next hop search still retains the original exclusive hard constraint mask and does not repeatedly recall accessed text units. When the preset maximum number of hops is reached, no new valid search anchors are generated, or no new text units are recalled, the multi-hop query stops, and the deduplicated text units recalled in each hop are aggregated into an initial candidate text set. When the same text unit is repeatedly recalled in different hops, its highest matching score and corresponding hop information are retained.

[0051] Subsequently, the timestamp attributes of each text unit in the initial candidate text set are read. The timestamp attributes preferentially use the effective time, event occurrence time, or publication date corresponding to the text content, and are uniformly converted to the same time standard. When a text unit has multiple timestamp attributes, the valid timestamp is determined according to the time attribute priority preset by the external knowledge base. The explicit time range contained in the input question is used as the reference time range; if the input question does not contain a time range, the system time that initiated this search is used as the reference time. The time interval between the valid timestamp and the reference time is calculated, and a time penalty weight is generated using a preset time decay function. The time penalty weight is between zero and one; the closer the text time is to the reference time, the greater the time penalty weight; as the time interval increases, the time penalty weight decreases according to a preset decay rule. The original matching score of each text unit is multiplied by the corresponding time penalty weight to obtain the weighted matching score. Text units with missing timestamps, abnormal formats, or times later than the reference time range and without future applicable markers are not included in the sorting process.

[0052] Finally, the initial candidate text set is arranged from highest to lowest according to the weighted matching score. When the weighted matching scores are the same, text units with timestamps closer to the reference time are prioritized. If the time attributes are still the same, they are then arranged according to the fixed order of text identifiers. The top-ranked text units are extracted based on a pre-set extraction quantity, and their original text content, source identifier, timestamp, matching score, weighted matching score, and recall hop count are retained as external evidence fragments. When the number of valid text units is less than the extraction quantity, all valid text units are output. In this embodiment, the above scheme can associate multi-hop evidence within the knowledge domain boundary and reduce the interference of time-insensitive text on subsequent verification.

[0053] S5, calculate the semantic alignment degree between the external evidence fragment and the corresponding knowledge blind spot node to obtain the evidence alignment verification matrix.

[0054] S51, the external evidence fragment is taken as a premise, and the hypothesis statement of the corresponding knowledge blind spot node is taken as a hypothesis, and input into the pre-trained natural language reasoning model; S52, output the implied probability, neutral probability and contradictory probability of the premise to the hypothesis, and use the difference between the implied probability and the contradictory probability as the semantic alignment degree between the external evidence fragment and the corresponding knowledge blind spot node. S53, arrange the semantic alignment of all knowledge blind spot nodes with the corresponding external evidence fragments in a two-dimensional arrangement to obtain the evidence alignment verification matrix.

[0055] Specifically, for each knowledge blind spot node, its entity text, relation type, and adjacent node information in the initial hypothesis graph are read and restored to a hypothesis statement containing subject, relation, and object; the hypothesis statement only uses the information already in the graph and does not add unverified facts. The text content of external evidence fragments is read sequentially, with each external evidence fragment used as a premise and the corresponding hypothesis statement of the knowledge blind spot node used as a hypothesis. The fragments are then segmented and encoded according to the premise-hypothesis input format required by the pre-trained natural language reasoning model. When an external evidence fragment exceeds the model's maximum input length, it is divided into multiple sub-fragments according to the natural language sentence boundaries. Reasoning is performed on each sub-fragment separately, and the result of the sub-fragment containing the strongest support and the weakest contradictory support is taken as the valid reasoning result for that external evidence fragment.

[0056] For each premise-hypothesis combination, the natural language inference model outputs raw predicted values ​​for three categories of outcomes: implication, neutrality, and contradiction. After normalization, these values ​​are obtained as implication probability, neutrality probability, and contradiction probability, which sum to one. A higher implication probability indicates stronger support for the hypothesis statement from external evidence; a higher contradiction probability indicates a more significant inconsistency between the external evidence and the hypothesis statement; and the neutrality probability characterizes the state where the evidence fails to provide clear support or refutation. The value obtained by subtracting the contradiction probability from the implication probability is determined as the semantic alignment degree. The semantic alignment degree is a dimensionless value ranging from -1 to 1. A positive semantic alignment degree indicates that the evidence tends to support the hypothesis, a negative degree indicates that the evidence tends to reject the hypothesis, and a value close to zero indicates a lack of clear implication or contradiction between the evidence and the hypothesis.

[0057] Subsequently, matrix rows are determined according to the fixed order of the knowledge blind zone node identifiers, and matrix columns are determined according to the fixed order of the weighted matching scores, source identifiers, and text identifiers of the external evidence fragments. Premise-hypothesis reasoning is performed on each knowledge blind zone node and each external evidence fragment, and the corresponding semantic alignment is written into the corresponding row and column positions. Simultaneously, the implied probability, neutral probability, contradictory probability, and valid sub-fragment identifier are associated and stored to obtain the evidence alignment verification matrix. When the input encoding is abnormal or the reasoning result is missing, the corresponding matrix unit is marked as invalid, not replaced by a zero value. In this embodiment, the above scheme can quantify the degree to which external evidence supports or refutes each knowledge blind zone node, providing a comparable verification basis for subsequent graph updates.

[0058] S6. Based on the evidence alignment verification matrix, update the hypothesis state graph. If the global confidence of the updated hypothesis state graph satisfies the convergence condition, extract the verified logical reasoning chain based on the updated hypothesis state graph and output the final answer.

[0059] S61, extract the maximum alignment value corresponding to each knowledge blind spot node from the evidence alignment verification matrix; S62, when the maximum alignment value is greater than the preset acceptance threshold, the hypothesis statement of the corresponding knowledge blind node in the hypothesis state graph is replaced by the corresponding external evidence fragment, and the mask mark of the node is removed, thus completing the graph update operation of the hypothesis state graph and obtaining the updated hypothesis state graph. S63, calculate the weighted sum of the confidence scores of all nodes in the updated hypothetical state graph, and use it as the global confidence score; S64, if the global confidence is greater than the preset convergence threshold, determine that the global confidence of the updated hypothesis state graph satisfies the convergence condition, perform graph traversal along the causal relationship edges in the updated hypothesis state graph, extract the verified logical reasoning chain and output the final answer.

[0060] Specifically, knowledge blind nodes are read one by one according to the row identifiers of the evidence alignment verification matrix. The node with the highest semantic alignment value is then selected from the valid matrix cells in the corresponding row as the maximum alignment value for that knowledge blind node. If multiple external evidence fragments have the same maximum alignment value, the target external evidence fragment is determined in the following order: higher implied probability, higher weighted matching score, and timestamp closer to the reference time. Matrix cells marked as invalid are not included in the comparison of maximum alignment values; if no valid matrix cell exists in the corresponding row, the original hypothesis statement and mask label of the knowledge blind node are retained.

[0061] When the maximum alignment value is strictly greater than the preset acceptance threshold, the subject, relationship, and object information corresponding to the knowledge blind zone node are extracted from the external evidence fragments of the target, forming an evidence support statement with a source identifier. The evidence support statement should cover the unverified relationship in the original hypothesis statement and must not change the node identifier, the boundary of its knowledge domain, or the direction of existing causal relationship edges of the knowledge blind zone node; if a complete evidence support statement cannot be formed, no replacement operation is performed. The verified evidence support statement replaces the original hypothesis statement, and the target external evidence fragment identifier, source identifier, timestamp, and maximum alignment value are written into the node's evidence attributes. Subsequently, the knowledge confidence of the node is recalculated based on the updated hypothesis statement, and the hard mask mark of the node is removed. For nodes that still retain the knowledge blind zone mark and cascading failed nodes, their original mask marks are not automatically removed due to the update of this node.

[0062] Next, the number of downstream nodes reachable by each node in the updated hypothetical state graph is counted, and the node itself is added to this number to obtain the node's topological importance. The topological importance of each node is normalized to obtain the node's confidence weight. When calculating the global confidence, nodes not masked are weighted using their knowledge confidence, nodes with hard masking are weighted with zero confidence, and nodes with soft masking have their knowledge confidence attenuated by the soft masking weight before being weighted. The weighted results of all nodes are summed to obtain the global confidence. The convergence threshold is pre-determined based on the same node confidence weight, masking rules, and historical verification samples. When the global confidence is strictly greater than the convergence threshold, the updated hypothetical state graph is deemed to meet the convergence condition; otherwise, nodes without unmasked labels proceed to the next round of retrieval enhancement processing.

[0063] After the convergence condition is met, the target node corresponding to the conclusion sought in the input problem is determined, and a graph traversal is performed from the upstream cause node to the target node along the directed causal relationship edges. During the traversal, only nodes and relationship edges without hard mask labels and whose hypothesis statements have been supported by evidence or whose knowledge confidence meets preset requirements are retained; when multiple reachable paths exist, the path with the higher overall weight of the causal relationship edge is selected first. The node statements, causal relationships, and corresponding evidence attributes in the retained paths are organized into a verified logical reasoning chain in topological order, and the final answer is generated accordingly. In this embodiment, the above scheme can update local hypotheses based on the evidence verification results and output a logically based final answer when the global confidence condition is met.

Claims

1. A retrieval-enhanced reasoning method based on hypothesis-driven cognitive loops, characterized in that, include: The input question is obtained, and a large language model is called to generate an initial hypothesis graph. The knowledge confidence of each hypothesis node in the initial hypothesis graph is calculated. Nodes with knowledge confidence scores below a preset threshold are extracted as knowledge blind spots, and a hypothesis state map containing these knowledge blind spots is obtained. Targeted search terms are constructed based on the knowledge blind spots in the hypothetical state graph. The targeted search terms are input into an external knowledge base for matching and querying to obtain corresponding external evidence fragments. Calculate the semantic alignment degree between the external evidence fragment and the corresponding knowledge blind spot node to obtain the evidence alignment verification matrix; The hypothesis state graph is updated based on the evidence alignment verification matrix. If the global confidence of the updated hypothesis state graph satisfies the convergence condition, the verified logical reasoning chain is extracted based on the updated hypothesis state graph and the final answer is output.

2. The retrieval-enhanced reasoning method based on hypothesis-driven cognitive loop according to claim 1, characterized in that, The input acquisition problem involves calling a large language model to generate an initial hypothesis graph and calculating the knowledge confidence of each hypothesis node in the initial hypothesis graph, including: Obtain the input question, input the input question into the prompt word template, and call the large language model to generate an initial hypothesis graph containing multiple entity nodes and causal relationship edges; Obtain the output probability distribution of the large language model when generating each entity node, and calculate the normalized information entropy of the output probability distribution; The inverse of the normalized information entropy is used as the inherent certainty of the node, and combined with the transit weight of the causal relationship edge, the knowledge confidence of each hypothetical node in the initial hypothesis graph is calculated.

3. The retrieval-enhanced reasoning method based on hypothesis-driven cognitive loop according to claim 1, characterized in that, The step of extracting nodes with knowledge confidence scores below a preset threshold as knowledge blind spots, and obtaining a hypothesis state graph containing the knowledge blind spots, includes: The initial hypothesis graph is topologically sorted, and nodes with knowledge confidence scores below a preset threshold are extracted as knowledge blind spots according to the topological hierarchy. For each of the aforementioned knowledge blind spots, its downstream connected nodes are marked as cascade failure nodes; The knowledge blind zone nodes and the cascaded failure nodes are masked in the initial hypothesis graph to obtain a hypothesis state graph containing the knowledge blind zone nodes.

4. The retrieval-enhanced reasoning method based on hypothesis-driven cognitive loop according to claim 3, characterized in that, The step of masking the knowledge blind spot nodes and the cascaded failure nodes in the initial hypothesis graph to obtain a hypothesis state graph containing the knowledge blind spot nodes includes: Calculate the topological shortest path length from the cascaded failed node to the knowledge blind spot node; Based on the shortest path length of the topology, soft mask weights that decrease with the path length are assigned to the cascaded failure nodes, and hard mask weights that block the information flow are assigned to the knowledge blind spot nodes. The soft mask weights and hard mask weights are injected as node attributes into the initial hypothesis graph to complete the operation of masking the knowledge blind zone nodes and the cascaded failure nodes in the initial hypothesis graph, thereby obtaining a hypothesis state graph containing the knowledge blind zone nodes and the distribution of mask weights.

5. The retrieval-enhanced reasoning method based on hypothesis-driven cognitive loop according to claim 1, characterized in that, The construction of targeted search terms based on the knowledge blind spots in the hypothetical state graph includes: In the hypothetical state graph, the parent node, child node, and other parent nodes of the child node of the knowledge blind spot node are extracted to form the Markov blanket set of the knowledge blind spot node. Extract the semantic feature vector of each node in the Markov blanket set, and then perform a weighted concatenation with the initial semantic features of the knowledge blind zone node; Based on the concatenated feature vector and the attribute labels of the knowledge blind spots in the hypothetical state graph, a targeted search term containing contextual constraints is constructed.

6. The retrieval-enhanced reasoning method based on hypothesis-driven cognitive loop according to claim 5, characterized in that, The step involves extracting the parent node, child node, and other parent nodes of the child nodes from the hypothetical state graph to form a Markov blanket set of the knowledge blind zone nodes, including: In the hypothetical state graph, based on directed edge traversal, the parent node, child node, and other parent nodes of the child node of the knowledge blind zone node are extracted as the initial blanket node group. A counterfactual mask perturbation is applied to the knowledge blind zone node to block information transmission between it and the initial blanket node group, and the divergence change of the marginal probability distribution of each node in the initial blanket node group before and after the perturbation is calculated. Nodes whose divergence change is greater than a preset causal sensitivity threshold are selected as core context nodes. Based on the topological connected subgraph of the core context nodes, a Markov blanket set of the knowledge blind zone nodes is constructed.

7. The retrieval-enhanced reasoning method based on hypothesis-driven cognitive loop according to claim 5, characterized in that, The construction of targeted search terms with context constraints based on the concatenated feature vector and the attribute labels of the knowledge blind spots in the hypothetical state graph includes: The concatenated feature vectors are input into the decoupled autoencoder to separate the structural feature vectors representing the depth of the graph hierarchy and the semantic feature vectors representing the content of entities. The attribute labels of the knowledge blind zone nodes in the hypothetical state graph are parsed and mapped to an exclusive hard constraint mask used to limit the boundary of the knowledge domain. Relational predicates are generated based on the structural feature vectors, entity slots are generated based on the semantic feature vectors, and the relational predicates, entity slots, and exclusive hard constraint masks are combined according to a preset logical template to construct targeted search terms containing contextual constraints.

8. The retrieval-enhanced reasoning method based on hypothesis-driven cognitive loop according to claim 1, characterized in that, The step of inputting the targeted search terms into an external knowledge base for matching and querying to obtain corresponding external evidence fragments includes: The targeted search terms are input into an external knowledge base for multi-hop dense vector matching query to recall the initial candidate text set; Extract the timestamp attribute of each text in the initial candidate text set, and apply a penalty weighting to the matching score of each text using a preset time decay function; Sort the texts from highest to lowest according to the weighted matching scores, and extract the top-K texts to obtain the corresponding external evidence fragments.

9. The retrieval-enhanced reasoning method based on hypothesis-driven cognitive loop according to claim 1, characterized in that, The step of calculating the semantic alignment degree between the external evidence fragment and the corresponding knowledge blind spot node to obtain the evidence alignment verification matrix includes: The external evidence fragments are used as premises, and the hypothetical statements of the corresponding knowledge blind spots are used as hypotheses, which are then input into the pre-trained natural language reasoning model. Output the implied probability, neutral probability, and contradictory probability of the premise to the hypothesis, and use the difference between the implied probability and the contradictory probability as the semantic alignment degree between the external evidence fragment and the corresponding knowledge blind spot node. The semantic alignment of all knowledge blind spot nodes with their corresponding external evidence fragments is arranged in two dimensions to obtain the evidence alignment verification matrix.

10. The retrieval-enhanced reasoning method based on hypothesis-driven cognitive loop according to claim 1, characterized in that, The hypothesis state graph is updated based on the evidence alignment verification matrix. If the global confidence of the updated hypothesis state graph satisfies the convergence condition, the verified logical reasoning chain is extracted based on the updated hypothesis state graph, and the final answer is output, including: Extract the maximum alignment value corresponding to each knowledge blind spot node from the evidence alignment verification matrix; When the maximum alignment value is greater than the preset acceptance threshold, the hypothesis statement of the corresponding knowledge blind node in the hypothesis state graph is replaced by the corresponding external evidence fragment, and the mask mark of the node is removed, thus completing the graph update operation of the hypothesis state graph and obtaining the updated hypothesis state graph. Calculate the weighted sum of the confidence scores of all nodes in the updated hypothetical state graph, and use it as the global confidence score; If the global confidence level is greater than the preset convergence threshold, it is determined that the global confidence level of the updated hypothesis state graph meets the convergence condition. Then, graph traversal is performed along the causal relationship edges in the updated hypothesis state graph to extract the verified logical reasoning chain and output the final answer.