Retrieval enhancement generation anti-noise method and system based on dynamic reasoning intervention

By inserting external knowledge and operational instructions into the inference chain of a large language model, and verifying and correcting noisy information in real time, the problem of misleading information in noisy documents under traditional retrieval enhancement generation methods is solved, achieving higher accuracy and robustness.

CN121365728APending Publication Date: 2026-01-20SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202511379079.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-25
Publication Date
2026-01-20

AI Technical Summary

Technical Problem

Traditional retrieval enhancement generation methods are easily misled by noisy documents, leading to the generation of incorrect answers. Existing hint engineering cannot effectively intervene in the internal reasoning process of the model, resulting in insufficient system accuracy and robustness.

Method used

External knowledge or operational instructions are dynamically inserted into the inference chain of the large language model. Noise information is verified and corrected in real time through paragraph injection and instruction injection mechanisms. A multi-stage verification process is adopted to enhance the model's noise resistance.

Benefits of technology

It significantly improves the system's accuracy and robustness under noisy documents, reduces redundant information, optimizes response efficiency, and makes the output more concise and reliable.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121365728A_ABST
    Figure CN121365728A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of large language models, in particular to a retrieval enhancement generation anti-noise method and system based on dynamic reasoning intervention, and the method comprises the following steps: a paragraph injection step and an instruction injection step: selecting a node with an auto-reflection capability in a model reasoning chain as an insertion point, and after a model generates a node label, executing the step of instruction injection; triggering a dynamic insertion retrieval paragraph and a verification instruction thereof based on a predefined insertion rule; the method has the beneficial effects that a dynamic intervention mechanism is introduced into a model reasoning chain, so that the anti-noise capability of a retrieval enhancement generation system is remarkably improved, errors can be effectively recognized and corrected in a complex scene with misleading information, and the accuracy of output content is guaranteed. Meanwhile, according to the method, key facts and task instructions are verified in real time in the reasoning process, generation of redundant information is reduced, response efficiency is optimized, and output is more concise and reliable.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of large language model, in particular to a retrieval augmentation generation anti-noise method and system based on dynamic reasoning intervention. BACKGROUND

[0002] Traditional retrieval augmentation generation (RAG) methods usually directly concatenate the retrieved documents to the user question and input them to the large language model for generation. However, this method is easily misled when facing documents containing false information, leading to the generation of incorrect answers. For example, in questions involving geographical or historical facts, if the retrieved document incorrectly states that "Northern Ireland belongs to a country other than the United Kingdom", the model may output an incorrect conclusion.

[0003] In the prior art, prompt engineering such as Reminder Prompting only optimizes the input instructions and cannot effectively intervene in the reasoning process of the model. Therefore, the accuracy and robustness of existing RAG systems still face great challenges in the presence of noisy documents. SUMMARY

[0004] The purpose of the present application is to provide a retrieval augmentation generation anti-noise method and system based on dynamic reasoning intervention, which dynamically inserts external knowledge or operation instructions in the reasoning chain of the large language model to enhance the model's judgment and error correction ability when facing noisy documents; to solve the problems raised in the background art.

[0005] To achieve the above purpose, the present application provides the following technical solution: a retrieval augmentation generation anti-noise method based on dynamic reasoning intervention, comprising a paragraph injection step and an instruction injection step;

[0006] The paragraph injection step is: selecting a node with self-reflection ability as an insertion point in the model reasoning chain, after the model generates the node label, triggering dynamic insertion of the retrieved paragraph and its verification instructions based on pre-defined insertion rules; the inserted content includes document fragments retrieved from an external knowledge base, verification instructions guiding the model to actively verify the correctness of the paragraph content, and context connection markers connecting the injected content with the original question through natural language connection words; after the model receives the injected content, it verifies the retrieved paragraph in real time based on its internal knowledge base using fact checking, logical reasoning and output correction methods;

[0007] The instruction injection step is: inserting format control instructions at the final stage of model answer generation, dynamically selecting instruction types according to task requirements and inserting them when the model enters the generation stage; instruction types include format control instructions, logical constraint instructions and context-sensitive instructions; after the model receives the instructions, it identifies the instruction type through an internal parser and activates the corresponding processing module, and executes the instructions using format control and logical constraint methods.

