Efficient auto-reflection retrieval enhancement method based on large model

By employing a self-reflective retrieval enhancement method based on a large model, and utilizing reflective decision-making and reference localization models, the problems of misleading illusions and information opacity in question-answering scenarios of large language models are solved. This enables fine-grained retrieval and generation at the sentence level, improving the accuracy and logical reasoning ability of question answering.

CN120929558AActive Publication Date: 2025-11-11ZHONGSHU (XIAMEN) INFORMATION TECH CO LTD

Patent Information

Application Number
CN202511464295.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-14
Publication Date
2025-11-11
Estimated Expiration
2045-10-14

AI Technical Summary

Technical Problem

Large language models suffer from problems such as misleading illusions, use of outdated information, and opaque reasoning processes in question-answering scenarios. Traditional retrieval techniques, with their semantic matching methods, result in overly coarse retrieval granularity, incomplete recall, and inaccurate semantic matching, all of which affect the quality of the generated answers.

Method used

We adopt a highly efficient self-reflective retrieval enhancement method based on a large model. Through iterative judgment using a reflective decision model, we dynamically retrieve or generate answers and use a reference location model to filter recalled content. This enables sentence-level autonomous reflection and decision-making, improving the flexibility and accuracy of the retrieval system.

Benefits of technology

It achieves fine-grained autonomous reflection and decision-making at the sentence level, reduces the impact of noise information, improves the performance of large models in question-answering scenarios, enhances logical reasoning ability and the reliability of answers, and provides a transparent reasoning process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120929558A_ABST
    Figure CN120929558A_ABST
Patent Text Reader

Abstract

The invention discloses an efficient auto-reflection retrieval enhancement method based on a large model, which comprises the following steps: S1, generating a decision: inputting user input, historical questions and answers and the context of the question and answer in this round into an reflection decision model, and outputting an optimal decision by the reflection decision model according to the input in sequence; s2, judging the action: if the decision action is to continue retrieval and generate query, executing the step S3; if the decision action is to stop retrieval and generate answers, directly executing the step S5; s3, retrieval recall: when the action content output by the reflection decision model is one or more sub-retrieval queries, inputting the sub-retrieval queries into a retrieval system, and performing content recall in an external knowledge base to obtain recalled content; s4, recall filtering: filtering recall content by using a reference positioning model, updating to obtain a question and answer context of the round, and returning to and executing the step S1; and S5, outputting an answer: when the action content output by the reflection decision model is the answer, outputting the answer, and using the answer to answer the question of the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer processing technology, specifically relating to an efficient self-reflective retrieval enhancement method based on a large model. Background Technology

[0002] The performance of large language models in question-answering scenarios is often limited by the data used during pre-training and fine-tuning, frequently resulting in misleading "illusions," the use of outdated information, untraceable information sources, and opaque reasoning processes. Therefore, Retrieval-Augmented Generation (RAG) has emerged. Before generating text, it retrieves task-related knowledge from an external knowledge base and uses it as part of the input, thereby improving the accuracy and relevance of the generated text. In question-answering scenarios, RAG typically first retrieves relevant content from a pre-built knowledge base based on the pre-processed user query. Then, the content retrieved by the retrieval system is processed to construct context, which is then input into the model along with the original query, allowing the model to generate an answer using the contextual information.

[0003] In the process of using retrieval augmentation generation, traditional retrieval techniques are based on semantic vector similarity for matching and searching, and then the top k most similar segments are selected through reordering. This approach often faces significant limitations due to the limitations of the matching algorithm or retrieval system, including problems such as overly coarse retrieval granularity (e.g., only accurate to the segment level, with each segment containing about 500 words), incomplete recall, and inaccurate semantic matching. This results in poor retrieval quality, a lot of noise interference, and thus affects the performance of large models, ultimately causing logical confusion in the generated answers, and even "illusions" and factual errors. Summary of the Invention

[0004] To address the aforementioned issues, this invention proposes a highly efficient self-reflective retrieval enhancement method based on a large model. This method iteratively and in two steps utilizes the large model, dynamically performing actions to continue retrieval or generate answers based on the judgment made by the reflective decision model regarding the current situation. When the reflective decision model determines that the current context information is insufficient and requires further retrieval of relevant information, it continues to use the sub-retrieval query provided by the reflective decision model to perform retrieval and recall in the knowledge base. Simultaneously, it utilizes a reference positioning model to filter and clean the recalled content, adding the filtered, effective, fine-grained references to the context of the reflective decision model, prompting the reflective decision model to make a new round of judgments. When the reflective decision model determines that the current context information is sufficient to answer the user's question and generate a corresponding answer, it returns the final optimal answer provided by the reflective decision model. Therefore, this method can achieve a sentence-level fine-grained autonomous reflection and decision-making retrieval or generation scheme, while simultaneously incorporating effective content references in the recall results. This addresses the problem that fixed retrieval strategies in retrieval systems cannot flexibly adapt to different situations and can reduce the impact of noise information in the recalled content on the large model's response, thereby improving the overall performance of the large model in question-answering scenarios.

