A multi-hop question-answering method and question-answering system based on a hierarchical decision mechanism

The multi-hop question-answering method, which employs a hierarchical decision-making mechanism, solves the problems of lexical ambiguity and complex reasoning processes in multi-hop question answering through the collaborative design of the strategy layer, control layer, and execution layer, achieving efficient and interpretable question-answering results.

CN121743459BActive Publication Date: 2026-07-21UNIV OF SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
UNIV OF SCI & TECH OF CHINA
Filing Date
2026-01-13
Publication Date
2026-07-21

Smart Images

  • Figure CN121743459B_ABST
    Figure CN121743459B_ABST
Patent Text Reader

Abstract

The application provides a multi-hop question and answer method and a question and answer system based on a hierarchical decision mechanism, the method comprising: in response to receiving a multi-hop question of a user, generating, by a strategy layer, an abstract reasoning skeleton corresponding to the multi-hop question and a group of executable sub-questions instantiated based on the abstract reasoning skeleton; deciding, by a control layer, an execution action corresponding to a currently executable sub-question based on the group of executable sub-questions; executing, by an execution layer, the execution action decided by the control layer to generate an answer of the currently executable sub-question by searching external documents to extract facts or performing logical reasoning based on accumulated facts; iteratively executing scheduling and decision of the control layer and execution of the execution layer, and generating a final answer to the multi-hop question based on answers of all sub-questions. The application realizes targeted optimization of each component, and significantly improves the robustness and deployability of the overall performance without manual annotation or a strong teacher model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of natural language processing technology, specifically a multi-hop question-answering method and system based on a hierarchical decision-making mechanism. Background Technology

[0002] Multi-hop question answering requires the system to retrieve evidence from multiple disparate documents and integrate information through multi-step logical reasoning to answer complex questions posed by users. For example, questions like "Which Nobel Prize-winning scientist was also a highly skilled concert musician?" cannot be answered directly through a single document retrieval; they must be reasoned sequentially: first, identify scientists who meet the criteria, and then verify whether they are musicians.

[0003] In recent years, retrieval-enhanced generation paradigms have been widely used in open-domain question-answering systems. These paradigms compensate for the lack of parameterized knowledge by inputting documents from external knowledge bases as context into large language models. However, standard retrieval-enhanced generation typically performs only a single retrieval based on the original question, failing to cover the multi-stage evidence required for multi-hop questions, leading to inference failures. To address this challenge, recent research has proposed iterative retrieval-enhanced generation methods, which decompose the question into several sub-questions and alternate between retrieval and inference in multiple rounds. Despite some progress, existing methods still suffer from two key drawbacks: First, the problem decomposition process relies too heavily on surface-level entities, prematurely breaking down the problem into subqueries containing specific entity names before the overall reasoning structure is clear. This "entity-first" strategy is highly susceptible to lexical ambiguity.