[0008] Preferably, in the paragraph injection step, the node with self-reflection ability is the node in the logical reasoning path generation stage, corresponding to the intermediate reasoning step before the model generates the answer; the pre-defined insertion rule is based on keyword matching or context semantic analysis; when the model verifies the retrieved paragraph in real time, it compares the internal knowledge of the model with the contradictions in the injected paragraph, verifies the rationality of the information through multiple reasoning steps, and actively corrects the answer if contradictions are found.

[0009] Preferably, in the instruction injection step, the format control instruction filters illegal symbols in the output through regular expressions or syntax parsers; the logical constraint instruction forces the model to reference at least a specified number of verification sources when generating the answer; the context-sensitive instruction triggers additional verification steps through conditional judgment logic.

[0010] Preferably, it further includes a dynamic reasoning intervention collaboration mechanism, which is a multi-stage verification process, specifically: in the first stage, insert the retrieved paragraph at the reasoning node of the model to guide the model to verify the key facts in real time and actively identify and correct noise information; in the second stage, inject format or logic instructions before generating the answer to ensure that the final output meets the task specifications; the two stages work together to enhance the anti-interference ability of the system in complex scenarios.

[0011] Preferably, the collaboration mechanism further includes a model adaptability optimization step, specifically: optimize and adapt the model to be suitable for large language models with reasoning chain structure, require the model to support dynamic content injection, have self-reflection reasoning ability, and provide a programmable interface; use a general interface encapsulation strategy to define standardized methods and optimize parameters according to the response characteristics of different models, taking into account generation efficiency and compatibility.

[0012] A system for a retrieval-enhanced generation anti-noise method based on dynamic reasoning intervention, including a paragraph injection module, an instruction injection module, and a dynamic reasoning intervention collaboration module;

[0013] The paragraph injection module is used to dynamically insert retrieved paragraphs and their verification instructions in the model reasoning chain to assist the model in verifying external knowledge;

[0014] The instruction injection module is used to insert format control, logical constraint, or context-sensitive instructions at specific stages of the model generating answers to standardize the model output;

[0015] The dynamic reasoning intervention collaboration module is used to coordinate the paragraph injection and instruction injection processes, and to achieve the anti-noise function in the retrieval-enhanced generation process through a multi-stage verification process.

[0016] Preferably, the paragraph injection module includes:

[0017] Trigger unit: Select a node with self-reflection ability as the insertion point in the model inference chain, which corresponds to the stage of generating logical reasoning path of the model. After the model generates the label of this node, trigger the dynamic insertion operation according to the predefined insertion rule;

[0018] Content generation unit: Generate insertion content, including document fragments retrieved from external knowledge base as retrieval paragraphs, verification instructions to guide the model to actively verify the correctness of the paragraph content, and context connection markers to connect the injected content with the original question through natural language connection words;

[0019] Verification unit: After the model receives the injected content, it verifies the retrieval paragraph in real time based on the internal knowledge base by fact checking, logical reasoning and output correction. Specifically, it compares the contradictions between the internal knowledge of the model and the injected paragraph, verifies the rationality of the information through multi-step reasoning, and actively corrects the answer if contradictions are found.

[0020] Preferably, the instruction injection module comprises:

[0021] Trigger selection unit: Select the instruction to be inserted at the final stage of generating the answer of the model, and dynamically select the type of instruction according to the task requirements;

[0022] Instruction classification unit: Divide the instruction type into format control instruction, logic constraint instruction and context sensitive instruction, and formulate examples and implementation methods for each type of instruction;

[0023] The example of format control instruction is "I should ensure the answer does not use any commas.", which is implemented by filtering illegal symbols in the output through regular expression or syntax parser; The example of logic constraint instruction is "The answer must include at least two sources of evidence.", which forces the model to reference at least two verification sources when generating the answer; The example of context sensitive instruction is "If the passage mentions 'Northern Ireland', confirm its political status.", which triggers additional verification steps through conditional judgment logic;

[0024] Execution unit: After the model receives the instruction, it identifies the type of instruction through the internal parser and activates the corresponding processing module; During the execution of the instruction, the format control method is adopted, the format verification tool is called when generating the answer, and the logic constraint is adopted, and whether the constraint condition is met after generating the answer is checked through the post-processing module.

[0025] Preferably, the dynamic reasoning intervention cooperation module comprises:

[0026] Multi-stage verification flow unit: First stage: In the model of <thinking>The reasoning node inserts a retrieval paragraph, guiding the model to verify key facts in real time, actively identifying and correcting noisy information; the second stage: in <answer>Generate pre-injection format or logical instructions to ensure that the final output meets the task specifications; the two stages work together to solve the accuracy problem of external knowledge, guarantee the consistency and solvability of the output, and enhance the anti-interference ability of the system in complex scenarios;

[0027] Model adaptability optimization unit: optimize and adapt the model to be suitable for <thinking>The large language model of the analogical reasoning chain structure requires the model to support dynamic content injection, have self-reflective reasoning ability, and provide a programmable interface; to realize cross-model deployment, a general interface encapsulation strategy is adopted, standardized insert_passage() and insert_instruction() methods are defined, and parameter optimization is performed according to the response characteristics of different models, such as flexible adjustment of paragraph injection frequency and instruction forcing degree, taking into account generation efficiency and compatibility.

[0028] Preferably, the system operation method comprises the following steps:

[0029] Step one: initialize the system, load the <thinking>The large language model of the analogical reasoning chain structure is configured with related parameters of a paragraph injection module, an instruction injection module and a dynamic reasoning intervention coordination module;

[0030] Step two: when the model starts to reason to generate an answer, the trigger unit of the paragraph injection module judges whether to reach the insertion point according to the pre-defined rule, if yes, the content generation unit inserts the retrieved paragraph, the verification instruction and the context connection mark, and the model receives the same and is verified in real time by the verification unit;

[0031] Step three: in the final stage of the model generating an answer, the trigger selection unit of the instruction injection module selects the instruction type according to the task requirement, the instruction classification unit generates the corresponding instruction, and the execution unit sends the instruction to the model, and the model receives the instruction and performs format control and logic constraint processing;

[0032] Step four: the multi-stage verification process unit of the dynamic reasoning intervention coordination module coordinates the paragraph injection and instruction injection processes, and verifies and standardizes the output according to the processes of the first stage and the second stage; the model adaptability optimization unit adjusts the parameters in real time according to the model response characteristics, to ensure the system operation efficiency and compatibility;

[0033] Step five: the model outputs the final answer, and completes the retrieval enhancement generation anti-noise process based on dynamic reasoning intervention.

[0034] Compared with the prior art, the present application has the following advantages:

[0035] The retrieval enhancement generation anti-noise method and system based on dynamic reasoning intervention introduced in the present application significantly improves the anti-noise ability of the retrieval enhancement generation system by introducing a dynamic intervention mechanism in the model reasoning chain, effectively identifies and corrects errors in complex scenarios with misleading information, and guarantees the accuracy of the output content. At the same time, the method verifies the key facts and task instructions in real time during the reasoning process, reduces the generation of redundant information, optimizes the response efficiency, and makes the output more concise and reliable. BRIEF DESCRIPTION OF DRAWINGS

[0036] Figure 1 The method flowchart of the present application. DETAILED DESCRIPTION

[0037] In order to make the purpose, technical scheme of the present application clear, complete and more clear and understandable, the embodiments of the present application are further described in detail below with reference to the drawings. It should be understood that the specific embodiments described herein are part of the embodiments of the present application, but not all the embodiments, which are used to explain the embodiments of the present application, and do not limit the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0038] Embodiment one, the present application provides a technical solution: a retrieval enhancement generation anti-noise method based on dynamic inference intervention, comprising the following steps:

[0039] I. Implementation mechanism of passage injection

[0040] Triggering condition of dynamic insertion

[0041] In the model inference chain, select the node with self-reflection ability (such as <thinking>tags) as insertion points. This node typically corresponds to a stage in which the model generation logic infers a path, e.g., an intermediate inference step before generating an answer. In model generation <thinking>After the label, the retrieval paragraph and its verification instruction are inserted immediately. This operation is triggered by predefined insertion rules (such as keyword matching or contextual semantic analysis).

[0042] Structure design of paragraph injection

[0043] The inserted content contains three parts: the retrieval paragraph, a document fragment retrieved from the external knowledge base (such as "Jamie Dornan is a British actor..."); the verification instruction, which guides the model to actively verify the correctness of the paragraph content (such as "Please verify whether the following information is correct..."); and the context linking marker, which connects the injected content with the original question through natural language linking words (such as "According to the above information"), ensuring logical coherence.