[0005] To achieve the above objectives, the present invention adopts the following technical solution: An efficient self-reflective retrieval enhancement method based on a large model includes the following steps: S1. Decision Generation: Input user input, historical questions and answers, and the context of the current question and answer round into the reflective decision model. The reflective decision model outputs the optimal decision in sequence according to the input. The decision includes the decision action and the corresponding action content. S2. Determine the action: Based on the decision action output by the reflective decision model, determine the next action; if the decision action is to continue searching and generate a query, execute step S3; if the decision action is to stop searching and generate an answer, directly execute step S5. S3. Retrieval Recall: When the action content output by the reflective decision model in step S1 is one or more sub-retrieval queries, the sub-retrieval queries are input into the retrieval system, and content recall is performed in the external knowledge base to obtain the recalled content. S4. Recall Filtering: Filter the recalled content using the reference positioning model, update the question-and-answer context for this round, and then return to execute step S1. The specific process of step S4 is as follows: S41. Perform fine-grained segmentation of the recalled content and add location markers between the segmented fine-grained content; S42. Input the recalled content with fine-grained location identifier and the sub-retrieval query corresponding to the recalled content into the reference positioning model. Output the location index of the fine-grained content that is truly effective for the sub-retrieval query through the reference positioning model, and extract the effective fine-grained content based on the location index. S43. After constructing corresponding forms by combining effective fine-grained content with sub-retrieval queries, update the question-answering context for this round. S44. Input the updated question-and-answer context, user input, and historical questions and answers back into the reflective decision-making model, and execute step S1. S5. Output the answer: When the action content output by the reflective decision model in step S1 is the answer, output the answer and use the answer to answer the user's question.

[0006] Preferably, in step S41: if the granularity of the recalled content obtained from the external knowledge base is at the article level, the recalled content is further subdivided from the article level to the paragraph level; if the granularity of the recalled content obtained from the external knowledge base is at the fragment level, the recalled content is further subdivided from the fragment level to the sentence level.

[0007] Preferably, in step S1, the current user input, the user's historical questions and answers with the reflective decision-making model, and the context of this round of questions and answers are linked together using prompts and instructions to form a sequence for inputting into the reflective decision-making model; wherein, the user's historical questions and answers with the reflective decision-making model and the current user input are used to help the reflective decision-making model identify the user's current true intention and utilize information from historical questions and answers that may be useful for the current question and answer; the context of this round of questions and answers input into the reflective decision-making model is dynamically updated in several rounds of judgment actions, retrieval recall, and recall filtering.

[0008] Preferably, in step S1: the question-and-answer context for this round is empty before initial retrieval and recall; after at least one round of retrieval and recall, the sub-retrieval queries generated in each round and the fine-grained references to the corresponding recalled content are continuously accumulated, and the sub-retrieval queries of each round are added to the question-and-answer context for this round, calculated as: ∑ t ←∑ t-1 ∪( q t-1 , c t-1 ), where ∑ t Represents the context of round t in the reflective decision-making model; ← indicates assignment; ∑ t-1 This represents the context of round t-1 in the reflective decision-making model; (q) t-1 , c t-1 ) represents the query q generated in the (t-1)th round of the reflective decision-making model. t-1 Compared to fine-grained citations retrieved and cleaned based on their retrieval, c t-1 Combinatorial representation with corresponding relationships; q t-1 c represents the query generated in the (t-1)th round of the model; t-1 This represents a fine-grained reference retrieved and cleaned based on the query generated in the (t-1)th round of the model.

[0009] Preferably, in step S1: when the reflective decision model determines that the current question-and-answer context is insufficient to answer the user's question and additional information is needed, the decision action output by the reflective decision model is to continue searching and generate a query, and the output action content is one or more sub-search queries; when the reflective decision model determines that the current question-and-answer context is sufficient to answer the user's question and satisfy the user's intent, the decision action output by the reflective decision model is to stop searching and generate an answer, and the output action content is the answer.