[0004] Second, existing methods typically treat multi-hop reasoning as a linear, static pipeline, ignoring the complex logical dependencies between sub-problems. In reality, sub-tasks in multi-hop problems may exhibit various execution patterns: strict sequential dependencies (e.g., finding A first, then A's attributes), parallel independence (e.g., simultaneously searching for the birth years of X and Y for comparison), or a bifurcation-convergence structure (e.g., finding causes P and Q separately, then synthesizing their combined impact). Ignoring these dependencies leads to the system either inefficiently executing all steps sequentially or issuing redundant or even conflicting retrieval requests, and it cannot dynamically adjust its strategy when some evidence is missing. Furthermore, existing systems lack the ability to determine "whether a retrieval is necessary"—some sub-problems can be answered simply by logically deducing existing facts; blindly retrieving not only wastes resources but may also introduce noise.

[0005] In summary, current multi-hop question answering technology urgently needs a novel framework that can both avoid lexical ambiguity and dynamically coordinate complex reasoning processes. To this end, this invention proposes a layered architecture inspired by real-world decision-making hierarchies. By decoupling strategy planning, process control, and underlying execution, it achieves a more robust, efficient, and interpretable multi-hop reasoning question answering method. Summary of the Invention

[0006] The problem addressed by this invention is how to avoid lexical ambiguity and dynamically coordinate complex reasoning processes to improve question-and-answer effectiveness.

[0007] To address the aforementioned problems, this invention provides a multi-hop question-answering method, question-answering system, electronic device, and storage medium based on a hierarchical decision-making mechanism.

[0008] In a first aspect, the present invention provides a multi-hop question-answering method based on a hierarchical decision-making mechanism, comprising the following steps: In response to the multi-hop problem of receiving users, the strategy layer generates an abstract inference skeleton corresponding to the multi-hop problem and a set of executable sub-problems instantiated based on the abstract inference skeleton; Based on the set of executable sub-problems, the control layer dynamically schedules the execution order and execution mode of each sub-problem, and decides the corresponding execution action for the currently executable sub-problem; The execution layer executes the decision-making actions of the control layer to generate the answer to the currently executable sub-question by retrieving facts from external documents or by performing logical reasoning based on accumulated facts. The scheduling and decision-making of the control layer and the execution of the execution layer are executed iteratively until all sub-problems are completed or the termination condition is met, and the final answer to the multi-hop problem is generated based on the answers to all sub-problems.

[0009] Optionally, the generation of the abstract reasoning skeleton and a set of executable subproblems by the policy layer includes: Using a metaplanner, a general strategy containing multiple steps is generated based on the multi-hop problem, where each step describes the entity type and logical relationship without being bound to a specific entity name; Based on the general strategy and the specific entities in the multi-hop problem, the set of executable sub-problems are instantiated and generated.

[0010] Optionally, the dynamic scheduling and decision-making of the action by the control layer includes: Maintain an execution state, which includes at least a set of solved sub-problems, a set of unprocessed sub-problems, and a mapping that records the history of failed retrievals; Based on the execution status, identify currently executable subproblems whose dependencies have been satisfied; For each currently executable sub-problem, a decision is made regarding its execution action, which includes: when the sub-problem is the first fact query, a retrieval action is made; when the sub-problem has a history of failed retrievals, a semantic rewriting action is made to generate a new query; when the sub-problem only requires logical operations on existing facts, a direct answer based on reasoning is made.

[0011] Optionally, the execution layer performs the execution action, including: When the execution action is a retrieval action or a semantic rewriting action, relevant documents are retrieved from an external document library based on the corresponding query, and an extractor is used to extract atomic facts directly related to the query from the relevant documents; Using an inference engine, logical deduction is performed based on extracted atomic facts or, when the action to be performed is a direct response action, all accumulated facts to generate the answer to the sub-question.

[0012] Optionally, after extracting atomic facts using the extractor, the method further includes: If the extracted set of atomic facts is empty, the current query will be recorded in the retrieval failure history of the corresponding sub-question. In subsequent iterations, the control layer rewrites the semantics of the sub-problem decision based on the updated retrieval failure history.

[0013] Optionally, generating the final answer to the multi-hop problem further includes: If there are still unsolved subproblems when the iteration terminates, the backup inferencer is started; The backup inference engine receives the multi-hop question, the generated inference skeleton, all accumulated facts, and the last successfully retrieved document, and generates a final answer.

[0014] Optionally, it further includes a modular self-training step for optimizing modules in the policy layer, control layer, and execution layer, the modular self-training step including: Run the multi-hop question-answering method to collect the complete execution trajectory containing the inputs and outputs of each module; Based on the quality of the final result of the execution trajectory, high-quality behavior samples are selected; Using the selected samples, the meta-planner, the supervisor in the control layer, the extractor, and the inference engine are fine-tuned accordingly.

[0015] Optionally, the fine-tuning of the meta-planner employs a preference learning method, including: For the same multi-hop problem, multiple inference skeletons are sampled and executed separately to obtain multiple execution trajectories; Preference pairs are constructed based on the quality metrics of the final answer for each execution trajectory; The meta-planner is trained using the preference pairs via a direct preference optimization method.

[0016] Optionally, fine-tuning the supervisor in the control layer includes: Collect samples from the execution trajectory where semantic rewriting actions facilitated subsequent successful retrieval and ultimately led to the correct answer; The supervisor is trained using the samples through supervised fine-tuning to learn effective query rewriting strategies.

[0017] Secondly, embodiments of the present invention provide a multi-hop question-answering system based on a hierarchical decision-making mechanism, comprising: The strategy module is configured to generate an abstract inference skeleton corresponding to the multi-hop problem and a set of executable sub-problems instantiated based on the abstract inference skeleton in response to the multi-hop problem received by the user. The control module is configured to dynamically schedule the execution order and execution mode of each sub-problem based on the set of executable sub-problems, and to decide the corresponding execution action for the currently executable sub-problem; The execution module is configured to execute the actions decided by the control module, thereby generating the answer to the currently executable sub-question by retrieving facts from external documents or by performing logical reasoning based on accumulated facts, and iteratively interacting with the control module until all sub-questions are completed or a termination condition is met, so as to generate the final answer to the multi-hop question. The strategy module, control module, and execution module work together to implement the method described in the first aspect.

[0018] Thirdly, embodiments of the present invention provide an electronic device, including a processor, a communication interface, a memory, and a bus, wherein the processor, the communication interface, and the memory communicate with each other through the bus, and the processor can call logical instructions in the memory to execute the steps of the method provided in the first aspect.

[0019] Fourthly, embodiments of the present invention provide a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the multi-hop question-answering method based on a hierarchical decision-making mechanism as described in the first aspect.

[0020] The beneficial effects of the multi-hop question-answering method based on hierarchical decision-making mechanism of the present invention are as follows: This invention effectively overcomes two major shortcomings of existing iterative retrieval enhancement generation methods in multi-hop question answering by constructing a hierarchical decision framework comprising a strategy layer, a control layer, and an execution layer. First, the strategy layer employs a two-stage approach of "abstract planning followed by entity instantiation," decoupling the reasoning logic from the surface form of specific entities. This significantly enhances robustness to lexical ambiguity and avoids retrieval bias caused by ambiguous entity references. Second, the control layer introduces dynamic state management and intelligent action decision-making mechanisms, enabling flexible scheduling of execution order and mode (e.g., sequential, parallel) based on the logical dependencies of sub-problems. It intelligently determines when retrieval is needed, when rewriting is possible, or when direct reasoning is appropriate, thereby significantly improving the execution efficiency and resource utilization of complex reasoning processes and reducing redundancy and conflicting requests. Furthermore, the system enhances fault tolerance through failure detection and semantic rewriting, ensures the interpretability of the reasoning process and the fidelity of the answers through a clear and traceable hierarchical structure, and, combined with a modular self-training mechanism based entirely on self-execution trajectories, achieves targeted optimization of each component. This significantly improves the overall robustness and deployability of performance without the need for manual annotation or strong teacher models. Attached Figure Description

[0021] Figure 1 This is a flowchart of a multi-hop question-answering method based on a hierarchical decision-making mechanism in an embodiment of the present invention; Figure 2 This is a structural block diagram of a multi-hop question-answering system based on a hierarchical decision-making mechanism in an embodiment of the present invention; Figure 3 This is a structural block diagram of the electronic device in an embodiment of the present invention. Detailed Implementation

[0022] To better understand the purpose, technical solution, and advantages of this application, the application is described and explained below in conjunction with the accompanying drawings and embodiments.

[0023] Unless otherwise defined, the technical or scientific terms used in this application shall have the general meaning understood by one of ordinary skill in the art to which this application pertains. Words such as “a,” “an,” “an,” “the,” “the,” and “these” used in this application do not indicate quantitative limitation and may be singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps or modules (units) is not limited to the listed steps or modules (units) but may include steps or modules (units) not listed, or may include other steps or modules (units) inherent to these processes, methods, products, or devices. Words such as “connected,” “linked,” and “coupled” used in this application are not limited to physical or mechanical connections but may include electrical connections, whether direct or indirect. “Multiple” used in this application refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. Normally, the character " / " indicates that the objects before and after it are in an "or" relationship. The terms "first," "second," "third," etc., used in this application are merely to distinguish similar objects and do not represent a specific order of objects.

[0024] like Figure 1 As shown in the figure, a multi-hop question-answering method based on a hierarchical decision-making mechanism provided in this embodiment of the invention includes the following steps: S1. In response to the multi-hop problem of receiving users, the strategy layer generates an abstract inference skeleton corresponding to the multi-hop problem and a set of executable sub-problems instantiated based on the abstract inference skeleton. The strategy layer generates an abstract reasoning skeleton and a set of executable subproblems, including: Using a metaplanner, a general strategy with multiple steps is generated based on the multi-hop problem. Each step describes the entity type and logical relationship without being bound to a specific entity name. Based on the general strategy and specific entities in the multi-hop problem, a set of executable subproblems are instantiated and generated.

[0025] It should be noted that the present invention includes the following three collaborative working layers (the control layer and the execution layer will be described in steps S2 and S3 respectively): Strategy Layer: Composed of the meta-planner. This module first generates an abstract reasoning skeleton (general strategy) based on the input question, independent of specific entity names. Then, it instantiates a set of executable sub-questions (specific plans) based on this skeleton, thereby decoupling "how to reason" from "what to retrieve" and reducing sensitivity to lexical ambiguity.

[0026] The strategy layer is implemented by a meta-planner, which decomposes the problem into a structured two-level reasoning blueprint. This design explicitly separates abstract reasoning logic from entity-specific instantiation, thereby reducing sensitivity to changes in the surface form of complex entities (e.g., movie titles, administrative names) and enhancing the transferability of plans between problems with shared reasoning patterns. Specifically, given the input problem... The meta-planner first generates a structured reasoning blueprint. The blueprint comprises two levels (general strategy and specific plans): ; in, For planning instructions, This represents the large language model that executes the instruction. For general strategies, it represents an abstract, entity-agnostic sequence of reasoning steps, where each step only describes the types of entities involved (such as "movie", "book", "author") and their logical relationships; The specific plan is a set of executable subproblems obtained by instantiating the general strategy, with each subproblem bound to specific entities and relationships in the problem. This two-phase design effectively decouples reasoning logic from the surface form of language, significantly reducing sensitivity to lexical ambiguity.

[0027] S2. The control layer dynamically schedules the execution order and execution mode of each sub-problem based on a set of executable sub-problems, and decides the corresponding execution action for the currently executable sub-problem. The control layer dynamically schedules and decides on actions to be executed, including: Maintain an execution state, which includes at least the set of solved subproblems, the set of subproblems to be processed, and a mapping that records the history of failed retrievals; Based on the execution status, identify currently executable subproblems whose dependencies have been satisfied; For each currently executable sub-problem, a decision is made regarding its execution action. These actions include: when the sub-problem is the first fact query, the decision is to perform a retrieval action; when the sub-problem has a history of failed retrievals, the decision is to perform a semantic rewriting action to generate a new query; and when the sub-problem only requires logical operations on existing facts, the decision is to perform a direct answer based on reasoning.

[0028] It should be noted that the control layer consists of a supervisor. This module dynamically manages the execution status of subproblems, identifies currently executable subproblems, and decides on actions such as "retrieving new evidence," "retrying after semantic rewriting," or "directly reasoning based on existing facts" based on their type and historical execution results. Furthermore, the supervisor supports multiple execution modes, including sequential, parallel, and branch-convergence, and possesses failure recovery capabilities.

[0029] Specifically, the control layer is implemented by a supervisor, which is responsible for dynamically scheduling the specific plans. The execution. The supervisor maintains an execution state. ,in The set of solved subproblems and their answers. The set of subproblems to be processed (satisfying) ), For a partial mapping, record each subproblem to be processed. The set of search queries that were attempted but did not yield valid results.

