Method and system for retrieval quality optimization of evidence chain constraint decoding of large language model
By constructing a structured evidence space and prefix tree-constrained decoding, the generation of evidence chains in large language models is optimized, resolving the contradiction between retrieval and inference performance and improving retrieval quality and the effectiveness of downstream inference.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING UNIV OF POSTS & TELECOMM
- Filing Date
- 2026-04-23
- Publication Date
- 2026-05-26
AI Technical Summary
Existing large language models exhibit a contradiction between retrieval and inference performance in intelligent question answering and knowledge retrieval scenarios. While recall increases, conversion rates decrease, and existing methods fail to systematically optimize retrieval quality, resulting in a bottleneck of high recall but low conversion.
By constructing a structured evidence space, a set of candidate evidence chains highly relevant to the question is generated. Then, by using a prefix tree constraint decoding mechanism, the large language model is limited to selectively outputting token sequences in the prefix tree structure. Combined with the sorting optimization of the retrieved text set, a highly relevant and low-noise evidence chain is generated.
Without significantly sacrificing recall coverage, it improves the fidelity and verifiability of the evidence chain, explicitly presents key related evidence, and enhances the effective contribution of search content to downstream reasoning, balancing reasoning effectiveness and engineering efficiency.
Smart Images

Figure CN122087100A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of information technology and data technology, and in particular to a method and system for optimizing the quality of evidence chain constraint decoding retrieval for large language models. Background Technology
[0002] Retrieval-Augmented Generation (RAG) provides factual support to large language models by retrieving external knowledge, mitigating illusions and enhancing timeliness. It is a commonly used technique in scenarios such as intelligent question answering, knowledge retrieval, and enterprise knowledge base question answering. However, existing methods generally face a contradiction between recall and inference effectiveness. On the one hand, structurally enhanced RAG methods achieve high recall rates through graph structures, hierarchical summarization, or community partitioning, but they cannot effectively suppress noise and lack evidence visualization, making it difficult to guarantee retrieval quality. On the other hand, inference-enhanced methods guide reasoning by retrieving or generating inference chains, which can reduce noise to some extent and explicitly present evidence, but usually sacrifice recall coverage and are accompanied by high computational costs. Quantitative studies show that as retrieval recall increases, the contribution of retrieval content to inference (Recall-to-Conversion Rate, RCR) shows a linear decreasing trend. Traditional retrieval evaluation metrics such as Recall@n and NDCG only measure "whether relevant documents are hit," ignoring whether the retrieval content effectively supports downstream inference. Existing methods have failed to systematically optimize retrieval quality, resulting in a bottleneck of "high recall, low conversion".
[0003] In addition, in order to generate structured reasoning evidence, methods such as TRACE attempt to construct knowledge graphs from retrieved text and generate logical triple chains as the basis for answers. However, these methods require complex multi-round generation or search strategies, which leads to a significant increase in end-to-end latency and computational overhead. If reasoning chains are allowed to be generated on free vocabularies, problems such as chain fidelity or format drift can easily occur, weakening the contribution of evidence to retrieval optimization and downstream answers. Summary of the Invention
[0004] The present invention aims to at least partially solve one of the technical problems in the related art.
[0005] Therefore, the first objective of this invention is to propose a method for optimizing the quality of evidence chain constraint decoding retrieval in large language models, comprising the following steps:
[0006] S1, based on the input question, construct a structured evidence space on the set of retrieved texts obtained from the initial retrieval, and generate a set of candidate evidence chains that are highly relevant to the question; S2, construct a prefix tree based on the candidate evidence chain set, and use the constraint decoding mechanism to enable the large language model to obtain the evidence chain from the prefix tree set and output it; S21, linearize the candidate evidence chain set into token sequences one by one, and organize each token sequence into a prefix tree structure; S22, based on the prefix state management function and the output constraint function, restricts the large language model to selectively output token sequences in the prefix tree structure to construct a set of evidence chains; S3. Group the documents according to the order in the search text set, and search for documents with verifiable contributions in the lower-ranked documents based on the chain of evidence. Then, perform a secondary sorting of the search text set based on the search results.
[0007] In one embodiment of the present invention, S1 further includes: S11: Obtain the set of search texts through initial retrieval, extract entities and relationships from each document, and organize the extraction results into document subgraphs. S12, extract the key entities of the input problem to form an entity set, and use a similarity matching strategy to map the subgraph nodes and key entities of the problem into vector representations; S13, the vector representations are filtered using a similarity threshold to form an initial node set; S14: Starting from the initial node, candidate paths are generated using depth-first search or controlled graph search under the constraint of the maximum number of hops. S15 evaluates candidate paths based on local correlation and outputs a set of candidate evidence chains.
[0008] In one embodiment of the present invention, S2 further includes: S21, linearize the candidate evidence chain set into a token sequence one by one, and insert a prefix tree structure before each token sequence; S22, based on the anti-prefix masking constraint function and the output restriction constraint function, restricts the large language model to output the evidence chain from the token sequence without masking the token sequence prefix.
[0009] In one embodiment of the present invention, S3 further includes: S31, divide the search text set into a high-confidence search text set and a low-confidence long-tail search text set according to the search ranking; S32, perform ice machine processing on the triples appearing in the evidence chain set to obtain the evidence triple set; S33. If any document in the low-confidence long-tailed search text set contains any evidence triple, then the document is judged to have a verifiable contribution. S34. After finding all documents with verifiable contributions in the low-confidence long-tail search text set, optimize the search text set and perform a secondary sort.
[0010] In one embodiment of the present invention, the expression for the initial node set in step S13 is:
[0011] in, Represents nodes in a subgraph of a document. For the set of key entities in the problem, This represents the similarity threshold used for node filtering. To represent the semantic similarity function, These are nodes in the literature sub-map.
[0012] In one embodiment of the present invention, the expression for evaluating candidate paths based on local correlation in step S15 is:
[0013] in, P A candidate path is represented by multiple triples. α This represents the path length penalty coefficient, used to control the degree of penalty for excessively long paths. Indicates the first in the path A triplet, For input questions, This represents the threshold for determining a high-confidence triple.
[0014] In one embodiment of the present invention, the prefix state management function in step S2 is:
[0015] in, For token sequence, For input questions, For token serial number, This represents the collection of search texts obtained from the retrieval process. The output constraint function is:
[0016] in, This represents a candidate chain of evidence.
[0017] To achieve the above objectives, a second aspect of the present invention proposes a system for optimizing the quality of evidence chain constraint decoding retrieval for large language models, comprising: The candidate evidence space identification module is used to construct a structured evidence space based on the set of searched texts obtained from the initial retrieval, and generate a set of candidate evidence chains that are highly relevant to the question, based on the input question. The precise evidence chain generation module is used to construct a prefix tree based on the candidate evidence chain set, and to enable the large language model to obtain and output the evidence chain from the prefix tree set based on the constraint decoding mechanism; The precise evidence chain generation module linearizes the candidate evidence chain set into token sequences one by one, organizes each token sequence into a prefix tree structure, and, based on the prefix state management function and the output constraint function, restricts the large language model to selectively output token sequences in the prefix tree structure to construct the evidence chain set. The retrieval context optimization module is used to group documents according to their order in the retrieval text set, search for documents with verifiable contributions among the lower-ranked documents based on precise evidence chains, and perform a secondary sorting of the retrieval text set based on the search results.
[0018] In one embodiment of the present invention, the candidate evidence space identification module is further configured to: The initial search yields a set of search texts. Entities and relationships are extracted from each document, and the extraction results are organized into document subgraphs. By extracting key entities from the input problem and forming an entity set, a similarity matching strategy is used to map subgraph nodes and key entities into vector representations. The vector representations are filtered using a similarity threshold to form an initial set of nodes; Starting from the initial node, candidate paths are generated using depth-first search or controlled graph search under the constraint of the maximum number of hops. The candidate paths are evaluated based on local correlation, and a set of candidate evidence chains is output.
[0019] To achieve the above objectives, a third aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in the first aspect.
[0020] The method, system, and storage medium of this invention, without significantly sacrificing recall coverage, construct a candidate evidence space and generate constrained evidence chains within that space, ensuring that the generated evidence chains always fall within the candidate set, thus guaranteeing the fidelity and verifiability of the evidence chains from the source. Furthermore, the generated evidence chains are used to filter and reorganize the retrieval context, thereby reducing interfering information, explicitly presenting key related evidence, and improving the effective contribution of retrieval content to downstream reasoning, achieving the goal of balancing reasoning effectiveness and engineering efficiency.
[0021] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0022] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 This is a flowchart of an evidence chain constraint decoding retrieval quality optimization method for a large language model according to an embodiment of the present invention; Figure 2 This is a structural diagram of an evidence chain constraint decoding retrieval quality optimization system for a large language model according to an embodiment of the present invention; Figure 3 This is a structural diagram of the candidate evidence space identification module of an evidence chain constraint decoding retrieval quality optimization system for a large language model according to an embodiment of the present invention. Figure 4 This is a structural diagram of the precise evidence chain generation module of an evidence chain constraint decoding retrieval quality optimization system for a large language model according to an embodiment of the present invention; Figure 5 This is a structural diagram of the retrieval context optimization module of an evidence chain constraint decoding retrieval quality optimization system for a large language model according to an embodiment of the present invention; Figure 6 This is a flowchart of the method in the hypertension case of the present invention. Detailed Implementation
[0023] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0024] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0025] The following describes, with reference to the accompanying drawings, an evidence chain constraint decoding retrieval quality optimization method and system for a large language model according to an embodiment of the present invention.
[0026] Example 1 In retrieval enhancement generation tasks, the goal of the retrieval module is not only to hit as many relevant documents as possible, but more importantly, for the retrieved content to be effectively converted into the correct answer by the model. Existing techniques often utilize Recall Conversion Rate (RCR). Let the query set be Q, and the set of true supporting documents for the query q∈Q be... D ( qThe generated answer is A, and the standard answer is A. Traditionally, Recall@n is defined as the document coverage rate, while RCR is defined as the ratio of F1 score to recall.
[0027] Recall and accuracy (RCR) reveal the conversion efficiency between retrieval recall and inference precision, and expose the phenomenon that existing methods experience RCR decay as recall increases. Therefore, the key to improving retrieval quality lies in making the search content more conducive to inference, rather than simply increasing the hit rate.
[0028] like Figure 1 As shown, this invention proposes a method for optimizing the quality of decoding retrieval based on evidence chain constraints in a large language model. This method consists of three main modules: candidate evidence space identification, accurate evidence chain generation, and retrieval context optimization.
[0029] Specific processing lines are as follows: Figure 1 As shown: First, a broader candidate evidence chain is generated in the literature / knowledge structure. Then, a faithful evidence chain is generated by decoding through prefix tree constraints. Finally, the evidence chain is used to retain and filter the retrieved literature, outputting a highly relevant, low-noise, and traceable evidence context.
[0030] Specifically, the steps include: S1, based on the input question, constructs a structured evidence space on the set of retrieved texts obtained from the initial retrieval, and generates a set of candidate evidence chains that are highly relevant to the question.
[0031] After completing the initial search for the problem, further investigation of the evidence chain is needed to improve the accuracy of the search results.
[0032] In existing technologies, a structured sequence of information supporting reasoning is defined as an evidence chain. An evidence chain consists of several nodes connecting query-related entities, relationships, and facts, demonstrating the path of association between information. Research shows that the reasoning value of retrieved text is not uniformly distributed but concentrated on the evidence chains connecting query entities and relationships. Therefore, mining and explicitly presenting evidence chains from search results is crucial for improving search quality and reasoning accuracy.
[0033] Specifically, for the initial search text set D, entities and relations are extracted from each document, and the extraction results are organized into a document subgraph G=(V,E). Here, G represents the result graph, V represents the nodes in the graph, and E represents the relations in the graph.
[0034] Subsequently, for the input question, a set of key entities E is extracted using a large language model or rule / dictionary methods. q={e1,e2,…,e m}
[0035] To identify the set of starting nodes most relevant to the problem within the subgraph, this invention employs a similarity matching strategy, linking graph node v with the problem entity set E. q They are mapped to vector representations respectively, and the initial node set is filtered using a similarity threshold tau_node. .
[0036] ; in, This represents the similarity threshold used for node filtering. To represent the semantic similarity function, These are nodes in the literature sub-map.
[0037] Through this step, the system can narrow the search scope to a local region that is semantically close to the problem entity, thereby reducing graph traversals that are irrelevant to the problem from the source.
[0038] Then, dynamic path exploration is performed. From Starting from this point, the present invention performs a depth-first search (DFS) or an equivalent controlled graph search under the constraint of a maximum hop count K to generate candidate paths P. For the current node... traversing its neighbors And its relation r, forming a triplet t = ( , r, And calculate the local relevance score of the triplet to problem q:
[0039] To control the search size and reduce noise, this invention introduces an edge-level threshold tau_edge, which only allows expansions that satisfy the threshold.
[0040] Subsequently, the searched paths are scored. After obtaining a large number of candidate paths, local relevance alone is insufficient to determine whether the entire path is "short and crucial, revolves around the problem, and each hop is credible." Therefore, this invention constructs a comprehensive score (score(P)) for each candidate path P=[t1,t2,…,t|P|], and sorts and retains high-quality candidate evidence chains accordingly.
[0041]
[0042] in, P A candidate path is represented by multiple triples. α This represents the path length penalty coefficient, used to control the degree of penalty for excessively long paths. Indicates the first in the path A triplet, For input questions, This represents the threshold for determining a high-confidence triple.
[0043] Finally, this module outputs a set of candidate evidence chains P_cand (which can take the top-M chains with the highest score(P)), providing a controllable candidate space for subsequent constraint decoding.
[0044] S2 constructs a prefix tree based on the candidate evidence chain set, and uses a constraint decoding mechanism to enable the large language model to obtain evidence chains from the prefix tree set and output them.
[0045] As a further step, step S2 includes: S21, linearize the candidate evidence chain set into token sequences one by one, and organize each token sequence into a prefix tree structure.
[0046] The candidate path set P_cand is linearized into a token sequence one by one (for example, the triple sequence is converted into text "entity-relationship-entity-relationship-entity...", and then tokenized). A prefix tree Trie structure T_prefix is then inserted. The prefix tree can save storage while quickly determining the next set of allowed tokens under the current prefix during the generation process, limiting the generation space to all feasible prefixes and complete paths in the candidate path set, which facilitates constraint decoding.
[0047] S22, based on the prefix state management function (i.e. the anti-prefix masking constraint function) and the output restriction constraint function, restricts the large language model to selectively output token sequences in the prefix tree structure to construct a set of evidence chains.
[0048] Let the model output evidence chain be a token sequence e = [e1, e2, ..., e_|e|]. Conventional decoding relies solely on language model probabilities. Select the next token; this invention introduces a constraint function. This causes tokens that do not conform to the candidate prefix to be hard-blocked (probability set to 0).
[0049] The prefix state management function is:
[0050] in, For token sequence, For input questions, For token serial number, This represents the collection of search texts obtained from the retrieval process. The output constraint function is:
[0051] in, This represents a candidate chain of evidence.
[0052] Meanwhile, considering the possibility of multiple complementary evidence chains, this invention uses beam search under constrained decoding to generate multiple high-probability evidence chains, thus fully generating candidate evidence chains.
[0053] S3. Group the documents according to the order in the search text set, and search for documents with verifiable contributions in the lower-ranked documents based on the chain of evidence. Then, perform a secondary sorting of the search text set based on the search results.
[0054] Specifically, the initial search text set D is first divided into the top N high-confidence search text sets according to the search ranking. The set of low-confidence long-tail search texts ranked after N. Long-tail regions are more prone to noise and may also contain evidence documents that "failed to be ranked higher but still hit key relationships." Therefore, the set of evidence triples is obtained by unifying all triples appearing in the precise evidence chain set E_precise. .right If any document d contains any evidence triple (or an equivalent relational expression), then that document is deemed to have a verifiable contribution to the problem.
[0055] ; Finally, a second sort is performed on the optimized context set (i.e., the set of retrieved texts).
[0056] .
[0057] Example 2 like Figure 2 As shown, this invention proposes an evidence chain constraint decoding retrieval quality optimization system 10 for large language models, comprising: The candidate evidence space identification module 100 is used to construct a structured evidence space based on the set of retrieved texts obtained from the initial retrieval, and generate a set of candidate evidence chains that are highly relevant to the question, based on the input question.
[0058] like Figure 3As shown, the core objective of this module is to construct a structured evidence space for multi-hop reasoning based on the initial retrieval set D, given the input question q. It then generates a set of candidate evidence chains P_cand that are highly relevant to the question through a combination of "question entity extraction + threshold-pruned graph search + comprehensive scoring." The key problem addressed by this module is that the initial retrieval often contains a large amount of seemingly relevant but unhelpful noisy literature, as well as implicit evidence that requires cross-sentence / paragraph / document cross-references to reach a conclusion. This module explicitly presents the evidence and relationships through graph structures, enabling subsequent models to reason and filter within a controllable space.
[0059] The precise evidence chain generation module 200 is used to construct a prefix tree based on the candidate evidence chain set, and to enable the large language model to obtain the evidence chain from the prefix tree set and output it based on the constraint decoding mechanism.
[0060] like Figure 4 As shown, the core objective of this module is to leverage the "Trie + Constrained Decoding" mechanism, based on the candidate evidence chain set P_cand, to force the large language model to output only evidence chains from the candidate space, thereby significantly reducing model illusions (fabricating non-existent relationships or conclusions). Unlike traditional generative methods, this module does not allow the model to freely generate answers, but rather allows it to make constrained choices within the candidate evidence space, outputting a traceable and precise evidence chain set E_precise. The output of this module will be directly used for subsequent "retrieval context optimization," filtering out noisy documents and replenishing key long-tail documents based on the evidence chains.
[0061] The retrieval context optimization module 300 is used to group documents according to their order in the retrieval text set, search for documents with verifiable contributions among the lower-ranked documents based on precise evidence chains, and perform secondary sorting of the retrieval text set based on the search results.
[0062] like Figure 5 As shown, the core objective of this module is to transform the "precise chain of evidence" into an executable optimization strategy for the retrieved text set D, outputting a more refined, relevant, and reasoning-ready context set D_refined, thereby improving the effectiveness and reliability of downstream diagnostic opinions. This module mainly addresses two practical problems: (1) Although the initial search results are highly relevant, they may still contain duplicate or redundant content that is irrelevant to the key conclusions; (2) Key evidence may fall in long-tail literature with lower search rankings. Directly truncating the Top-N will miss key evidence.
[0063] Therefore, this module adopts a strategy of "Top-N retention + evidence chain to save the long tail + removal of noise without evidence" to ensure that the final context neither excessively loses recall nor excessively introduces noise.
[0064] Example 3 To more clearly illustrate the system proposed in this invention, the following example of hypertension will be used to explain the system proposed in this invention.
[0065] like Figure 6 As shown, this system includes a problem access and structuring module M1, an initial retrieval module M2, a candidate evidence space identification module M3 (problem entity extraction + threshold pruning graph search + comprehensive scoring), a precise evidence chain generation module M4 (prefix tree + constraint decoding), a retrieval context optimization module M5 (Top-N retention + evidence chain rescue of long tails + removal of noise without evidence), and an opinion generation module M6.
[0066] Among them, M3-M5 constitute the core pipeline of "evidence chain mining and retrieval quality optimization", which belongs to a three-stage framework: candidate evidence space identification → accurate evidence chain generation → retrieval context optimization.
[0067] First, the input question and target task are obtained. Specifically, M1 receives the medical question q and patient profile information p, where the medical question q is: What is the target blood pressure for patients with hypertension and atrial fibrillation? Meanwhile, M1 receives the patient profile p, which is used to constrain the retrieval and determine the applicability of evidence; the patient profile p contains at least one or more of the following fields (this is the focus of what you said about "what needs to be considered comprehensively", which directly determines whether the retrieval can be accurate): 1. Type of atrial fibrillation (non-valvular / valvular; persistent / paroxysmal); 2. Whether anticoagulation is required, type of anticoagulation, and bleeding risk warning (in AF scenarios, the dual outcome of "thromboembolism + massive bleeding" must be considered); 3. Age / frailty / fall risk (determines the safe boundary for "low blood pressure"); 4. Comorbidities: CKD, coronary artery disease, heart failure, previous stroke / TIA, diabetes, etc. (affect the acceptable range of target values and monitoring intensity); 5. Blood pressure measurement scenarios and fluctuations: clinic / home / ambulatory blood pressure, orthostatic hypotension, morning peak, etc. (affecting the interpretation of "target value" and extrapolation of evidence).
[0068] Then, the search results were optimized, and the specific steps were as follows: Step 1: Initial search.
[0069] M2 performs vector and keyword searches on the medical question q to obtain an initial search text set D (Top-N documents and their fragments). D contains candidate document fragments related to "hypertension, atrial fibrillation, blood pressure target, stroke / embolism, massive hemorrhage, death," etc.
[0070] Step 2: Candidate evidence space identification.
[0071] ① M3 extracts a set of key entities Eq from the input question q, and uses a similarity threshold to filter the initial node set. This narrows the search scope to a local region that is semantically close to the problem entity, thereby reducing irrelevant graph traversal.
[0072] ② M3 performs a controlled graph search (such as DFS) under the constraint of the maximum hop count K, for the triplet t=( ,r, Calculate the local correlation with problem q and introduce a boundary threshold. Prune low-confidence neighbors.
[0073] ③ M3 performs a comprehensive score (P) on the candidate paths, and retains the Top-M paths as the candidate evidence chain set P_cand, which serves as the candidate space for subsequent constraint decoding.
[0074] (In this embodiment, the typical candidate evidence chains that can be mined in P_cand include at least the following three types, and the system will try its best to mine them all; otherwise, the opinion generation will be "off-topic or lack boundaries") Candidate chain A (target interval chain): AF patients with hypertension → the risk of major cardiovascular events / stroke / heart failure is lowest when the value is 120–129 / <80 → the risk increases in a U-shape when the value is ≥130 / 80 or <120 / 80.
[0075] Candidate Chain B (High-Risk Chain, Dual Outcomes): Non-valvular AF Registry Study → SBP ≥ 136 is an independent risk factor for thromboembolism and major bleeding → The minimum SBP range for events is 114–135, and the risk increases if the SBP exceeds this range.
[0076] Candidate chain C (low-risk chain, safety lower limit): AFFIRM post-hoc analysis → Blood pressure and all-cause mortality U-shaped → SBP / DBP < 110 / 60 and significantly increased risk of death.
[0077] Note: These three chains correspond to "target value landing point", "reasons for not being too high (including major bleeding, which is of most concern to anticoagulation patients)" and "safety boundary that is not too low". The absence of any one of them will result in the lack of key constraints in the opinion generation.
[0078] Step 3: Generating a precise chain of evidence.
[0079] ① The candidate evidence chain set P_cand is linearized by M4 and organized into a prefix tree Trie.
[0080] ② By introducing Trie constraints during the decoding of the large language model using M4, constraint decoding is performed, which allows the model to output evidence chains only within the candidate space, thereby reducing illusions and obtaining a precise set of evidence chains E_precise.
[0081] (This three-stage process of "candidate space → Trie → constrained decoding → precise evidence chain" is consistent with the description of the NeocorRAG framework: activated search obtains the candidate space, and constrained decoding accurately identifies the evidence chain within the candidate space.) Step 4: Optimize the search context.
[0082] ① The initial search set D is divided into sorted subsets by M5. and .
[0083] ② The union of the triples appearing in the precise chain of evidence set E_precise is obtained by M5. and to Implementing "chain of evidence to save the long tail": If If a document contains any evidence triple or equivalent statement, then it is included in the supplementary set. Otherwise, it is judged as unverifiable noise and removed.
[0084] ③ The optimized search context set output by M5 and to After secondary sorting, the results are output to the opinion generation module M6.
[0085] Step 5: Opinion generation.
[0086] Based on M6 E_precise generates recommendations and reasons, and the recommendations must be traceable back to each point in E_precise. The original document fragment.
[0087] Final recommendation: Recommendation strength: Weak recommendation; Recommendation: Target blood pressure at systolic 120–129 mmHg and diastolic <80 mmHg; avoid ≥130 / 80 or <120 / 80, as these are associated with an increased risk of thromboembolism, major hemorrhage, and all-cause mortality.
[0088] Recommendation strength interpretation and individualized constraints: Since the direct evidence mainly comes from observational studies and post-hoc analyses (primarily GRADE C), there is a lack of RCTs specifically targeting different blood pressure targets for patients diagnosed with AF. At the same time, there are significant differences in individual patient risk (age, frailty, anticoagulation, comorbidities). Therefore, the output is a weak recommendation, suggesting individualized decision-making and close monitoring.
[0089] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements a method for optimizing the decoding and retrieval quality of the evidence chain constraint of the aforementioned large language model.
[0090] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0091] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
Claims
1. A method for optimizing the retrieval quality of evidence chain constraint decoding in a large language model, characterized by the following steps: include: S1, based on the input question, construct a structured evidence space on the set of retrieved texts obtained from the initial retrieval, and generate a set of candidate evidence chains that are highly relevant to the question; S2, construct a prefix tree based on the candidate evidence chain set, and use the constraint decoding mechanism to enable the large language model to obtain the evidence chain set from the prefix tree set and output it; S21, linearize the candidate evidence chain set into token sequences one by one, and organize each token sequence into a prefix tree structure; S22, based on the prefix state management function and the output constraint function, restricts the large language model to selectively output token sequences in the prefix tree structure to construct a set of evidence chains; S3. Group the documents according to the order in the search text set, and search for documents with verifiable contributions in the lower-ranked documents based on the chain of evidence. Then, perform a secondary sorting of the search text set based on the search results.
2. The method according to claim 1, characterized in that, S1 further includes: S11: Obtain the set of search texts through initial retrieval, extract entities and relationships from each document, and organize the extraction results into document subgraphs. S12, extract the key entities of the input problem to form an entity set, and use a similarity matching strategy to map the subgraph nodes and key entities of the problem into vector representations; S13, the vector representations are filtered using a similarity threshold to form an initial node set; S14: Starting from the initial node, candidate paths are generated using depth-first search or controlled graph search under the constraint of the maximum number of hops. S15 evaluates candidate paths based on local correlation and outputs a set of candidate evidence chains.
3. The method according to claim 1, characterized in that, S3 further includes: S31, divide the search text set into a high-confidence search text set and a low-confidence long-tail search text set according to the search ranking; S32, perform ice machine processing on the triples appearing in the evidence chain set to obtain the evidence triple set; S33. If any document in the low-confidence long-tailed search text set contains any evidence triple, then the document is judged to have a verifiable contribution. S34. After finding all documents with verifiable contributions in the low-confidence long-tail search text set, optimize the search text set and perform a secondary sort.
4. The method according to claim 2, characterized in that, The expression for the initial node set in step S13 is: in, Represents nodes in a subgraph of a document. For the set of key entities in the problem, This represents the similarity threshold used for node filtering. To represent the semantic similarity function, These are nodes in the literature sub-map.
5. The method according to claim 2, characterized in that, The expression for evaluating candidate paths based on local correlation in step S15 is: in, P A candidate path is represented by multiple triples. α This represents the path length penalty coefficient, used to control the degree of penalty for excessively long paths. Indicates the first in the path A triplet, For input questions, This represents the threshold for determining a high-confidence triple.
6. The method according to claim 1, characterized in that, The prefix state management function mentioned in step S2 is: in, For token sequence, For input questions, For token serial number, This represents the collection of search texts obtained from the retrieval process. The output constraint function is: in, This represents a candidate chain of evidence.
7. A system for optimizing the quality of decoding and retrieval of evidence chains in a large language model, characterized in that, include: The candidate evidence space identification module is used to construct a structured evidence space based on the set of searched texts obtained from the initial retrieval, and generate a set of candidate evidence chains that are highly relevant to the question, based on the input question. The precise evidence chain generation module is used to construct a prefix tree based on the candidate evidence chain set, and to enable the large language model to obtain and output the evidence chain from the prefix tree set based on the constraint decoding mechanism; The precise evidence chain generation module linearizes the candidate evidence chain set into token sequences one by one, organizes each token sequence into a prefix tree structure, and, based on the prefix state management function and the output constraint function, restricts the large language model to selectively output token sequences in the prefix tree structure to construct the evidence chain set. The retrieval context optimization module is used to group documents according to their order in the retrieval text set, search for documents with verifiable contributions among the lower-ranked documents based on precise evidence chains, and perform a secondary sorting of the retrieval text set based on the search results.
8. The system according to claim 7, characterized in that, The candidate evidence space identification module is also used for: The initial search yields a set of search texts. Entities and relationships are extracted from each document, and the extraction results are organized into document subgraphs. By extracting key entities from the input problem and forming an entity set, a similarity matching strategy is used to map subgraph nodes and key entities into vector representations. The vector representations are filtered using a similarity threshold to form an initial set of nodes; Starting from the initial node, candidate paths are generated using depth-first search or controlled graph search under the constraint of the maximum number of hops. The candidate paths are evaluated based on local correlation, and a set of candidate evidence chains is output.
9. A computer-readable storage medium storing a computer program that, when executed by a processor, implements the method of any one of claims 1-6.
Citation Information
Patent Citations
Explanatable pushing method and system based on cognitive large model and industry knowledge graph
CN121706999A
Computerized question answering based on evidence chains
US20240144049A1