[0010] Preferably, the reflective decision-making mechanism in step S1, which outputs the optimal decision sequentially based on the input, is as follows: S11. Thinking: The thinking instruction prompts the reflective decision-making model to perform preliminary decision-making and provide a thought process chain, yielding the thinking result. The calculation formula is: y draft = M(p think ||x), y draft y CoT ‖y desicion 0 , where y draft The output represents the thinking steps; M() represents the reflective decision-making model; p think Indicates a thinking instruction; || indicates a connection; x represents the input to the reflective decision-making model; y CoT Indicates the output of the thought chain content; y desicion 0 This indicates the output of preliminary decision-making information; The process involves reflecting on user input, the user's historical question-and-answer sessions with the reflective decision-making model, and the context of the current question-and-answer session. This includes analyzing what relevant information is needed to fully answer the user's question, whether the current question-and-answer context or historical questions and answers contain all the necessary information, how to retrieve missing information, and how to integrate information to provide an answer to the user. The reflective decision-making model then provides a thought process chain to help identify errors and make preliminary decisions in the next reflective step, resulting in decision actions and corresponding action content. S12. Reflection: The reflection instruction allows the reflection decision-making model to observe and reflect on the initial decision-making process and provide feedback suggestions, resulting in the reflection result. The calculation formula is: y feedback = M(p reflect ||x||y draft ), where y feedback M represents the output of the reflection step; M() represents the reflection decision model; p reflect Indicates a reflective instruction; || indicates a connection; x represents the input to the reflective decision-making model; y draft This represents the output of the thought process; Based on the thought process described in the previous step, reflect on the decision-making process and provide feedback and suggestions. Reflections on optimizing sub-queries include: whether special attention needs to be paid to certain requirements when retrieving specific information; whether there are additional points that need to be retrieved besides the given sub-queries; and whether synonyms can be searched when collecting information. Reflections on optimizing answers include: whether the obtained answers contain logical errors; whether they comprehensively answer the user's question; and whether the required details are sufficient. Reflections on optimizing decisions include: whether further sub-queries are redundant; whether the given answers are incomplete; and whether relevant information is lacking in the context of this round of question-and-answer interaction and requires further retrieval. S13. Decision Making: The reflective decision-making model generates a final decision based on the results of thinking and reflection, or by making corrections, through decision-making instructions. The result of the decision is calculated using the formula: y desicion = M(p refine ||x||y draft ‖y feedback ), where y desicion M represents the final decision; M() represents the reflective decision-making model; p refine Indicates a decision instruction; || represents a connection; x represents the input to the reflective decision-making model; y draft Indicates the output of the thinking process; y feedback This represents the output of the reflection steps; Based on the feedback and suggestions provided in the reflection steps, the preliminary decisions made in the thinking steps are optimized accordingly, so that the final query is more conducive to retrieving and collecting comprehensive and effective information, or the final answer is more accurate, reliable and in line with the user's intent, or the decision is more conducive to the generation of the final answer, and an optimized final decision is given. S14. Output of the Reflective Decision-Making Model: The reflective decision-making model explicitly and progressively outputs the entire process of thinking, reflecting, and making decisions, using temporal language output for reinforcement learning during the progressive process: y = M(p‖x), y:y draft ‖y feedback ‖y desicion Where y represents the output of the reflective decision-making model; M() represents the reflective decision-making model; p represents the complete prompt word of the reflective decision-making model; || represents a connection; x represents the input of the reflective decision-making model; y draft Indicates the output of the thinking process; y feedback Indicates the output of the reflection step; y desicion Indicates the final decision; The output of the thinking step includes the preliminary decision made by the reflective decision-making model and the thought process involved in making that preliminary decision. The output of the reflection step includes evaluation and feedback suggestions on the preliminary decision made by the thinking step. The decision-making step will correct and optimize the preliminary decision based on the evaluation and feedback provided by the reflection step, outputting only the final decision from the reflective decision-making model. The complete prompts for the reflective decision-making model, in addition to the instructions for thinking, reflecting, and correcting, also include complete target instructions for processes, constraints, few-sample examples, and specific details. The formula for calculating the complete prompts for the reflective decision-making model is: p:p goal ||p think ||p reflect ||p refine Where p represents the complete cue word of the reflective decision-making model; || represents a connection; p goal Indicates a complete target instruction; p think Indicates a thought instruction; p reflect Indicates a reflection instruction; p refine Indicates decision-making instructions; The final complete goal: y draft ‖y feedback ‖y desicion = M(p goal ||p think ||p reflect ||p refine ||x), where y draft Indicates the output of the thinking process; y feedback Indicates the output of the reflection step; y desicion Represents the final decision; || represents the connection; M() represents the reflective decision-making model; p goal Indicates a complete target instruction; p think Indicates a thought instruction; p reflect Indicates a reflection instruction; p refine 'x' represents the decision instruction; 'x' represents the input to the reflective decision-making model. After obtaining the output of the reflective decision-making model, only the final decision y is considered. desicion To react and carry out the actions of the final decision.