[0030] In each iteration In the process, the supervisor first identifies a subset of currently executable subproblems. That is, the prerequisite answers it depends on already exist. In the middle. Then, the supervisor calls the large language model. Generate scheduling decisions based on the current state: ; in, For supervisor instructions, For the decision outcome, Representing the problem of pairs The actions taken This corresponds to the query or reasoning question. In this embodiment, the instructions instruct the model to follow the following logical principles when making specific decisions: If For fact-finding and Then execute (Retrieval), generating concise entity binding queries; if Then execute (Rewrite) Generate new queries through semantic rewriting ;like If only logical operations (such as comparison and intersection) are needed on existing facts, then execution will proceed. (The answer) is directly handled by the inference module. The supervisor supports multiple execution modes, including sequential, parallel, and branch-convergence, and updates the state after each iteration. until Or reach the preset maximum number of iterations .

[0031] S3. The execution layer executes the decisions made by the control layer to generate answers to the currently executable sub-questions by retrieving facts from external documents or by performing logical reasoning based on accumulated facts. The execution layer consists of an extractor and an inferencer. The extractor is responsible for extracting atomic facts directly related to the sub-questions from the retrieved documents; the inferencer then uses these facts or accumulated knowledge to perform logical deductions and generate answers to the sub-questions. If the entire inference process is not fully completed, the system is also equipped with a backup inferencer to generate a best-effort final answer using existing information.