[0044] Verification process

[0045] After receiving the injected content, the model verifies the retrieval paragraph in real time based on its internal knowledge base. The verification process uses fact checking, logical reasoning, and output correction, mainly checking for contradictions between the model's internal knowledge and the injected paragraph (such as whether "Northern Ireland" belongs to the UK); verifying the reasonableness of the information through multi-step reasoning (such as geographical location, nationality attribution rules); if contradictions are found, the model will actively correct the answer (such as changing "United States" to "United Kingdom").

[0046] II. Implementation mechanism of instruction injection

[0047] Trigger conditions for instruction injection

[0048] For the selection of trigger points, the model generates answers in the final stage (such as generating <answer>Insert format control instructions before the label. Dynamic insertion timing can dynamically select instruction types based on task requirements (such as multi-hop question answering, instruction following) and insert them when the model enters the generation stage.

[0049] Structural design of instruction injection

[0050] Classification of instruction types, mainly divided into format control instructions, logical constraint instructions and context-sensitive instructions. Develop examples and implementation methods for each type of instruction.

[0051] Format control instructions:

[0052] Example: I should ensure the answer does not use any commas.

[0053] Implementation: Filter illegal symbols in the output through regular expressions or syntax parsers.

[0054] Logical constraint instructions:

[0055] Example: The answer must include at least two sources of evidence.

[0056] Implementation: Force the model to reference at least two verification sources when generating the answer.

[0057] Context-sensitive instructions:

[0058] Example: If the passage mentions "Northern Ireland", confirm its political status.

[0059] Implementation: Trigger additional verification steps through conditional judgment logic.

[0060] Execution process of instruction injection

[0061] After receiving the instructions, the model identifies the instruction type through the internal parser and activates the corresponding processing module. During instruction execution, the format control method is used, and the answer generation calls the format verification tool (such as comma detector, sentence splitter); and, perform logical constraints, after generating the answer, through the post-processing module to check whether it meets the constraint conditions (such as the number of reference sources); secondly, the dynamic insertion timing can dynamically select instruction types based on task requirements (such as multi-hop question answering, instruction following) and insert them when the model enters the generation stage.

[0062] III. Collaborative mechanism of dynamic reasoning intervention

[0063] Multi-stage verification process

[0064] In the first stage, the model's <thinking>Reasoning nodes are inserted into the retrieval passage and guide the model to verify key facts (such as nationality, geographic location) in real time, actively identifying and correcting noisy information; in the second phase, the model is trained to <answer>Generate pre-injection format or logical instructions (such as "output no comma" or "quote at least two sources"), ensure that the final output meets the task specifications. Two stages work together to solve the accuracy of external knowledge and ensure the consistency and solvability of the output, significantly enhancing the anti-interference ability of the system in complex scenarios.

[0065] Model adaptation optimization

[0066] Optimize the adaptation of the model, which is applicable to <thinking>Large language models with reasoning chain structure (such as Qwen3, DeepSeek-R1, etc.) require the model to support dynamic content injection, have self-reflective reasoning ability, and provide a programmable interface. To achieve cross-model deployment, a general interface encapsulation strategy is adopted, defining standardized insert_passage() and insert_instruction() methods, and according to the response characteristics of different models, the parameters are optimized, such as flexibly adjusting the paragraph injection frequency and instruction enforcement degree, so as to ensure the intervention effect while considering the generation efficiency and compatibility.

[0067] In embodiment two, based on embodiment one, a system for retrieval enhancement generation anti-noise method based on dynamic reasoning intervention is proposed, including a paragraph injection module, an instruction injection module, and a dynamic reasoning intervention coordination module; the paragraph injection module is used to dynamically insert retrieval paragraphs and their verification instructions in the model reasoning chain to assist the model in verifying external knowledge; the instruction injection module is used to insert format control, logical constraints or context-sensitive instructions at a specific stage of model answer generation to standardize model output; the dynamic reasoning intervention coordination module is used to coordinate the paragraph injection and instruction injection process, and realize the anti-noise function in the retrieval enhancement generation process through a multi-stage verification process.

[0068] The paragraph injection module includes: a trigger unit: selecting a node with self-reflective ability as an insertion point in the model reasoning chain, which corresponds to the stage of the model's logical reasoning path, and triggering dynamic insertion operation according to pre-defined insertion rules after the model generates the node label; a content generation unit: generating insertion content, including document fragments retrieved from external knowledge base as retrieval paragraphs, verification instructions guiding the model to actively verify the correctness of paragraph content, and context connection markers connecting the injected content with the original problem through natural language connection words; a verification unit: after the model receives the injected content, it verifies the retrieval paragraph in real time based on the internal knowledge base using fact checking, logical reasoning and output correction, including comparing the contradictions between the model's internal knowledge and the injected paragraph, verifying the rationality of the information through multi-step reasoning, and actively correcting the answer if contradictions are found.

[0069] The instruction injection module comprises: a trigger selection unit: selecting to insert instructions in the final stage of model generating answers, and dynamically selecting instruction types according to task requirements; an instruction classification unit: classifying instruction types into format control instructions, logic constraint instructions and context-sensitive instructions, and formulating examples and implementation modes for each instruction type; the format control instruction example is "I should ensure the answer does not use any commas.", and the implementation is achieved by filtering illegal symbols in the output through a regular expression or a syntax parser; the logic constraint instruction example is "The answer must include at least two sources of evidence.", and the implementation is achieved by forcing the model to reference at least two verification sources when generating answers; the context-sensitive instruction example is "If the passage mentions 'Northern Ireland', confirm its political status.", and the implementation is achieved by triggering an additional verification step through conditional judgment logic; an execution unit: after the model receives instructions, the instruction type is identified through an internal parser, and the corresponding processing module is activated; when the instructions are executed, the format control mode is adopted, the format verification tool is called when generating answers, and the logic constraint is performed, and whether the constraint conditions are met after generating answers is checked through a post-processing module.

[0070] The dynamic reasoning intervention cooperation module comprises:

[0071] A multi-stage verification process unit: in the first stage: in the model's <thinking>The reasoning node inserts a retrieval paragraph, guiding the model to verify key facts in real time, actively identifying and correcting noisy information; the second stage: in <answer>Generate pre-injection format or logical instructions to ensure that the final output meets the task specifications; the two stages work together to solve the accuracy problem of external knowledge, guarantee the consistency and solvability of the output, and enhance the anti-interference ability of the system in complex scenarios; model adaptation optimization unit: optimize and adapt the model to make it suitable for <thinking>The large language model of the analogical reasoning chain structure requires the model to support dynamic content injection, have self-reflective reasoning ability, and provide a programmable interface; to realize cross-model deployment, a general interface encapsulation strategy is adopted, standardized insert_passage() and insert_instruction() methods are defined, and parameter optimization is performed according to the response characteristics of different models, such as flexible adjustment of paragraph injection frequency and instruction forcing degree, taking into account generation efficiency and compatibility.

[0072] The system operation method comprises the following steps:

[0073] Step one: initialize the system, load the <thinking>The large language model is analogized to a reasoning chain structure, and related parameters of a paragraph injection module, an instruction injection module, and a dynamic reasoning intervention coordination module are configured;

[0074] Step two: when the model starts to reason to generate an answer, the triggering unit of the paragraph injection module judges whether to reach the insertion point according to the predefined rule, if it reaches, the content generation unit inserts the retrieved paragraph, the verification instruction and the context connection mark, the model receives it and then the verification unit performs real-time verification;

[0075] Step three: in the final stage of the model generating an answer, the triggering selection unit of the instruction injection module selects the instruction type according to the task demand, the instruction classification unit generates the corresponding instruction, and the execution unit sends the instruction to the model, the model receives the instruction and then performs format control and logical constraint processing;

[0076] Step four: the multi-stage verification process unit of the dynamic reasoning intervention coordination module coordinates the paragraph injection and instruction injection process, and verifies and standardizes the output according to the flow of the first stage and the second stage; the model adaptability optimization unit adjusts the parameters in real time according to the model response characteristics, to ensure the system running efficiency and compatibility;

[0077] Step five: the model outputs the final answer, and completes the retrieval enhancement generation anti-noise process based on dynamic reasoning intervention.

[0078] Although the embodiments of the present application have been shown and described, it can be understood by those skilled in the art that various changes, modifications, replacements and variations can be made to the embodiments without departing from the principles and spirits of the present application, the scope of the present application is defined by the appended claims and their equivalents.< / thinking> < / thinking> < / answer> < / thinking> < / thinking> < / answer> < / thinking> < / answer> < / thinking> < / thinking> < / thinking> < / thinking> < / answer> < / thinking>

Claims

1. A search enhancement generation anti-noise method based on dynamic inference intervention, characterized by: The paragraph injection step and the instruction injection step are included. The paragraph injection step is: selecting a node with self-reflection ability as an insertion point in the model inference chain, triggering dynamic insertion of a retrieved paragraph and its verification instruction based on a predefined insertion rule after the model generates a tag of the node; the inserted content includes a document fragment retrieved from an external knowledge base, a verification instruction guiding the model to actively verify the correctness of the paragraph content, and a context connection marker connecting the injected content with the original question through a natural language connection word; After the model receives the injected content, it verifies the retrieved paragraph in real time based on its internal knowledge base by fact checking, logical reasoning, and output correction. The instruction injection step is: inserting format control instructions at the final stage of model answer generation, dynamically selecting instruction types according to task requirements and inserting them when the model enters the generation stage; instruction types include format control instructions, logical constraint instructions, and context-sensitive instructions; after the model receives the instructions, it identifies the instruction type through an internal parser and activates the corresponding processing module, and executes the instructions by format control and logical constraint.

2. The method of claim 1, wherein the method is based on dynamic inference intervention for search enhancement to generate anti-noise, and the method is characterized by: In the paragraph injection step, the node with self-reflection ability is the node in the logical reasoning path generation stage, corresponding to the intermediate reasoning step before the model generates the answer; the predefined insertion rule is based on keyword matching or context semantic analysis; when the model verifies the retrieved paragraph in real time, it compares the contradictions between the model's internal knowledge and the injected paragraph, verifies the rationality of the information through multiple reasoning steps, and actively corrects the answer if contradictions are found.

3. The method of claim 2, wherein the method is based on dynamic inference intervention for search enhancement to generate an anti-noise method, characterized by: In the instruction injection step, the format control instruction filters illegal symbols in the output through regular expressions or syntax parsers; the logical constraint instruction forces the model to reference at least a specified number of verification sources when generating the answer; the context-sensitive instruction triggers additional verification steps through conditional judgment logic.

4. The method of claim 3, wherein the method is based on dynamic inference intervention for search enhancement to generate an anti-noise method, characterized by: It also includes a collaborative mechanism for dynamic reasoning intervention, which is a multi-stage verification process, specifically: in the first stage, insert the retrieved paragraph at the inference node of the model to guide the model to verify key facts in real time and actively identify and correct noise information; in the second stage, inject format or logic instructions before generating the answer to ensure that the final output meets the task specifications; the two stages work together to enhance the system's anti-interference ability in complex scenarios.

5. The method of claim 4, wherein the method is a dynamic inference intervention based search enhancement generation anti-noise method. The collaborative mechanism also includes a model adaptability optimization step, which is: optimizing and adapting the model to be suitable for large language models with inference chain structure, requiring the model to support dynamic content injection, have self-reflection reasoning ability, and provide a programmable interface; using a general interface encapsulation strategy, defining standardized methods, and adjusting parameters according to the response characteristics of different models, balancing generation efficiency and compatibility.

6. A system for generating an anti-noise method of search enhancement based on dynamic inference intervention as claimed in claim 5, characterized by: The paragraph injection module, the instruction injection module, and the dynamic reasoning intervention collaborative module are included. The paragraph injection module is used to dynamically insert a retrieved paragraph and its verification instruction in the model inference chain to assist the model in verifying external knowledge; The instruction injection module is used to insert format control, logical constraint, or context-sensitive instructions at a specific stage of model answer generation to standardize model output; The dynamic reasoning intervention coordination module is used for coordinating the paragraph injection and instruction injection processes, and realizing the anti-noise function in the retrieval enhancement generation process through a multi-stage verification process.

7. The system of claim 6, wherein: The paragraph injection module comprises: A triggering unit: a node with self-reflection capability is selected as an insertion point in a model reasoning chain, the node corresponds to a stage of a model generation logical reasoning path, after the model generates a tag of the node, a dynamic insertion operation is triggered according to a predefined insertion rule; A content generation unit: insertion content is generated, including a document segment retrieved from an external knowledge base as a retrieval paragraph, a verification instruction for guiding the model to actively verify the correctness of the paragraph content, and a context connection marker for connecting the injected content and the original question through a natural language connection word; A verification unit: after the model receives the injected content, the model verifies the retrieval paragraph in real time based on an internal knowledge base in a fact checking, logical reasoning and output correction manner, specifically including comparing contradictions between the internal knowledge of the model and the injected paragraph, verifying the rationality of the information through multi-step reasoning, and actively correcting the answer if a contradiction is found.

8. The system of claim 7, wherein: The instruction injection module comprises: A triggering selection unit: an instruction is inserted at the final stage of model answer generation, and the instruction type is dynamically selected according to task requirements; An instruction classification unit: the instruction type is divided into format control instructions, logical constraint instructions and context sensitive instructions, and examples and implementation modes are formulated for each instruction type; The format control instruction example is "I should ensure the answer does not use any commas.", and the illegal symbols in the output are filtered through a regular expression or a syntax parser; the logical constraint instruction example is "The answer must include at least two sources of evidence.", and at least two verification sources are forced to be referenced when the model generates the answer; the context sensitive instruction example is "If the passage mentions 'Northern Ireland', confirm its political status.", and an additional verification step is triggered through conditional judgment logic; An execution unit: after the model receives the instruction, the instruction type is identified through an internal parser, and the corresponding processing module is activated; during instruction execution, a format control method is used, a format verification tool is called when generating the answer, and a logical constraint is used, and whether the constraint condition is met is checked through a post-processing module after the answer is generated.

9. The system of claim 8, wherein: The dynamic reasoning intervention coordination module comprises: Multi-stage verification flow unit: first stage: at the model's <thinking>The reasoning node inserts a retrieval paragraph, guiding the model to verify key facts in real time, actively identifying and correcting noisy information; the second stage: in <answer>Generating format or logical instructions before injection, ensuring that the final output meets the task specifications; the two stages work together to solve the accuracy problem of external knowledge, guarantee the consistency and analyzability of the output, and enhance the anti-interference ability of the system in complex scenarios;< / answer> < / thinking> Model adaptation optimization unit: optimizes and adapts the model to be applicable to the user <thinking>The large language model with analogical reasoning chain structure requires the model to support dynamic content injection, have self-reflective reasoning ability, and provide a programmable interface; to realize cross-model deployment, a general interface encapsulation strategy is adopted, the standardized insert_passage() and insert_instruction() methods are defined, and parameter optimization is performed according to the response characteristics of different models, such as flexible adjustment of paragraph injection frequency and instruction forcing degree, taking into account generation efficiency and compatibility.< / thinking> 10. The system of claim 9, wherein: The system operation method comprises the following steps: Step one: initialize the system, load with <thinking>The large language model with analogical reasoning chain structure, and the related parameters of the paragraph injection module, the instruction injection module and the dynamic reasoning intervention coordination module are configured;< / thinking> Step two: when the model starts to reason and generate answers, the triggering unit of the paragraph injection module judges whether the insertion point is reached according to the pre-defined rules, if the insertion point is reached, the content generation unit inserts the retrieved paragraph, the verification instruction and the context connection mark, the model receives it and the verification unit performs real-time verification; Step three: in the final stage of model answer generation, the triggering selection unit of the instruction injection module selects the instruction type according to the task demand, the instruction classification unit generates the corresponding instruction, and the execution unit sends the instruction to the model, and the model receives the instruction and performs format control and logical constraint processing; Step four: the multi-stage verification process unit of the dynamic reasoning intervention coordination module coordinates the paragraph injection and instruction injection process, and performs verification and standard output according to the flow of the first stage and the second stage; the model adaptability optimization unit adjusts the parameters in real time according to the response characteristics of the model, to ensure the system operation efficiency and compatibility; Step five: the model outputs the final answer, and completes the retrieval enhancement generation anti-noise process based on dynamic reasoning intervention.

Citation Information

Patent Citations

  • Data source verification method oriented to automatic construction of knowledge graph

    CN117609516A

  • Table question and answer optimization method and device, electronic equipment and readable storage medium

    CN117874161A

  • Method and system for checking and relieving hallusion of large language model by using external knowledge base

    CN117932086A

  • Method, system and equipment for large language model fact verification based on retrieval enhancement and medium

    CN119204025A

  • Long context knowledge reasoning method based on large language model knowledge extraction and self-consistent thinking chain prompt

    CN119378685A