[0011] By adopting the above technical solution, the present invention has the following beneficial effects: 1. This invention uses a large model iteratively and in two steps. Based on the judgment made by the reflective decision-making model on the current situation, it dynamically performs actions to continue searching or generate answers. When the reflective decision-making model determines that the current context information is insufficient and that relevant information needs to be searched, it continues to use the sub-search query given by the reflective decision-making model to search and recall in the knowledge base. At the same time, it uses a reference positioning model to filter and clean the recalled content, adding the filtered effective fine-grained references to the context of the reflective decision-making model, and instructing the reflective decision-making model to make a new round of judgments. When the reflective decision-making model determines that the current context information is sufficient to answer the user's question and generate the corresponding answer, it returns the final optimal answer given by the reflective decision-making model. Therefore, this method can realize a RAG scheme that enables sentence-level fine-grained autonomous reflection and decision-making for retrieval or generation, while simultaneously incorporating effective content references in the recall results. This solves the problem that the fixed retrieval strategy of the retrieval system cannot flexibly adapt to different situations, and can reduce the impact of noise information in the recalled content on the large model's response, thereby improving the overall performance of the large model in question-answering scenarios.

[0012] 2. This invention utilizes a reflective decision-making model to autonomously analyze the user's true intent and iteratively update the context. This allows the model to determine information retrieval needs at different stages and under different conditions, flexibly customize corresponding search queries, and make dynamic decisions. This better adapts to both simple and complex user intents, while also eliminating the burden of developing complex search strategies. Furthermore, the context generated by the model itself, combining historical queries with the retrieved content, provides the model with its past behavior and corresponding external feedback. This allows the model to extract relevant experience from failed queries, serving as a self-reminder in future decision-making and planning, avoiding lingering on failed decisions and improving overall adaptability.

[0013] 3. This invention utilizes a reflective decision-making model to analyze and determine the information truly needed to answer user questions. During the iterative recall process, it dynamically customizes one or more sub-queries—more precise and conducive to retrieving strongly relevant target content—based on historical experience. This makes the recalled content more comprehensive and accurately matches the query, improving the accuracy and completeness of the recalled information. When using the reflective decision-making model to make decisions about retrieval queries or generate answers, the model progressively thinks, reflects, and self-corrects. While using external feedback, it provides detailed internal feedback, forcing the development and refinement of logical thinking, thus fully utilizing its inherent self-correcting ability. This significantly reduces errors in handling complex tasks, enhances its logical reasoning ability, and makes the final decision and answer more reliable and credible. Furthermore, explicitly outputting the model's thinking and reflection process in natural language helps observers track the model's behavior and gain a deeper understanding of its underlying reasoning logic.

[0014] 4. This invention utilizes a reference localization model to autonomously identify truly relevant content from the retrieved content and filter out useless noise. The context constructed solely from valid references offers a finer-grained advantage, resulting in more accurate and effective information. By having the reference localization model extract valid references from the complex retrieved content, it isolates the reflective decision-making model from a large amount of noise, reducing interference from noise or contradictory information, avoiding illusions, and alleviating the burden on the reflective decision-making model to sift through vast contexts while handling complex tasks. In RAG application question-answering systems, when citing knowledge content to answer questions, it is often necessary to indicate the source to the user. Compared to coarse-grained citations at the document or chapter level, fine-grained citations at the paragraph or sentence level offer higher transparency, making the model's answer more intuitive, the answer more credible, and improving the user experience. Attached Figure Description

[0015] Figure 1 This is a flowchart of the present invention; Figure 2 This is a flowchart of the present invention; Figure 3 This is a flowchart illustrating the thinking, reflection, and decision-making mechanism of the present invention. Figure 4 This is a flowchart illustrating the fine-grained segmentation and addition of position markers according to the present invention. Figure 5 This is a flowchart of the recall filtering process of the present invention. Detailed Implementation