[0032] The execution layer performs execution actions, including: When the action is a retrieval action or a semantic rewriting action, relevant documents are retrieved from the external document library based on the corresponding query, and an extractor is used to extract atomic facts directly related to the query from the relevant documents. Using an inference engine, logical deduction is performed based on extracted atomic facts or, when the action is a direct response action, all accumulated facts to generate answers to sub-questions.

[0033] Furthermore, after extracting atomic facts using an extractor, the process also includes: If the extracted set of atomic facts is empty, the current query will be recorded in the retrieval failure history of the corresponding sub-question. In subsequent iterations, the control layer rewrites the semantics of sub-problem decisions based on the updated retrieval failure history.

[0034] It should be noted that the execution layer consists of two dedicated modules that implement the supervisor's scheduling decisions. The extractor is used to build atomic facts from the retrieved documents, and the inferencer is used to synthesize the final answer from the facts. For Each instruction in The execution layer processes it as follows: like The system first uses a dense search engine to retrieve documents from the document database. Search and query Most relevant front This document is denoted as Then the extractor is invoked to extract atomic facts: ; in To extract instructions, the model is required to output only those related to... A set of strictly relevant and verifiable atomic facts . For executing the large language model of extraction instructions. If Then this query Log to failure mapping This is for subsequent rewriting by the supervisor.

