A large model retrieval enhancement method based on multi-granularity dynamic adaptation
By constructing a multi-granularity index and a dynamically adapted evidence selection method, the problems of incomplete evidence chains and noise interference caused by improper granularity configuration in multi-hop question answering are solved, achieving a more stable and accurate evidence set construction and improving the performance of multi-hop question answering.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XINJIANG UNIVERSITY
- Filing Date
- 2026-04-21
- Publication Date
- 2026-06-09
Smart Images

Figure CN122175009A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of natural language processing and retrieval enhancement technology, specifically relating to a large-model retrieval enhancement method based on multi-granularity dynamic adaptation. Background Technology
[0002] As the application of large-scale language models continues to expand in open-domain question answering and knowledge-intensive reasoning tasks, retrieval-enhanced generation paradigms are gradually becoming an important technical approach to improve the reliability and controllability of answers. This paradigm typically inputs evidence from external corpora along with the question into the generation model, enabling the model to reference retrieved factual evidence when generating answers, thereby mitigating the illusion and outdated information problems caused by relying solely on parameterized knowledge. For multi-hop question answering tasks, answers often require information splicing and reasoning connections across multiple sentences, paragraphs, or even documents. Relying solely on the model's own memory or single fragments of evidence is often insufficient to form a complete reasoning chain; therefore, retrieval enhancement based on external evidence is even more necessary.
[0003] However, in multi-hop question-answering scenarios, the effectiveness of retrieval enhancement generation highly depends on the overall design of a tightly coupled pipeline: "granularity of corpus segmentation—candidate retrieval—evidence selection / assembly—generation." The granularity of corpus segmentation is a key factor affecting retrieval and subsequent evidence construction: sentence-level segmentation can provide more accurate matching and finer-grained evidence hits, but in multi-hop reasoning, it easily disperses relevant facts into different fragments, thus fragmenting the evidence chain and making it difficult to retain cross-sentence associations; paragraph-level or document-level segmentation can provide more complete context coverage and is more conducive to retaining coreference information and cross-sentence dependencies, but at the same time, it introduces more irrelevant content and redundant details, leading to increased retrieval noise and decreased contextual information density. Meanwhile, under the constraint of a fixed contextual budget (token budget), the construction of the evidence set is not only about "what is retrieved," but also about "which to select within the budget and how to combine them." Without explicit control over the budget and redundancy, phenomena such as evidence stacking, duplicate fragments crowding out the budget, and key evidence being buried will occur, ultimately affecting the readability and answer accuracy of the generation model.
[0004] Existing technologies for enhancing multi-hop question answering retrieval and generation suffer from the following main problems: First, the retrieval granularity and configuration often adopt a one-size-fits-all fixed strategy, with all questions sharing the same granularity and set of retrieval parameters. This ignores the heterogeneity of question information needs, leading to mismatches such as "fine-grained questions requiring precise evidence being diluted by coarse-grained noise" or "questions requiring multi-hop context being fragmented by overly fine-grained segments." Second, candidate pool construction and evidence assembly are often treated as independent stages for heuristic parameter tuning. A common practice is to first select the top-k based on retrieval scores and then directly assemble or truncate them in order. This point-to-point sorting cannot guarantee the complementarity between evidence, easily resulting in duplicate evidence or evidence sets that are "related individually but do not support the reasoning chain when combined." Third, under a fixed budget, there is a lack of consideration for "evidence benefits—" The joint modeling of "fragment length-redundancy relationship" is problematic. Long fragments may consume a large amount of budget due to their high scores, while short fragments may be difficult to form usable inference chains due to fragmentation. Furthermore, the system often does not explicitly penalize near-repetition and information overlap, leading to a decrease in the effective density of contextual information. Fourth, while some existing more complex hierarchical or structured retrieval schemes attempt to coordinate across multiple granularities, they often rely on additional preprocessing structures or complex hierarchical constructions, resulting in high maintenance costs, difficulty in reproducibility, and inconsistencies that can be introduced when the corpus is updated or the index is rebuilt, thus affecting the fairness of evaluation and engineering usability. Fifth, many methods lack a "controllable coordination interface for the entire process," making it difficult to systematically control the retrieval candidate pool and the final evidence set without compromising reproducibility, leading to unstable gains or difficulty in interpreting their sources. Summary of the Invention
[0005] (1) Technical problems to be solved To address the shortcomings of existing technologies, the present invention aims to provide a large-model retrieval enhancement method based on multi-granularity dynamic adaptation, which seeks to solve the problems of low stability and accuracy of existing multi-hop question answering methods.
[0006] (2) Technical solution To address the aforementioned technical problems, this invention provides a large-model retrieval enhancement method based on multi-granularity dynamic adaptation, comprising the following steps: S1: Select the evaluation dataset and perform preprocessing; S2: Construct vector libraries at three granularities; S3: Granularize the input questions; S4: Retrieved TOP-K text blocks related to the question; S5: Select the most suitable text block using the budgeter; S6: Package all selected text blocks and return them to the large model for response.
[0007] Preferably, the dataset in step S1 includes the HotpotQA dataset, the 2WikiMultiHopQA dataset, and the MuSiQue dataset.
[0008] Furthermore, the dataset preprocessing in step S1 includes: unifying the text encoding format and performing normalization processing, and removing illegal characters, blank lines, and duplicate samples.
[0009] Furthermore, the dataset used in step S1 is an internationally publicly released standard multi-hop question-answering dataset, which has good structural standardization and annotation universality, and does not require the introduction of an additional complex quality evaluator.
[0010] Furthermore, the specific steps in step S2 are as follows: S201: Establish a mapping relationship between "sample - evidence document / paragraph / sentence" based on the sample identifiers and evidence identifiers provided in the dataset, and generate a metadata file containing sample ID, data division, evidence source identifier and text content; S202: Construct searchable index input data based on evidence corpus, and segment the same evidence corpus into evidence block sets at the sentence, paragraph and document granularity respectively; S203: Vectorize and encode each granularity of evidence block and establish a vector index to support subsequent approximate nearest neighbor retrieval and fast candidate recall. The vector index is preferably implemented using a vector similarity retrieval library to improve retrieval efficiency and scalability under large-scale corpora.
[0011] Furthermore, in the offline stage of step S3: the same evidence corpus is segmented into three granularities: sentence, paragraph, and document, and corresponding vector indexes are established. At the same time, meta-information such as text block length and source identifier is recorded to support subsequent budget control and deduplication.
[0012] Furthermore, in the offline phase, for each granularity, the corpus is segmented into a set of searchable fragments, and a FAISS index is built using dense vector representation. At the same time, complementary search units are provided by utilizing multi-granularity views: sentence view emphasizes precise location of facts, paragraph view emphasizes local contextual coherence, and document view emphasizes cross-sentence coverage and topical integrity.
[0013] Furthermore, in the online phase of step S3: the input question is vector-encoded, and the router generates granular allocations based on the question characteristics and maps them to retrieval quotas for each granularity.
[0014] Furthermore, in step S4, candidate evidence is retrieved and merged from three indexes during the online phase to form a candidate pool that combines fine-grained clues with coarse-grained background information.
[0015] Furthermore, step S5 specifically involves: scoring the candidate evidence for utility using a budgeter; performing deterministic greedy packaging by comprehensively considering relevance, length cost, and redundancy suppression; selecting a complementary and compact set of evidence under given context budget constraints; and organizing the evidence into a context for the large model to generate answers according to its source and logical order. The budgeter enables the final set of evidence to be more compact, more complementary, and less redundant, while maintaining the controllability and reproducibility of the entire pipeline in the evaluation.
[0016] Beneficial effects Compared with the prior art, the beneficial effects of the present invention are as follows: This invention constructs three simple and aligned index views—sentences, paragraphs, and documents—on the same corpus, and achieves end-to-end coordination from candidate pool formation to in-budget evidence combination through two lightweight modules. The method emphasizes the decomposition idea of "routing first and then packaging": the first module allocates retrieval quotas at different granularities at the question level, thereby adaptively shaping the candidate pool for each question; the second module performs utility scoring and deterministic greedy packaging of candidate fragments within a fixed budget, making the final evidence set more compact, complementary, and less redundant, while maintaining the controllability and reproducibility of the entire pipeline in the evaluation.
[0017] This invention enables adaptive coordination of retrieval granularity, candidate size, and final evidence set under different question types and evidence distribution conditions, improving the integrity of the evidence chain and reducing noise interference. While maintaining the simplicity of the block-based scheme and facilitating maintenance and updates, this invention improves the stability and accuracy of multi-hop question answering. It is suitable for application scenarios such as knowledge base question answering, intelligent retrieval, and question answering services, and can be extended to tasks such as long document question answering and cross-document information aggregation. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating the present invention; Figure 2 This diagram illustrates a comparison between the traditional retrieve-then-read enhanced pipeline and the dynamic multi-granularity enhanced pipeline of this invention. It provides an example problem and demonstrates the fixed-granularity retrieval and packaging steps of the traditional process, as well as the process differences of this invention, which coordinates granularity distribution requests, multi-granularity retrieval, and on-budget packaging. Figure 3 This is a schematic diagram of the overall framework of the method of the present invention, showing three aligned corpus views (sentences / paragraphs / documents), question-level quota allocation, candidate pool fusion and optional rearrangement, on-budget evidence selection and packaging, and the overall process of generating answers; Figure 4This is a schematic diagram showing the ablation comparison of the present invention on three datasets: HotpotQA, 2WikiMultiHopQA, and MuSiQue, demonstrating the EM / F1 differences between the complete system and Router-only, Budgeter-only, and single-granularity retrieval controls; Figure 5 This is a schematic diagram of the training sensitivity analysis of the learnable component of the present invention, showing the EM / F1 variation trend of the routing module and the budgeter module under different training sample sizes, which is used to analyze the module stability and data scale requirements. Figure 6 This is a schematic diagram of the training sensitivity analysis of the learnable component of the present invention, showing the EM / F1 variation trend of the routing module and the budgeter module under different training rounds, which is used to analyze the module stability and data scale requirements. Detailed Implementation
[0019] This specific implementation is a large model retrieval enhancement method based on multi-granularity dynamic adaptation, including the following steps: S1: Select the evaluation dataset and perform preprocessing; To ensure the standardization and consistency of the model input data, the original dataset is preprocessed in a structured manner, the text encoding format is unified and standardized (including case normalization, punctuation and whitespace character normalization), and illegal characters, blank lines and duplicate samples are removed.
[0020] The dataset used is an internationally publicly released standard multi-hop question-answering dataset, which has good structural regularity and annotation universality, so there is no need to introduce an additional complex quality evaluator. In the preprocessing stage, the consistency, integrity and format regularity of the data have been ensured through procedural cleaning, deduplication and structural verification. Preferably, the following consistency checks can also be performed to reduce the impact of noise on indexing and training: removing samples with missing answers or evidence information, removing records with empty evidence text or obvious abnormalities, and performing document-level deduplication verification between different data partitions to reduce the risk of data leakage, thereby ensuring the credibility and reproducibility of the subsequent multi-granularity retrieval, routing allocation and evidence packaging training / evaluation process.
[0021] In this embodiment, the question-answering corpus and evidence corpus for multi-hop question-answering tasks meet the following conditions: A. Corpus Source Scope: We selected publicly available datasets that are representative and widely used in the fields of multi-hop question answering and retrieval enhancement as the source of the original corpus. The HotpotQA dataset was preferred, as it provides multi-hop questions and includes sentence-level supporting facts supervision, making it suitable for testing the construction and interpretability of evidence chains. Simultaneously, we combined it with the 2WikiMultiHopQA dataset, which explicitly provides inference path / evidence information and emphasizes the completeness of multi-hop inference steps. Furthermore, we combined it with the MuSiQue dataset, which reduces the "shortcut" phenomenon through combinatorial construction and is more suitable for evaluating the evidence connectivity required for real multi-hop inference. These datasets cover various question types and cross-document evidence distribution patterns, and are characterized by being publicly reproducible, having standardized partitioning, and being highly comparable. They can effectively support the data requirements for multi-hop question answering tasks, ensuring the stability, applicability, and reproducibility of subsequent algorithm experiments.
[0022] B. Data Scale and Diversity Requirements: To ensure that the multi-granularity retrieval and evidence packaging modules have good learning and generalization capabilities, the selected datasets should meet the requirements of diversity and representativeness in terms of scale and content. The data should at least include a training set and a test set, preferably including a development set for parameter selection and ablation verification. The sample content should cover different problem difficulties and reasoning forms, including entity attribute lookup, cross-document entity alignment, comparison problems, and reasoning problems that require combining multiple evidence fragments, and cover different subject domains and different entity distributions. This will enable the systematic testing of the complementarity between "fine-grained exact matching" and "coarse-grained context preservation," as well as the robustness of the evidence set construction to redundancy and noise.
[0023] C. Data Accuracy: Each sample must contain at least the question text, a standard answer (which may have multiple reference answers), and evidence corpus / meta-information for retrieval and verification. Preferably, the sample further includes an ID for uniquely identifying the sample, an evidence source identifier (such as document title / page ID), and supporting fact or evidence chain annotation information (such as Supporting Facts or reasoning paths) to ensure consistent and professional annotation, and to provide a reliable basis for subsequent multi-granular segmentation, index construction, candidate filtering, and evidence set selection.
[0024] S2: Construct a vector library with three granularities; the specific steps are as follows: S201: Establish a mapping relationship between "sample - evidence document / paragraph / sentence" based on the sample identifiers and evidence identifiers provided in the dataset, and generate a metadata file containing sample ID, data division, evidence source identifier and text content; S202: Construct searchable index input data based on evidence corpus, and segment the same evidence corpus into evidence block sets at the sentence, paragraph and document granularity respectively; S203: Vectorize and encode each granularity of evidence block and establish a vector index to support subsequent approximate nearest neighbor retrieval and fast candidate recall. The vector index is preferably implemented using a vector similarity retrieval library to improve retrieval efficiency and scalability under large-scale corpora.
[0025] S3: Granularize the input questions; For example, during the online phase: the input question is vector-encoded, and the router generates granular allocations based on the question characteristics and maps them to retrieval quotas for each granularity.
[0026] S4: Retrieved TOP-K text blocks related to the question; For example, during the online phase: candidate evidence is retrieved and merged from three indexes to form a candidate pool that combines fine-grained clues with coarse-grained background information.
[0027] S5: Select the most suitable text block using the budgeter; The budgeter scores the utility of candidate evidence, performs deterministic greedy packaging by combining relevance, length cost and redundancy suppression, selects complementary and compact evidence sets under the constraint of given context budget (such as token limit), and organizes them into context according to source and logical order for the large model to generate answers. The budgeter can make the final evidence set more compact, more complementary and less redundant, and maintain the controllability and reproducibility of the entire pipeline in the evaluation.
[0028] S6: Package all selected text blocks and return them to the large model for response.
[0029] In the offline stage, this embodiment segments the same evidence corpus into three granularities: sentence, paragraph, and document, and establishes corresponding vector indexes. At the same time, it records meta-information such as text block length and source identifier to support subsequent budget control and deduplication.
[0030] In the offline phase, the method constructs three sets of parallel indexes based on the same underlying corpus, corresponding to sentence granularity, paragraph granularity, and document granularity, respectively. For each granularity, the corpus is segmented into a set of searchable fragments, and a FAISS index is built using dense vector representation. This maintains the simplicity and updability of the segmentation rules, avoids introducing complex hierarchical structures, and thus reduces maintenance costs. Simultaneously, it utilizes multi-granularity views to provide complementary retrieval units: the sentence view emphasizes precise fact location, the paragraph view emphasizes local contextual coherence, and the document view emphasizes cross-sentence coverage and topical completeness. The method includes the following steps: A. Constructing aligned multi-granularity corpus views and establishing a retrieval index: For the same underlying corpus, construct three sets of aligned corpus views at different granularities. The preferred granularity set is... That is, sentence granularity, paragraph granularity, and document granularity, for each granularity The corpus is divided into a set of searchable units, and a dense vector index is constructed from these searchable units. The preferred approach is to use FAISS to build a dense index structure to support efficient top-k retrieval and cross-granularity candidate pool fusion. This design keeps the slicing rules simple and easy to update, avoids the maintenance burden caused by introducing complex hierarchical structures, and at the same time utilizes the complementarity of multi-granularity units to provide a more suitable space for selecting evidence units for different types of problems.
[0031] B. Generate a query representation for the input question and perform question coding: For the input question... It uses a dual-encoding retrieval system to encode it into a dense vector representation. This step is used to perform unified retrieval across three sets of granular indexes and serves as a shared input for subsequent routing and evidence scoring modules. This step reduces inference overhead by "encoding once and reusing in multiple places," ensuring that retrieval, routing, and evidence selection remain consistent within the same representation space.
[0032] C. Establish a phased retrieval framework and fix a controllable scale: To ensure the retrieval and evidence construction process is controllable and facilitates ablation analysis, a two-stage retrieval template is adopted. This is the size of the first-stage candidate pool (i.e., the sum of quotas at each granularity). For the final retrieval scale, the routing module determines the quota for each granularity. ,satisfy .
[0033] D. In the first stage, retrieve the top-value items from each granularity index. Candidate set The union of the sets is then merged and sorted to obtain the global candidate pool. Subsequently, the sorting prefix can be rearranged to improve candidate quality and sorting reliability, by explicitly introducing... , Controllable variables can maintain a consistent candidate pool size under different experimental conditions, thereby attributing performance differences more centrally to the "quota allocation strategy" and the "on-budget evidence set construction strategy".
[0034] E. Perform multi-granularity retrieval and construct a candidate pool, for each granularity index. ,implement Get the top- The candidate pool is obtained by merging and sorting candidate sets of different granularities. When efficiency permits, a cross encoder can be optionally enabled to sort the candidate pool prefixes. The candidates are rearranged, that is... This aims to improve the quality of candidate relevance ranking with limited overhead, providing a more reliable input signal for subsequent on-budget set selection.
[0035] F. Execute retrieval quota routing and perform dynamic granular allocation. To adapt to the heterogeneous needs of different issues in terms of evidence granularity, a problem-level routing module is introduced to dynamically allocate the first-stage retrieval quota for three granularities. The core function of the routing module is query-level control: it does not directly select the final evidence fragment, but rather allocates the retrieval capacity among sentence / paragraph / document granularities to create a candidate pool more suitable for the current issue. Specifically, the routing module uses query vectors... For input, and optionally concatenate low-cost descriptors. (e.g., normalized budget signal and problem length), using lightweight MLP output for granular set Distribution , in the form of Then Mapped to integer quotas and in constraints To avoid degenerate allocations in practice and ensure ablation comparability, the routing module introduces a stability protection mechanism, which includes at least a base quota to prevent a certain granularity from being starved, optional prior mixing to compromise with the user-specified prior share, and an upper limit constraint on over-allocation of the finest granularity, thereby reducing performance fluctuations caused by extreme allocations.
[0036] G. Execute budget-aware evidence scoring and package it within budget constraints. To construct a more information-dense and complementary evidence set under a fixed context budget B (number of tokens), a budgeter module is introduced to select evidence within the budget. The input of the budgeter module is the candidate pool. With budget Unlike methods such as "directly predicting budget buckets" or "sorting and concatenating only by retrieval scores," this approach uses a learnable fragment utility scorer to conditionally score candidate fragments, and then uses a deterministic greedy algorithm to package them into a final evidence set. Specifically, for each candidate fragment Construct a lightweight feature vector consisting of signals available at inference time, which includes at least the query vector. and fragment-side attributes Fragment-side attributes are preferably selected, including granularity identifier, dense retrieval score, optional rearrangement score, and token length; utility scores are output through a small MLP. , in the form of After obtaining the utility scores of all candidates, the candidates are sorted by utility priority (with optional redundancy penalties to reduce near duplication), and then added to the evidence set one by one in a deterministic manner: as long as the cumulative token length does not exceed the budget. If the candidate is selected, it is retained; otherwise, it is skipped, thus obtaining a more complementary set of evidence that is as efficient as possible within the budget. When the budgeter module is shut down, the system degenerates into the same deterministic greedy packaged baseline. .
[0037] H. Construct prompts and enhance the search to generate output, resulting in the final evidence set. With the question The input prompts are organized into a consumable model, and the predicted answer is output by calling the large language model. The reasoning stage maintains process determinism to ensure reproducibility. Greedy decoding (without sampling) is preferred, so sampling parameters such as temperature and top-p will not affect the result. This step, combined with the aforementioned "route shaping candidate pool - budgeter constructing evidence set", forms an end-to-end controllable retrieval enhancement generation process.
[0038] I. Constructing Weakly Supervised Training Signals and Training Routing and Budgeting Modules. To train the routing and budgeting modules, this method constructs weakly supervised labels by performing oracle-based policy search on the 2Wiki training set. For each training question, a small set of candidate granular allocation policy grids (which can serve as priors for quota allocation) is enumerated, and a set of budget / selection options is enumerated where applicable. For each candidate configuration, a phased retrieval and packaging process consistent with inference is executed to obtain the packaging context under that configuration. Automatic signals related to responsiveness are used for scoring, preferably including supporting evidence coverage and recall of the answer string after normalization. The configuration with the highest oracle score is selected as the optimal configuration. When multiple configurations have the same score, a rule biased towards lower costs is used for decision-making, i.e., when scores are equal, the configuration with the shorter context is preferred. Thus, the training labels for the routing module are granular distribution soft labels induced by the optimal configuration. The training label for the budgeter module is oracle. The selected set of evidence Induced fragment-by-fragment binary labels Define the training objective function and execute the training protocol. The routing module uses a KL divergence objective in the form of soft-label cross-entropy, and the training objective is... The budgeter module maps utility scores to selection probabilities using a sigmoid function and predicts segment by segment using binary cross-entropy constraints. The training objective is... In terms of the training protocol, the oracle tag is built only once on the 2Wiki training set, and then the routing and budgeter modules are optimized and trained in mini-batch. In the evaluation phase, the trained routing and budgeter modules are reused, and the inference process is run on the respective indices of different datasets, and the EM / F1 is output as the final metric.
[0039] The core of this embodiment lies in constructing three simple and aligned index views—sentences, paragraphs, and documents—on the same corpus. It achieves end-to-end coordination from candidate pool formation to in-budget evidence combination through two lightweight modules. This method emphasizes the decomposition idea of "routing first and then packaging": the first module allocates retrieval quotas at different granularities at the question level, thereby adaptively shaping the candidate pool for each question; the second module performs utility scoring and deterministic greedy packaging of candidate fragments within a fixed budget, making the final evidence set more compact, complementary, and less redundant, while maintaining the controllability and reproducibility of the entire pipeline in the evaluation.
[0040] This embodiment can achieve adaptive coordination of retrieval granularity, candidate size and final evidence set under different question types and different evidence distribution conditions, improve the integrity of the evidence chain and reduce noise interference. While maintaining the simplicity of the block scheme and facilitating maintenance and updates, this invention improves the stability and accuracy of multi-hop question answering. It is suitable for application scenarios such as knowledge base question answering, intelligent retrieval and question answering services, and can be extended to tasks such as long document question answering and cross-document information aggregation.
[0041] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
[0042] Figure 2 This paper demonstrates the differences between traditional retrieval enhancement pipelines and the pipeline of this invention. Traditional pipelines typically employ fixed granularity and fixed retrieval configurations: a retrieval is performed on the input question, returning evidence fragments in a fixed format. These fragments are then greedily concatenated into context by sorting them by score, and finally input into a generative model to output the answer. In multi-hop question answering, the information requirements of different questions vary significantly. Fixed granularity may lead to two typical types of failures: first, when the granularity is too fine, the evidence chain is fragmented, and the key connecting information required for cross-sentence / cross-document reasoning is difficult to form within the same context; second, when the granularity is too coarse, noise and redundancy increase, and key evidence is diluted or squeezed out of the context under a fixed budget.
[0043] To facilitate understanding, the following example question further illustrates the differences: "Who manufactured the scooter upon which the Bajaj Priya was based?" This question is a typical example of multi-hop chain reasoning: the first hop requires determining which model or type of scooter "Bajaj Priya" is based on; the second hop requires further tracing the manufacturer information of the scooter. If only fixed-granularity retrieval and piecing are used, a common phenomenon is that although the retrieved evidence fragments are relevant to the question surface (e.g., containing the words "Bajaj Priya" or "scooter"), they lack key cross-document connecting sentences, causing the generative model to only provide incomplete answers or speculative outputs.
[0044] In this invention's process, the system first allocates question-level quotas based on question characteristics. For example, when the routing module determines that the question requires strong cross-sentence coverage, it increases paragraph-level and document-level quotas to expand the coverage of "sentences containing key relationships" in the candidate pool, while still reserving a certain sentence-level quota for accurate hits on key entity phrases. Conversely, when the question is more focused on single-point factual location, the system increases sentence-level quotas to reduce noise. Subsequently, the system retrieves candidates from three sets of alignment indices and merges them into a candidate pool. Then, it performs budget-based set-level selection on the candidate pool. Within a fixed budget, the budgeter not only tends to retain key sentences containing "based on relationship" and "product derivation relationship" (for the first hop), but also tends to retain sentences or paragraphs containing "manufacturer / company name" and "the scooter" (for the second hop), and skips highly repetitive and information-overlapping fragments. This forms a more compact and complementary evidence set within the same budget. Ultimately, with the support of this evidence set, the generative model is more likely to follow the "Bajaj Priya" path. The chain of reasoning, from "the scooter it's based on to the scooter manufacturer," completes the reasoning and provides a full answer, thereby reducing errors such as "only answering one jump," "omitting the manufacturer," and "mistaking a related company for the manufacturer."
[0045] Figure 3This invention demonstrates the overall process framework. First, it constructs three aligned corpus views—sentences, paragraphs, and documents—on the same evidence set, and establishes dense indices for each. During online inference, the system vectorizes the input question, and the routing module outputs a granular distribution mapped to integer quotas to determine how many candidates to retrieve from each of the three indices in the first stage, thus shaping the candidate pool at the question level. Subsequently, the system merges candidates of different granularities into a global candidate pool and can rearrange the sorting prefixes to improve candidate quality. Under a fixed contextual budget constraint, the budgeter module scores the candidates based on relevance signals, fragment length, and redundancy factors, and selects complementary and compact evidence sets through deterministic greedy packaging. Finally, the packaged evidence and question are organized into a prompt input generation model that outputs the answer. This process decouples candidate pool formation from in-budget evidence combination, enabling both granular control and evidence packaging to have learnable, interpretable, and reproducible interfaces.
[0046] To further illustrate how this framework adapts to different types of problems, the following provides explanations for two typical scenarios: The first type is the "entity bridging" multi-hop problem, where the first hop yields an intermediate entity, and the second hop uses that entity to locate the answer in another document. Common failure points for this type of problem are: if the candidate pool is overly concentrated on sentence-level fragments, it may only recall the first-hop entity but lack the contextual locating sentence in other documents; if the candidate pool is overly concentrated on document-level fragments, it is easy to introduce a large amount of irrelevant content that crowds out the budget. The routing module tends to increase the proportion of paragraph-level candidates in this type of problem to ensure that when the intermediate entity appears, there is enough context to carry its connection information with the second-hop fact; the budgeter prioritizes the combination of "bridging sentence and target fact sentence" within the budget, rather than selecting multiple fragments that repeatedly describe the same entity.
[0047] The second type is the "attribute aggregation" multi-hop problem, where multiple fragments provide different attributes or different evidence points, which need to be merged in the final answer. Common failure points for this type of problem are: naive splicing can easily squeeze multiple fragments out of the budget, or selecting mutually repetitive fragments, resulting in insufficient coverage. The budgeter of this invention explicitly considers fragment length and complementarity, and within a fixed budget, it tends to select fragment combinations that cover different sub-evidence points. If a document-level fragment is too long but only provides a single attribute, the budgeter will prefer shorter sentence / paragraph-level fragments to increase the effective information density, thereby improving the final reasoning coverage and answer completeness.
[0048] As shown in Table 1, this embodiment selects internationally published multi-hop question answering standard evaluation datasets as experimental corpora, preferably including HotpotQA, 2WikiMultiHopQA, and MuSiQue (Ans) datasets. These datasets all contain question text, standard answers, and evidence sources related to the questions (such as Wikipedia text fragments / documents), covering typical multi-hop reasoning scenarios and cross-document evidence aggregation settings. They have the characteristics of standardized partitioning, unified evaluation scripts, and strong reproducibility, and can be used to comprehensively evaluate the effectiveness and robustness of the dynamic multi-granularity retrieval enhancement question answering method proposed in this invention under multi-hop conditions. Table 1 shows the statistical information of each dataset used in this experiment and its training / development / test partitioning scale.
[0049] Table 1
[0050] In terms of evaluation metrics, to maintain consistency with the general evaluation protocol in the multi-hop question answering field, this embodiment uses Exact Match (EM) and token-level F1 from the official evaluation script as the main evaluation metrics. It comprehensively measures the consistency between the model's output answer and the standard answer from the perspectives of strict matching and word-level overlap, thereby verifying the effectiveness, stability and generalization ability of the invention on different multi-hop datasets. Compared with relying on only a single metric, EM can reflect the strict correctness of "whether the answer is completely consistent", and F1 can provide a smoother measurement when there are format differences, synonyms or partial correctness in the answer. Therefore, the combination of the two is more suitable for evaluating the quality performance of "whether the evidence chain is complete and whether the final answer fully covers the key entities" in multi-hop question answering.
[0051] To verify the advantages of this invention over existing methods, this embodiment conducts a system comparison experiment on the three internationally published standard evaluation sets mentioned above, and compares its performance with a variety of mainstream benchmark methods. The preferred comparison methods include: Direct (direct baseline generation without introducing retrieval evidence), Naive RAG (standard retrieve-then-generate baseline), MoGRAG (granular routing baseline), GenGroundRAG (iterative generation-implementation baseline), and the method of this invention (Ours).
[0052] The information of the benchmark model used in the test data of this invention is as follows: Direct (Qwen2.5-14B-Instruct): This benchmark does not introduce any external retrieval evidence. It only inputs the question into the generative model with zero samples and directly outputs the answer. It is used to reflect the basic ability and upper limit of the generative model without the assistance of external evidence. In multi-hop question answering tasks, since key evidence is often scattered in multiple documents or fragments, the Direct method relies more on the model's parameterized knowledge. It is prone to factual omissions or reasoning chain breaks when cross-document evidence chain splicing is required, resulting in EM / F1 being significantly lower than retrieval enhancement methods.
[0053] MoG (Mix-of-Granularity): This benchmark belongs to the granular routing class of methods. It selects or controls preferences among retrieval units of different granularities by query conditional routing, so that the retrieval granularity can change with the question. The advantage of this method is that it can alleviate the mismatch problem caused by fixed granularity to a certain extent. However, its gains usually depend on whether the routing strategy is aligned with the subsequent evidence usage mechanism. Under controlled settings, if only the granularity is changed without budget-constrained set-level evidence selection and redundancy control, there may be a disconnect between the candidate pool and the final context construction, resulting in unstable performance improvement or performance below the strong baseline.
[0054] GenGround (Generate-then-Ground): This benchmark belongs to the iterative decomposition and implementation method. During inference, it alternately executes "generating intermediate single-hop information requirements / sub-questions" and "implementing evidence for these requirements through retrieval," thereby gradually accumulating the evidence chain required for multi-hop inference. It is designed for the step-by-step evidence acquisition process of multi-hop question answering. This method emphasizes multi-step retrieval and intermediate inference in its mechanism, but its effectiveness is affected by factors such as the quality of intermediate information requirement generation, the number of iteration steps, and the retrieval settings. To maintain the reproducibility of the baseline and consistency with the original settings, this benchmark uses ColBERTv2.0 on the retrieval side.
[0055] Naive RAG: This benchmark implements the standard retrieve-then-generate pipeline. First, it retrieves the top-k text evidence fragments from the corpus, then greedily packages and concatenates the high-scoring fragments into a single context in order, and finally inputs it into the generator model to output the answer. This method constitutes a strong baseline in multi-hop question answering scenarios and can provide effective external evidence support for many questions. However, since its candidate construction and evidence packaging strategy are usually fixed configurations and score sorting concatenation, it is easy to introduce redundant or missing complementary evidence under a fixed budget, resulting in a significant performance degradation in more difficult cross-document multi-hop scenarios.
[0056] Among them, Direct reflects the model's basic capabilities without external evidence; Naive RAG reflects the performance of the standard retrieval enhancement pipeline under a fixed configuration; MoGRAG is used to test the effectiveness of "granular routing only" in multi-hop tasks; GenGroundRAG is used to test the multi-step inference paradigm of "iterative sub-problem generation and retrieval landing"; the method of this invention achieves collaborative optimization of candidate pool and context packaging through problem-level dynamic granular quota allocation and budget-constrained evidence set construction, aiming to construct a more complementary and compact evidence set under a fixed context budget, thereby improving the integrity of the multi-hop inference chain and reducing redundant noise interference.
[0057] Table 2 shows the test results of the above methods on the HotpotQA dataset: Table 2
[0058] As shown in Table 2, on the HotpotQA dataset, Direct's EM / F1 is 20.6 / 27.4, indicating that in multi-hop inference scenarios, relying solely on parameterized knowledge is often insufficient to stably cover the cross-document evidence chain. Naive RAG improves to 53.1 / 67.1, indicating that introducing external retrieval evidence can significantly improve multi-hop question answering performance. MoGRAG and GenGroundRAG are 40.4 / 52.37 and 36.59 / 45.91, respectively, indicating that under the controlled settings of this embodiment, relying solely on granular routing or iterative landing is not necessarily superior to a strong baseline. The method of this invention achieves 56.8 / 71.3, outperforming other control methods in both EM and F1, demonstrating that by shaping the dynamic multi-granularity candidate pool and selecting complementary evidence within budget, the evidence context supporting the inference chain can be constructed more effectively on HotpotQA, thereby improving the strict accuracy and coverage of the final answer.
[0059] Table 3 shows the test results of the above methods on the 2Wiki dataset: Table 3
[0060] As shown in Table 3, on the 2Wiki dataset, the EM / F1 ratios for Direct are 23.2 / 25.49, Naive RAG is 39.0 / 46.5, MoGRAG is 19.0 / 23.61, and GenGroundRAG is 21.2 / 26.42. The method of this invention achieves 49.3 / 58.1. It can be seen that compared with HotpotQA, the improvement of Naive RAG on 2Wiki is more limited, indicating that this dataset is more challenging in constructing cross-document evidence chains. Fixed granularity and simple splicing are more likely to cause problems such as "evidence chain breakage" or "redundancy occupying the budget leading to the loss of key evidence". The invention achieves a more significant improvement on 2Wiki, indicating that when the task relies more on the combination of complementary evidence across fragments, the synergistic effect of problem-level granularity quota allocation and within-budget set-level evidence selection is more prominent. It can improve the coverage and coherence of the evidence chain under a fixed budget, thereby significantly improving EM and F1.
[0061] Table 4 shows the test results of the above methods on the Musique dataset: Table 4
[0062] As shown in Table 4, on the MuSiQue dataset, the EM / F1 of Direct is 5.0 / 13.6, Naive RAG is 18.7 / 28.3, MoGRAG is 6.6 / 12.29, GenGroundRAG is 10.87 / 15.1, and the proposed method is 19.1 / 29.3. The proposed method also outperforms Naive RAG on MuSiQue, but the improvement is relatively small, indicating that the performance ceiling on this dataset may be more affected by the recall stage. That is, when key evidence fails to enter the candidate pool, the subsequent in-budget combination optimization space will be limited. Nevertheless, the proposed method can still obtain stable gains on a strong baseline, indicating that dynamic multi-granularity candidate pools and budget-constrained evidence selection still have universal value in more complex multi-hop settings.
[0063] The comparison results of the three datasets show that the present invention achieves stable performance advantages on the HotpotQA, 2Wiki, and MuSiQue datasets, with a more significant advantage on 2Wiki. This indicates that the present invention is particularly suitable for multi-hop reasoning scenarios where evidence is scattered and cross-document combination is required. This result also shows that relying solely on fixed-granularity retrieval and simple concatenation is difficult to balance coverage and noise control under a unified budget. However, the present invention, through the collaborative optimization of candidate pool and evidence set construction, can improve the effective density of evidence and reduce redundant interference without increasing the randomness of reasoning, thereby improving the quality of the final answer.
[0064] To verify the contributions of each component and eliminate accidental gains caused by "simply introducing additional modules or changing the process," this invention sets up component ablation and single-granularity control experiments as control experiments, including enabling only the routing module, enabling only the budgeter module, and using only a single granularity view for retrieval (sentence only, paragraph only, document only). Through this control experiment, it is possible to clearly distinguish the independent and synergistic contributions of "candidate pool shaping (granular quota allocation)" and "in-budget ensemble-level evidence selection (redundancy control and complementarity promotion)" to performance, and to verify the necessity of multi-granularity collaboration in multi-hop question answering.
[0065] Figure 4 Ablation experiments on HotpotQA, 2WikiMultiHopQA, and MuSiQue are presented. Overall, the combination of Router (routing module) + Budgeter (budgeter module) achieves the strongest or near-strongest performance on each dataset, indicating that coordinating adaptive granularity allocation of queries with evidence set selection is generally beneficial for multi-hop QA where evidence is distributed across multiple documents.
[0066] When comparing routing modules and budgeter modules across datasets, "budgeter-only modules" are generally more competitive than "routing-only modules," supporting the intuition that multi-hop QA benefits more from selecting a complementary set of evidence, rather than relying solely on pointwise relevance. Routing modules offer complementary benefits by shaping a better candidate pool, and combining the two yields the most consistent improvement.
[0067] Multi-granularity vs. single-granularity: there are significant differences in the baseline of single-granularity: sentence retrieval alone often performs poorly due to the fragmentation of the evidence chain; document retrieval alone can improve coverage but may introduce more noise; paragraph retrieval alone is in between but still lags behind the coordinated method. This further supports the design of "multiple simple granularities and learning-based selection" adopted in this application.
[0068] exist Figure 5 The impact of the number of training samples on the two learning modules was analyzed, while keeping other parts of the pipeline unchanged. Figure 4The report presents the EM / F1 (%) of the routing module and the budgeter module under different training sample sizes. For the routing module, performance steadily increases with increasing data: F1 rises from 53.7 to 55.1, and EM from 44.8 to 46.3, indicating that the routing module benefits from more supervision, but remains relatively stable at smaller scales. For the budgeter module, the impact is stronger and not entirely monotonic: a significant improvement is seen from 1k to 5k, followed by a decline around 10k, peaking at 15k (F1=56.9, EM=48.7), and a slight decrease at 20k. Overall, the budgeter module is more sensitive to data, and medium to large training sets are more important for robust evidence selection behavior.
[0069] exist Figure 6 The impact of training iter steps was studied by fixing the training set size to 15k. Figure 5 reports the EM / F1 (%) of iter steps. For the routing module, the performance was stable under different iter steps: EM was between 45.0 and 46.0, and F1 fluctuated between 54.0 and 54.9. Extending the training did not yield consistent benefits (the best occurred at step 1: EM=46.0, F1=54.9). For the budgeter module, the best also occurred at step 1 (EM=48.7, F1=56.9). Continuing the training resulted in a significant decrease and tended to plateau (EM≈45.6–46.0; F1≈54.0–54.4).
[0070] Figure 4 , Figure 5 and Figure 6 The ablation effect and training sensitivity analysis of the present invention on a multi-hop question-answering benchmark are demonstrated.
[0071] Figure 4 This indicates that the complete system typically exhibits superior or more stable EM / F1 performance compared to enabling only a single module or using only single-granularity retrieval, suggesting that issue-level granularity quota allocation and on-budget set-level evidence selection are complementary in multi-hop tasks. Figure 5 The performance trends of the learnable module under different training sample sizes were further analyzed to illustrate the difference in sensitivity between the routing module and the budgeter module to the training data size, and to provide a basis for how to select the training size and training protocol in engineering implementation.
[0072] To better understand the ablation phenomenon described above, further examples are provided. When only the routing module is enabled, the system can change the granularity structure of the candidate pool, allowing some key fragments that would otherwise be unrecoverable due to fixed granularity mismatch to enter the candidate pool. However, if simple score sorting and concatenation are still used subsequently, duplicate fragments may be selected or complementary evidence may be missed within the fixed budget, resulting in limited gain. When only the budgeter module is enabled, the system can more effectively filter complementary evidence and reduce redundancy within the given candidate pool. However, if the candidate pool itself lacks key evidence due to granularity mismatch (e.g., it only appears at the document level and is difficult to hit at the sentence level, or it only appears at the sentence level and is too noisy at the document level), the budgeter will also find it difficult to "create something out of nothing" to make up for the recall defects. Therefore, when the two are combined, on the one hand, the routing module increases the "probability of the candidate pool covering the correct evidence", and on the other hand, the budgeter increases the "probability of combining a usable evidence chain within the budget", thus making the system more stable in multi-hop tasks.
[0073] In terms of training sensitivity, the routing module typically learns coarse-grained decisions about which granularity is preferred for different problems. The supervision signal is relatively stable, so it shows a smoother improvement trend as the number of training samples increases. The budgeter module learns finer-grained preferences about "selecting and packing at the set level within the candidate pool." It has to handle both length constraints and complementary and redundant relationships, and is more sensitive to label noise and data distribution. Therefore, it exhibits a phenomenon that changes with the data size and the number of iterations rather than being monotonic. Based on this observation, in engineering implementation, a more conservative setting of the number of training iterations can be adopted, and the training size can be selected on the development set to obtain more stable inference behavior and more reproducible gains.
[0074] The above embodiments illustrate the chain reasoning requirements of typical multi-hop problems, the complementarity of evidence at different granularities, and the necessity of constructing an in-budget evidence set. This further demonstrates the technical effects of the present invention in improving the effective density of evidence, reducing redundant interference, and enhancing the integrity of multi-hop reasoning chains under fixed context budget constraints.
[0075] The above embodiments are preferred implementations of the present invention. In addition, the present invention can be implemented in other ways. Any obvious substitutions without departing from the concept of the present technical solution are within the protection scope of the present invention.
Claims
1. A method for enhancing large-model retrieval based on multi-granularity dynamic adaptation, characterized in that, Includes the following steps: S1: Select the evaluation dataset and perform preprocessing; S2: Construct vector libraries at three granularities; S3: Granularize the input questions; S4: Retrieved TOP-K text blocks related to the question; S5: Select the most suitable text block using the budgeter; S6: Package all selected text blocks and return them to the large model for response.
2. The large model retrieval enhancement method based on multi-granularity dynamic adaptation according to claim 1, characterized in that, The datasets in step S1 include the HotpotQA dataset, the 2WikiMultiHopQA dataset, and the MuSiQue dataset.
3. The large model retrieval enhancement method based on multi-granularity dynamic adaptation according to claim 1, characterized in that, The dataset preprocessing in step S1 involves: unifying the text encoding format and performing normalization processing, and removing illegal characters, blank lines, and duplicate samples.
4. The large model retrieval enhancement method based on multi-granularity dynamic adaptation according to claim 1, characterized in that, The dataset used in step S1 is an internationally publicly released standard multi-hop question-answering dataset, which has good structural standardization and annotation universality, and does not require the introduction of an additional complex quality evaluator.
5. The large model retrieval enhancement method based on multi-granularity dynamic adaptation according to claim 1, characterized in that, The specific steps in step S2 are as follows: S201: Establish a mapping relationship between "sample - evidence document / paragraph / sentence" based on the sample identifiers and evidence identifiers provided in the dataset, and generate a metadata file containing sample ID, data partition, evidence source identifier and text content; S202: Construct searchable index input data based on evidence corpus, and segment the same evidence corpus into evidence block sets at the sentence, paragraph and document granularity respectively; S203: Vectorize and encode each granularity of evidence block and establish a vector index to support subsequent approximate nearest neighbor retrieval and fast candidate recall. The vector index is preferably implemented using a vector similarity retrieval library to improve retrieval efficiency and scalability under large-scale corpora.
6. The large model retrieval enhancement method based on multi-granularity dynamic adaptation according to claim 1, characterized in that, In the offline stage of step S3, the same evidence corpus is segmented into three granularities: sentence, paragraph, and document, and corresponding vector indexes are established. At the same time, meta-information such as text block length and source identifier is recorded to support subsequent budget control and deduplication.
7. The large model retrieval enhancement method based on multi-granularity dynamic adaptation according to claim 6, characterized in that, In the offline phase, for each granularity, the corpus is segmented into a set of searchable fragments, and a FAISS index is built using dense vector representation. At the same time, complementary search units are provided by using multi-granularity views: sentence view emphasizes precise location of facts, paragraph view emphasizes local contextual coherence, and document view emphasizes cross-sentence coverage and topical integrity.
8. The large model retrieval enhancement method based on multi-granularity dynamic adaptation according to claim 1, characterized in that, In step S3 during the online phase: the input question is vector-encoded, and the router generates granular allocations based on the question characteristics and maps them to retrieval quotas for each granularity.
9. The large model retrieval enhancement method based on multi-granularity dynamic adaptation according to claim 1, characterized in that, In step S4, during the online phase, candidate evidence is retrieved and merged from three indexes to form a candidate pool that combines fine-grained clues with coarse-grained background information.
10. The large model retrieval enhancement method based on multi-granularity dynamic adaptation according to claim 1, characterized in that, Step S5 specifically involves: The budgeter scores the utility of candidate evidence, performs deterministic greedy packaging by comprehensively considering relevance, length cost, and redundancy suppression, selects complementary and compact evidence sets under given context budget constraints, and organizes them into context for the large model to generate answers according to their source and logical order. The budgeter makes the final evidence set more compact, more complementary, and less redundant, while maintaining the controllability and reproducibility of the entire pipeline in the evaluation.