[0016] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0017] like Figures 1 to 5 As shown, an efficient self-reflective retrieval enhancement method based on a large model includes the following steps: S1. Decision Generation: Input user input, historical questions and answers, and the context of the current question and answer round into the reflective decision model. The reflective decision model outputs the optimal decision in sequence according to the input. The decision includes the decision action and the corresponding action content. In step S1, the current user input, the user's historical questions and answers with the reflective decision-making model, and the context of this round of questions and answers are concatenated and arranged using prompts and instructions to form a sequence for inputting into the reflective decision-making model. The user's historical questions and answers with the reflective decision-making model and the current user input are used to help the reflective decision-making model identify the user's true intention and utilize information from historical questions and answers that may be useful for the current question and answer. The context of this round of questions and answers input into the reflective decision-making model is dynamically updated in several rounds of judgment actions, retrieval recall, and recall filtering. In step S1: the question-answering context for this round is empty before initial retrieval and recall; after at least one round of retrieval and recall, the sub-retrieval queries generated in each round and the fine-grained references to the corresponding recalled content are continuously accumulated, and the sub-retrieval queries of each round are added to the question-answering context for this round. The calculation formula is: ∑ t ← ∑ t-1 ∪( q t-1 , c t-1 ), where ∑ t Represents the context of round t in the reflective decision-making model; ← indicates assignment; ∑ t-1 This represents the context of round t-1 in the reflective decision-making model; (q) t-1 , c t-1 ) represents the query q generated in the (t-1)th round of the reflective decision-making model. t-1 Compared to fine-grained citations retrieved and cleaned based on their retrieval, c t-1 Combinatorial representation with corresponding relationships; q t-1 c represents the query generated in the (t-1)th round of the model; t-1 This represents a fine-grained reference that has been retrieved and cleaned based on the query generated in the (t-1)th round of the model. In step S1: When the reflective decision model determines that the current question-and-answer context is insufficient to answer the user's question and additional information is needed, the reflective decision model outputs the decision action of continuing the search and generating a query, and the output action content is one or more sub-search queries; when the reflective decision model determines that the current question-and-answer context is sufficient to answer the user's question and satisfy the user's intent, the reflective decision model outputs the decision action of stopping the search and generating an answer, and the output action content is the answer. The reflective decision-making model described in step S1 outputs the optimal decision sequentially based on the input, and the reflective decision-making mechanism is as follows: S11. Thinking: The thinking instruction prompts the reflective decision-making model to perform preliminary decision-making and provide a thought process chain, yielding the thinking result. The calculation formula is: y draft = M(p think ||x), y draft y CoT ‖y desicion 0 , where y draft The output represents the thinking steps; M() represents the reflective decision-making model; p think Indicates a thinking instruction; || indicates a connection; x represents the input to the reflective decision-making model; y CoT Indicates the output of the thought chain content; y desicion 0 This indicates the output of preliminary decision-making information; The process involves reflecting on user input, the user's historical question-and-answer sessions with the reflective decision-making model, and the context of the current question-and-answer session. This includes analyzing what relevant information is needed to fully answer the user's question, whether the current question-and-answer context or historical questions and answers contain all the necessary information, how to retrieve missing information, and how to integrate information to provide an answer to the user. The reflective decision-making model then provides a thought process chain to help identify errors and make preliminary decisions in the next reflective step, resulting in decision actions and corresponding action content. S12. Reflection: The reflection instruction allows the reflection decision-making model to observe and reflect on the initial decision-making process and provide feedback suggestions, resulting in the reflection result. The calculation formula is: y feedback = M(p reflect ||x||y draft ), where y feedback M represents the output of the reflection step; M() represents the reflection decision model; p reflect Indicates a reflective instruction; || indicates a connection; x represents the input to the reflective decision-making model; y draft This represents the output of the thought process; Based on the thought process described in the previous step, reflect on the decision-making process and provide feedback and suggestions. Reflections on optimizing sub-queries include: whether special attention needs to be paid to certain requirements when retrieving specific information; whether there are additional points that need to be retrieved besides the given sub-queries; and whether synonyms can be searched when collecting information. Reflections on optimizing answers include: whether the obtained answers contain logical errors; whether they comprehensively answer the user's question; and whether the required details are sufficient. Reflections on optimizing decisions include: whether further sub-queries are redundant; whether the given answers are incomplete; and whether relevant information is lacking in the context of this round of question-and-answer interaction and requires further retrieval. S13. Decision Making: The reflective decision-making model generates a final decision based on the results of thinking and reflection, or by making corrections, through decision-making instructions. The result of the decision is calculated using the formula: y desicion = M(p refine ||x||y draft ‖y feedback ), where y desicion M represents the final decision; M() represents the reflective decision-making model; p refine Indicates a decision instruction; || represents a connection; x represents the input to the reflective decision-making model; y draft Indicates the output of the thinking process; y feedback This represents the output of the reflection steps; Based on the feedback and suggestions provided in the reflection steps, the preliminary decisions made in the thinking steps are optimized accordingly, so that the final query is more conducive to retrieving and collecting comprehensive and effective information, or the final answer is more accurate, reliable and in line with the user's intent, or the decision is more conducive to the generation of the final answer, and an optimized final decision is given. S14. Output of the Reflective Decision-Making Model: The reflective decision-making model explicitly and progressively outputs the entire process of thinking, reflecting, and making decisions, using temporal language output for reinforcement learning during the progressive process: y = M(p‖x), y:y draft ‖y feedback ‖y desicion Where y represents the output of the reflective decision-making model; M() represents the reflective decision-making model; p represents the complete prompt word of the reflective decision-making model; || represents a connection; x represents the input of the reflective decision-making model; y draft Indicates the output of the thinking process; y feedback Indicates the output of the reflection step; y desicion Indicates the final decision; The output of the thinking step includes the preliminary decision made by the reflective decision-making model and the thought process involved in making that preliminary decision. The output of the reflection step includes evaluation and feedback suggestions on the preliminary decision made by the thinking step. The decision-making step will correct and optimize the preliminary decision based on the evaluation and feedback provided by the reflection step, outputting only the final decision from the reflective decision-making model. The complete prompts for the reflective decision-making model, in addition to the instructions for thinking, reflecting, and correcting, also include complete target instructions for processes, constraints, few-sample examples, and specific details. The formula for calculating the complete prompts for the reflective decision-making model is: p:p goal ||p think ||p reflect ||p refine Where p represents the complete cue word of the reflective decision-making model; || represents a connection; p goal Indicates a complete target instruction; p think Indicates a thought instruction; p reflect Indicates a reflection instruction; p refine Indicates decision-making instructions; The final complete goal: y draft ‖y feedback ‖y desicion = M(p goal ||p think ||p reflect ||p refine ||x), where y draft Indicates the output of the thinking process; y feedback Indicates the output of the reflection step; y desicion Represents the final decision; || represents the connection; M() represents the reflective decision-making model; p goal Indicates a complete target instruction; p thinkIndicates a thought instruction; p reflect Indicates a reflection instruction; p refine 'x' represents the decision instruction; 'x' represents the input to the reflective decision-making model. After obtaining the output of the reflective decision-making model, only the final decision y is considered. desicion To react and carry out the actions of the final decision; S2. Determine the action: Based on the decision action output by the reflective decision model, determine the next action; if the decision action is to continue searching and generate a query, execute step S3; if the decision action is to stop searching and generate an answer, directly execute step S5. S3. Retrieval Recall: When the action content output by the reflective decision model in step S1 is one or more sub-retrieval queries, the sub-retrieval queries are input into the retrieval system, and content recall is performed in the external knowledge base to obtain the recalled content. S4. Recall Filtering: Filter the recalled content using the reference positioning model, update the question-and-answer context for this round, and then return to execute step S1. The specific process of step S4 is as follows: S41. Perform fine-grained segmentation of the recalled content and add location markers between the segmented fine-grained content; In step S41: if the granularity of the recalled content obtained from the external knowledge base is at the article level, the recalled content is further segmented from the article level to the paragraph level; if the granularity of the recalled content obtained from the external knowledge base is at the fragment level, the recalled content is further segmented from the fragment level to the sentence level. S42. Input the recalled content with fine-grained location identifier and the sub-retrieval query corresponding to the recalled content into the reference positioning model. Output the location index of the fine-grained content that is truly effective for the sub-retrieval query through the reference positioning model, and extract the effective fine-grained content based on the location index. S43. After constructing corresponding forms by combining effective fine-grained content with sub-retrieval queries, update the question-answering context for this round. S44. Input the updated question-and-answer context, user input, and historical questions and answers back into the reflective decision-making model, and execute step S1. S5. Output the answer: When the action content output by the reflective decision model in step S1 is the answer, output the answer and use the answer to answer the user's question.