[0035] Next, the inference engine generates answers to sub-questions based on the extracted facts: ; in, For reasoning instructions, A large language model for executing inference instructions. This represents the currently available set of evidence. If (i.e., no search is required), then Given the set of all facts that the system has accumulated at the current moment, the inferencer directly performs logical deductions based on this set.

[0036] S4. Iterate through the scheduling and decision-making of the control layer and the execution of the execution layer until all sub-problems are completed or the termination condition is met, and generate the final answer to the multi-hop problem based on the answers to all sub-problems.

[0037] In this embodiment, generating the final answer to the multi-hop problem further includes: If there are still unsolved subproblems when the iteration terminates, the backup inferencer is started; The backup inference engine receives the multi-hop question, the generated inference skeleton, all accumulated facts, and the last successfully retrieved document, and generates a final answer.

[0038] Specifically, to address situations where the reasoning process cannot be fully completed (such as due to continuous retrieval failures or reaching the iteration limit), this invention introduces a backup inferencer. When the main loop terminates and the original problem remains unsolved, the backup inferencer receives the original problem. Reasoning blueprint Using all collected facts and the last successfully retrieved document as input, a best-effort final answer is generated, ensuring that the system always has output capability and improving robustness in practice.

[0039] Furthermore, the hierarchical framework designed in this invention can not only accurately answer questions, but also generate rich structured execution traces, thereby supporting modular self-training as described below.

[0040] Specifically, this method also includes a modular self-training step for optimizing modules in the policy layer, control layer, and execution layer. The modular self-training step includes: Run a multi-hop question-and-answer method to collect the complete execution trajectory, including the inputs and outputs of each module; Based on the final result quality of the execution trajectory, high-quality behavior samples are selected; Using the selected samples, the meta-planner, the supervisor, the extractor, and the inferencer in the control layer are fine-tuned.

[0041] Fine-tuning of the meta-planner employs a preference learning approach, including: For the same multi-hop problem, multiple inference skeletons are sampled and executed separately to obtain multiple execution trajectories; Preference pairs are constructed based on the quality metrics of the final answer for each execution trajectory; The meta-planner is trained using preference pairs via the direct preference optimization method.

[0042] Fine-tuning of the supervisor in the control layer includes: Collect samples from the execution trajectory where semantic rewriting actions facilitated subsequent successful retrieval and ultimately led to the correct answer; The supervisor is trained using samples through supervised fine-tuning to learn effective query rewriting strategies.

[0043] In conjunction with the above, this invention further proposes a self-supervised modular training mechanism for targeted optimization of various components in the policy layer, control layer, and execution layer without relying on manually labeled data or a stronger teacher model. The core idea of ​​this mechanism is to utilize the complete execution trajectory generated by the system itself during multi-hop question-answering as a training signal source. By analyzing the quality of the final question-answering results, high-quality intermediate behaviors are filtered out, and training samples for each module are constructed accordingly.

[0044] Specifically, the system first runs the complete inference process on a preserved question-and-answer dataset, recording the detailed execution trajectory of each round, including: the inference blueprint generated by the meta-planner. The supervisor's scheduling decisions in each round of output Atomic facts output by the extractor Intermediate answers generated by the inference engine and the final answer And related performance metrics (such as F1 score compared to the standard answer, whether it is correct, total number of iterations, whether there is a failure state, etc.).