[0018] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A highly efficient self-reflective retrieval enhancement method based on a large model, characterized in that, Includes the following steps: S1. Decision Generation: Input user input, historical questions and answers, and the context of the current question and answer round into the reflective decision model. The reflective decision model outputs the optimal decision in sequence according to the input. The decision includes the decision action and the corresponding action content. S2. Determine the action: Based on the decision action output by the reflective decision model, determine the next action; if the decision action is to continue searching and generate a query, execute step S3; if the decision action is to stop searching and generate an answer, directly execute step S5. S3. Retrieval Recall: When the action content output by the reflective decision model in step S1 is one or more sub-retrieval queries, the sub-retrieval queries are input into the retrieval system, and content recall is performed in the external knowledge base to obtain the recalled content. S4. Recall Filtering: Filter the recalled content using the reference positioning model, update the question-and-answer context for this round, and then return to execute step S1. The specific process of step S4 is as follows: S41. Perform fine-grained segmentation of the recalled content and add location markers between the segmented fine-grained content; S42. Input the recalled content with fine-grained location identifier and the sub-retrieval query corresponding to the recalled content into the reference positioning model. Output the location index of the fine-grained content that is truly effective for the sub-retrieval query through the reference positioning model, and extract the effective fine-grained content based on the location index. S43. After constructing corresponding forms by combining effective fine-grained content with sub-retrieval queries, update the question-answering context for this round. S44. Input the updated question-and-answer context, user input, and historical questions and answers back into the reflective decision-making model, and execute step S1. S5. Output the answer: When the action content output by the reflective decision model in step S1 is the answer, output the answer and use the answer to answer the user's question.

2. The efficient self-reflective retrieval enhancement method based on a large model as described in claim 1, characterized in that, In step S41: if the granularity of the recalled content obtained from the external knowledge base is at the article level, the recalled content is further segmented from the article level to the paragraph level; if the granularity of the recalled content obtained from the external knowledge base is at the fragment level, the recalled content is further segmented from the fragment level to the sentence level.

3. The efficient self-reflective retrieval enhancement method based on a large model as described in claim 1, characterized in that: In step S1, the current user input, the user's historical questions and answers with the reflective decision model, and the context of the current round of questions and answers are concatenated and arranged into a sequence for inputting into the reflective decision model through prompts and instructions. The user's historical questions and answers with the reflective decision model and the current user input are used to help the reflective decision model identify the user's true intention and utilize information from the historical questions and answers that may be useful for the current question and answer. The context of the current round of questions and answers input into the reflective decision model is dynamically updated in several rounds of judgment actions, retrieval recall, and recall filtering.

4. The efficient self-reflective retrieval enhancement method based on a large model as described in claim 1, characterized in that, In step S1: the question-answering context for this round is empty before initial retrieval and recall; after at least one round of retrieval and recall, the sub-retrieval queries generated in each round and the fine-grained references to the corresponding recalled content are continuously accumulated, and the sub-retrieval queries of each round are added to the question-answering context for this round. The calculation formula is: ∑ t ← ∑ t-1 ∪( q t-1 , c t-1 ), where ∑ t Represents the context of round t in the reflective decision-making model; ← indicates assignment; ∑ t-1 This represents the context of round t-1 in the reflective decision-making model; (q) t-1 , c t-1 ) represents the query q generated in the (t-1)th round of the reflective decision-making model. t-1 Compared to fine-grained citations retrieved and cleaned based on their retrieval, c t-1 Combinatorial representation with corresponding relationships; q t-1 c represents the query generated in the (t-1)th round of the model; t-1 This represents a fine-grained reference retrieved and cleaned based on the query generated in the (t-1)th round of the model.

5. The efficient self-reflective retrieval enhancement method based on a large model as described in claim 1, characterized in that, In step S1: When the reflective decision model determines that the current question-and-answer context is insufficient to answer the user's question and additional information is needed, the reflective decision model outputs a decision action of continuing the search and generating a query, and the output action content is one or more sub-search queries; when the reflective decision model determines that the current question-and-answer context is sufficient to answer the user's question and satisfy the user's intent, the reflective decision model outputs a decision action of stopping the search and generating an answer, and the output action content is the answer.