[0045] Based on the above trajectory, the following training data construction strategies are designed for different modules according to their functional positioning: (1) Preference learning training of metaplanner To enhance the ability of the meta-planner to generate general strategies and specific plans with strong executability and reasonable reasoning paths, this invention employs a preference learning method. For each problem... Sample from the current metaplanner One (e.g.) Diverse reasoning blueprints Each trajectory is then subjected to a complete inference process. Each trajectory is scored based on the quality of the final result (including answer correctness, F1 score, number of iterations, and whether duplicate rewrites occur). Subsequently, preference pairs are constructed from different trajectories for the same question. ,in The corresponding is significantly better than The execution results (e.g., correct vs. incorrect, or F1 difference greater than 0.3) and the two plans have sufficient differences in content (e.g., F1 similarity between plans is less than 0.8). These preferences are used to fine-tune the meta-planner through the Direct Preference Optimization (DPO) method, making it tend to generate better high-level inference structures.

[0046] (2) Effective rewriting training of supervisors One of the key capabilities of a supervisor is to generate effective semantic rewriting queries when retrieval fails. To this end, this invention specifically collects all queries containing... The trajectory of actions and the final correct answer. Based on this, two types of invalid samples are further filtered out: first, those where the rewritten query was not actually executed (e.g., skipped due to plan rearrangement); second, those marked as invalid. However, these are actually initial retrieval attempts (i.e., not true rewriting after failure). Only samples where the rewriting action directly led to subsequent successful fact extraction and ultimately the correct answer are retained. These high-quality behavior sequences are used to train a supervisor through Supervised Fine-Tuning (SFT) to enable it to reproduce effective query rewriting strategies in similar failure scenarios.

[0047] (3) Minimum fact extraction training of the extractor To avoid redundant or irrelevant information output by the extractor, this invention focuses on optimizing its ability to extract the "minimum necessary facts." Only the trajectory with the correct final answer is retained, and samples with more than one extracted fact (i.e., potentially redundant) are selected. Subsequently, a frozen auxiliary large language model is invoked, based on the prompt "Given query..." and candidate fact set Please select the minimum subset of facts that is strictly required to answer this query, and then select a concise subset from it. .like Then the input will be... With target output These are used to form training pairs for fine-tuning the extractor using the SFT method, enabling it to learn to output a more accurate and concise set of facts.

[0048] (4) Training in concise and deterministic responses from inference engines Inference engines sometimes generate lengthy, ambiguous, or multi-solution answers (e.g., "maybe A or B"), affecting the accuracy of the final answer. To address this, this invention selects samples that meet the following conditions for optimization: ① the F1 score of the answer compared to the standard answer is greater than 0.3 (i.e., it contains correct information); ② the answer does not perfectly match the standard answer; ③ the answer length exceeds 1.5 times the length of the standard answer. To prevent the model from over-compressing answers or learning incorrect patterns, twice the number of samples that "perfectly match the standard answer" are randomly sampled for balancing. All samples are trained using SFT, with the goal of optimizing the input... This is mapped to a concise, definite, single-sentence answer that is formatted in accordance with the standard answer.

[0049] Through the modular training strategy described above, this invention achieves targeted optimization of each component, and the entire process is based entirely on the system's self-generated execution trajectory, requiring no manual annotation and not relying on teacher models with larger parameters or stronger capabilities. This not only significantly reduces training costs but also ensures the consistency of behavior of each module in the real inference loop, thereby effectively improving the overall performance and robustness of open-source large language models on complex multi-hop question-answering tasks.

[0050] In summary, the present invention, in accordance with the above scheme, achieves robust, efficient, and interpretable reasoning for multi-hop problems through the collaborative design of the strategy layer, control layer, and execution layer, combined with a modular self-training mechanism, which is significantly superior to existing iterative retrieval enhancement generation methods.

[0051] As can be seen from the technical solution provided by the present invention above, compared with the previous iterative retrieval enhancement generation method, the present invention has the following advantages: 1. By first constructing an abstract reasoning framework and then instantiating subproblems, robustness to entity ambiguity is significantly improved; 2. The control layer dynamically schedules the inference process, supports multiple execution modes, and intelligently decides whether to retrieve data, improving efficiency and accuracy; 3. Possesses failure detection and semantic rewriting capabilities, enhancing system fault tolerance; 4. The reasoning process is clearly structured and the steps are traceable, ensuring interpretability and the fidelity of the answer; 5. Supports modular training based on self-executing trajectories, eliminating the need for manual annotation or stronger teacher models, facilitating practical deployment and continuous optimization.

[0052] This invention also provides a multi-hop question-answering system based on a hierarchical decision-making mechanism. This system is used to implement the above-described method embodiments, and details already described will not be repeated. The terms "module," "unit," and "subunit," etc., used below refer to combinations of software and / or hardware that achieve a predetermined function. Although the system described in the following embodiments is preferably implemented in software, hardware implementation or a combination of software and hardware is also possible and contemplated.

[0053] like Figure 2 As shown, Figure 2 This is a structural block diagram of the multi-hop question-answering system based on a hierarchical decision-making mechanism in this invention. The system includes: Strategy module 101 is configured to generate an abstract inference skeleton corresponding to the multi-hop problem and a set of executable sub-problems instantiated based on the abstract inference skeleton in response to the multi-hop problem received by the user. The control module 102 is configured to dynamically schedule the execution order and execution mode of each sub-problem based on the set of executable sub-problems, and to decide the corresponding execution action for the currently executable sub-problem; The execution module 103 is configured to execute the actions decided by the control module, so as to extract facts by retrieving external documents or perform logical reasoning based on accumulated facts, generate the answer to the currently executable sub-question, and iteratively interact with the control module until all sub-questions are completed or the termination condition is reached, so as to generate the final answer to the multi-hop question. The strategy module 101, control module 102, and execution module 103 work together to implement the above method.

[0054] like Figure 3 As shown in the figure, an electronic device provided by an embodiment of the present invention includes: a processor 610, a communication interface 620, a memory 630, and a communication bus 640, wherein the processor 610, the communication interface 620, and the memory 630 communicate with each other through the communication bus 640. The processor 610 can call logical instructions in the memory 630 to execute the following method: In response to the multi-hop problem of receiving users, the strategy layer generates an abstract inference skeleton corresponding to the multi-hop problem and a set of executable sub-problems instantiated based on the abstract inference skeleton; Based on the set of executable sub-problems, the control layer dynamically schedules the execution order and execution mode of each sub-problem, and decides the corresponding execution action for the currently executable sub-problem; The execution layer executes the decision-making actions of the control layer to generate the answer to the currently executable sub-question by retrieving facts from external documents or by performing logical reasoning based on accumulated facts. The scheduling and decision-making of the control layer and the execution of the execution layer are executed iteratively until all sub-problems are completed or the termination condition is met, and the final answer to the multi-hop problem is generated based on the answers to all sub-problems.

[0055] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0056] This invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, is implemented to perform the methods provided in the above embodiments.

[0057] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or some parts of embodiments.

[0058] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A multi-hop question-answering method based on a hierarchical decision-making mechanism, characterized in that, Includes the following steps: In response to the multi-hop problem of receiving users, the strategy layer generates an abstract inference skeleton corresponding to the multi-hop problem and a set of executable sub-problems instantiated based on the abstract inference skeleton; The strategy layer utilizes a meta-planner to generate a general strategy containing multiple steps based on the multi-hop problem. Each step describes the entity type and logical relationship without binding to a specific entity name. Then, based on the general strategy and the specific entities in the multi-hop problem, the set of executable sub-problems is instantiated and generated. The control layer dynamically schedules the execution order and mode of each sub-problem based on the set of executable sub-problems, and decides the corresponding execution action for the currently executable sub-problems. The control layer includes a supervisor, which maintains an execution state, which includes at least a set of solved sub-problems, a set of sub-problems to be processed, and a mapping that records the history of retrieval failures. Based on the execution state, the supervisor identifies the currently executable sub-problems whose dependencies have been satisfied, and decides the execution action for each of the currently executable sub-problems. The execution actions include: when the sub-problem is the first fact query, the decision is a retrieval action; when the sub-problem has a history of retrieval failures, the decision is a semantic rewriting action to generate a new query; when the sub-problem only requires logical operations on existing facts, the decision is a direct answer based on reasoning. The execution layer executes the actions decided by the control layer to generate the answer to the currently executable sub-question by retrieving facts from external documents or by performing logical reasoning based on accumulated facts. The execution layer includes an extractor and an inferrer. When the execution action is a retrieval action or a semantic rewriting action, relevant documents are retrieved from an external document library based on the corresponding query. The extractor extracts atomic facts directly related to the query from the relevant documents, and the inferrer performs logical deduction based on the extracted atomic facts to generate the answer to the sub-question. When the execution action is a direct answer action, the inferrer performs logical deduction directly based on all accumulated facts to generate the answer to the sub-question. If the set of extracted atomic facts is empty, the current query is recorded in the retrieval failure history of the corresponding sub-question so that the supervisor can decide on the semantic rewriting action based on the updated retrieval failure history in subsequent iterations. The scheduling and decision-making of the control layer and the execution of the execution layer are executed iteratively until all sub-problems are completed or the termination condition is met, and the final answer to the multi-hop problem is generated based on the answers to all sub-problems.