6. The efficient self-reflective retrieval enhancement method based on a large model as described in claim 1, characterized in that, The reflective decision-making model described in step S1 outputs the optimal decision sequentially based on the input, and the reflective decision-making mechanism is as follows: S11. Thinking: The thinking instruction prompts the reflective decision-making model to perform preliminary decision-making and provide a thought process chain, yielding the thinking result. The calculation formula is: y draft = M(p think ||x), y draft y CoT ‖y desicion 0 , where y draft The output represents the thinking steps; M() represents the reflective decision-making model; p think Indicates a thinking instruction; || indicates a connection; x represents the input to the reflective decision-making model; y CoT Indicates the output of the thought chain content; y desicion 0 This indicates the output of preliminary decision-making information; The process involves reflecting on user input, the user's historical question-and-answer sessions with the reflective decision-making model, and the context of the current question-and-answer session. This includes analyzing what relevant information is needed to fully answer the user's question, whether the current question-and-answer context or historical questions and answers contain all the necessary information, how to retrieve missing information, and how to integrate information to provide an answer to the user. The reflective decision-making model then provides a thought process chain to help identify errors and make preliminary decisions in the next reflective step, resulting in decision actions and corresponding action content. S12. Reflection: The reflection instruction allows the reflection decision-making model to observe and reflect on the initial decision-making process and provide feedback suggestions, resulting in the reflection result. The calculation formula is: y feedback = M(p reflect ||x||y draft ), where y feedback M represents the output of the reflection step; M() represents the reflection decision model; p reflect Indicates a reflective instruction; || indicates a connection; x represents the input to the reflective decision-making model; y draft This represents the output of the thought process; Based on the thought process described in the previous step, reflect on the decision-making process and provide feedback and suggestions. Reflections on optimizing sub-queries include: whether special attention needs to be paid to certain requirements when retrieving specific information; whether there are additional points that need to be retrieved besides the given sub-queries; and whether synonyms can be searched when collecting information. Reflections on optimizing answers include: whether the obtained answers contain logical errors; whether they comprehensively answer the user's question; and whether the required details are sufficient. Reflections on optimizing decisions include: whether further sub-queries are redundant; whether the given answers are incomplete; and whether relevant information is lacking in the context of this round of question-and-answer interaction and requires further retrieval. S13. Decision Making: The reflective decision-making model generates a final decision based on the results of thinking and reflection, or by making corrections, through decision-making instructions. The result of the decision is calculated using the formula: y desicion = M(p refine ||x||y draft ‖y feedback ), where y desicion M represents the final decision; M() represents the reflective decision-making model; p refine Indicates a decision instruction; || represents a connection; x represents the input to the reflective decision-making model; y draft Indicates the output of the thinking process; y feedback This represents the output of the reflection steps; Based on the feedback and suggestions provided in the reflection steps, the preliminary decisions made in the thinking steps are optimized accordingly, so that the final query is more conducive to retrieving and collecting comprehensive and effective information, or the final answer is more accurate, reliable and in line with the user's intent, or the decision is more conducive to the generation of the final answer, and an optimized final decision is given. S14. Output of the Reflective Decision-Making Model: The reflective decision-making model explicitly and progressively outputs the entire process of thinking, reflecting, and making decisions, using temporal language output for reinforcement learning during the progressive process: y = M(p‖x), y:y draft ‖y feedback ‖y desicion Where y represents the output of the reflective decision-making model; M() represents the reflective decision-making model; p represents the complete prompt word of the reflective decision-making model; || represents a connection; x represents the input of the reflective decision-making model; y draft Indicates the output of the thinking process; y feedback Indicates the output of the reflection step; y desicion Indicates the final decision; The output of the thinking step includes the preliminary decision made by the reflective decision-making model and the thought process involved in making that preliminary decision; the output of the reflection step includes evaluation and feedback suggestions on the preliminary decision made by the thinking step; the decision-making step will correct and optimize the preliminary decision based on the evaluation and feedback provided by the reflection step, and only output the final decision of the reflective decision-making model; the complete prompt words of the reflective decision-making model, in addition to the instructions for thinking, reflecting, and correcting, also include complete target instructions for process, constraints, few-sample examples, and special details. The formula for calculating the complete prompt words of the reflective decision-making model is: p:p goal ||p think ||p reflect ||p refine Where p represents the complete cue word of the reflective decision-making model; || represents a connection; p goal Indicates a complete target instruction; p think Indicates a thought instruction; p reflect Indicates a reflection instruction; p refine Indicates decision-making instructions; The final complete goal: y draft ‖y feedback ‖y desicion = M(p goal ||p think ||p reflect ||p refine ||x), where y draft Indicates the output of the thinking process; y feedback Indicates the output of the reflection step; y desicion Represents the final decision; || represents the connection; M() represents the reflective decision-making model; p goal Indicates a complete target instruction; p think Indicates a thought instruction; p reflect Indicates a reflection instruction; p refine 'x' represents the decision instruction; 'x' represents the input to the reflective decision-making model. After obtaining the output of the reflective decision-making model, only the final decision y is considered. desicion To react and carry out the actions of the final decision.

Citation Information

Patent Citations

  • Retrieval enhancement generation method and device, equipment, storage medium and program product

    CN119760069A

  • Reverse rollback type retrieval enhancement generation method and device, equipment and storage medium

    CN120123375A

  • Dynamic knowledge retrieval enhancement method based on large language model

    CN120407570A

  • Multi-modal retrieval enhancement generation method based on gradual group relative strategy optimization

    CN120561347A

  • Server and Method for Operating Major-Specific AI Tutor Based on Adaptive Data Retraining and Multi-Level Embedding

    KR102841252B1

Cited By

  • Information source perception reinforcement learning credit distribution modeling method of search agent

    CN122311476A