2. The method according to claim 1, characterized in that, After extracting atomic facts using an extractor, the process also includes: If the extracted set of atomic facts is empty, the current query will be recorded in the retrieval failure history of the corresponding sub-question. In subsequent iterations, the control layer rewrites the semantics of the sub-problem decision based on the updated retrieval failure history.

3. The method according to claim 2, characterized in that, The generation of the final answer to the multi-hop problem also includes: If there are still unsolved subproblems when the iteration terminates, the backup inferencer is started; The backup inference engine receives the multi-hop question, the generated inference skeleton, all accumulated facts, and the last successfully retrieved document, and generates a final answer.

4. The method according to claim 3, characterized in that, It also includes a modular self-training step for optimizing modules in the policy layer, control layer, and execution layer, the modular self-training step including: Run the multi-hop question-answering method to collect the complete execution trajectory containing the inputs and outputs of each module; Based on the quality of the final result of the execution trajectory, high-quality behavior samples are selected; Using the selected samples, the meta-planner, the supervisor in the control layer, the extractor, and the inference engine are fine-tuned accordingly.

5. The method according to claim 1, characterized in that, The fine-tuning of the meta-planner employs a preference learning method, including: For the same multi-hop problem, multiple inference skeletons are sampled and executed separately to obtain multiple execution trajectories; Preference pairs are constructed based on the quality metrics of the final answer for each execution trajectory; The meta-planner is trained using the preference pairs via a direct preference optimization method.

6. The method according to claim 4, characterized in that, Fine-tuning the supervisor in the control layer includes: Collect samples from the execution trajectory where semantic rewriting actions facilitated subsequent successful retrieval and ultimately led to the correct answer; The supervisor is trained using the samples through supervised fine-tuning to learn effective query rewriting strategies.

7. A multi-hop question-answering system based on a hierarchical decision-making mechanism, characterized in that, include: The strategy module is configured to respond to a multi-hop problem received from a user by generating an abstract reasoning skeleton corresponding to the multi-hop problem and a set of executable sub-problems instantiated based on the abstract reasoning skeleton. The strategy layer uses a meta-planner to generate a general strategy containing multiple steps based on the multi-hop problem. Each step describes the entity type and logical relationship without binding to a specific entity name. Then, based on the general strategy and the specific entities in the multi-hop problem, the set of executable sub-problems is instantiated. The control module is configured to dynamically schedule the execution order and execution mode of each sub-problem based on the set of executable sub-problems, and to decide the corresponding execution action for the currently executable sub-problem. The control layer includes a supervisor, which maintains an execution state, which includes at least a set of solved sub-problems, a set of sub-problems to be processed, and a mapping that records the history of retrieval failures. Based on the execution state, the supervisor identifies the currently executable sub-problems whose dependencies have been satisfied, and decides the execution action for each of the currently executable sub-problems. The execution actions include: when the sub-problem is the first fact query, the decision is a retrieval action; when the sub-problem has a history of retrieval failures, the decision is a semantic rewriting action to generate a new query; when the sub-problem only requires logical operations on existing facts, the decision is a direct answer based on reasoning. An execution module is configured to execute actions decided by the control module. This involves extracting facts from external documents or performing logical reasoning based on accumulated facts to generate answers to the currently executable sub-questions. The module iteratively interacts with the control module until all sub-questions are completed or a termination condition is met, generating a final answer to the multi-hop problem. The execution layer includes an extractor and an inferencer. When the execution action is a retrieval action or a semantic rewriting action, relevant documents are retrieved from an external document library based on the corresponding query. The extractor extracts atomic facts directly related to the query from these documents, and the inferencer performs logical deduction based on the extracted atomic facts to generate answers to the sub-questions. When the execution action is a direct answer action, the inferencer directly performs logical deduction based on all accumulated facts to generate answers to the sub-questions. If the extracted set of atomic facts is empty, the current query is recorded in the retrieval failure history of the corresponding sub-question, allowing the supervisor to decide on semantic rewriting actions based on the updated retrieval failure history in subsequent iterations. The strategy module, control module, and execution module work together to implement the method according to any one of claims 1-6.