Self-adaptive information retrieval and optimization system and method based on retrieval enhancement generation
Through adaptive information retrieval and optimization methods, the retrieval strategy is dynamically adjusted to solve the problems of retrieval-enhanced generation methods in long text generation and multi-hop reasoning tasks, and the accuracy and coherence of the generated results are improved, which is suitable for scenarios with complex problems and multiple expressions.
Patent Information
- Application Number
- CN202510856993.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-09-19
AI Technical Summary
Existing retrieval-enhanced generation methods have difficulty dynamically adjusting retrieval strategies in long text generation and multi-hop reasoning tasks, resulting in factual errors, logical breaks, and information redundancy in the generated results.
An adaptive information retrieval and optimization method based on retrieval-enhanced generation is adopted. Through the forward-looking answer module, confidence detection module, knowledge graph expansion query module and context memory pool module, the retrieval strategy is dynamically adjusted, combined with confidence evaluation and entity expansion to optimize the accuracy and coherence of the generated content.
It improves the accuracy and logical coherence of generated results, reduces dependence on external index libraries, improves system response speed and efficiency, and is suitable for scenarios with complex problems and multiple expressions.
Smart Images

Figure CN120670560A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence and information retrieval technology, and in particular to an adaptive information retrieval and optimization system and method based on retrieval enhancement generation. Background Art
[0002] With the continuous advancement of artificial intelligence and natural language processing technologies, large language models have demonstrated remarkable capabilities in text understanding and generation tasks. These models acquire rich linguistic knowledge through training on massive corpora and have achieved promising results in tasks such as question-answering systems, summarization, dialogue understanding, and automatic writing. However, despite their powerful language modeling capabilities, large language models can still exhibit factual errors in their generated results without sufficient contextual support or external knowledge guidance, a phenomenon known as "hallucination." This phenomenon manifests as the model output being grammatically correct and semantically coherent, but inconsistent with real-world knowledge, severely limiting its practical application in scenarios requiring high reliability. To alleviate this issue, researchers have proposed various language generation methods that incorporate external knowledge sources, the most representative of which is retrieval-augmented generation. Retrieval-augmented generation incorporates relevant information from external knowledge bases into the generation process, enabling the model to reason and generate based on existing knowledge, thereby improving the accuracy and interpretability of answers. However, current mainstream retrieval-augmented generation frameworks have certain limitations. On the one hand, it relies on a one-time retrieval operation, making it difficult to cope with the ever-changing semantic requirements of long text generation or multi-hop reasoning tasks. On the other hand, because the retrieval is based only on the initial input, new questions or entities beyond the original retrieval scope may appear during the subsequent generation process, resulting in the model being unable to obtain sufficient supporting information, which in turn affects the generation quality. Furthermore, the fixed knowledge input method also limits the model's ability to adapt to dynamic changes in context, which can easily lead to factual bias, logical discontinuities, or information redundancy in the generated content. Therefore, it is urgent to propose an information retrieval method that can dynamically adjust the retrieval strategy based on semantic changes during the generation process, so as to achieve real-time correction and supplementation of the generated content, and improve the factual accuracy, logical coherence, and contextual consistency of the generated results. Summary of the Invention
[0003] The present invention is made to solve the above-mentioned problems. It proposes an adaptive information retrieval and optimization method based on retrieval enhancement generation, aiming to overcome the above-mentioned defects existing in the prior art and provide a more efficient, accurate and self-regulating intelligent question-answering and information retrieval solution.
[0004] The present invention aims to overcome the shortcomings of the existing technology by providing a more intelligent, flexible, and self-regulating information retrieval and generation method. This approach specifically addresses the difficulty of current retrieval-enhanced generation methods in dynamically adjusting retrieval strategies for long text generation and multi-hop reasoning tasks. By continuously iterating retrieval and dynamically updating contextual information during the generation process, combined with a confidence assessment mechanism and entity expansion strategy, the present invention improves the system's responsiveness and contextual understanding capabilities while ensuring the accuracy of generated content. This effectively mitigates the factual errors, or hallucinations, that can occur in large language models when they lack external knowledge support.
[0005] The present invention provides an adaptive information retrieval and optimization system based on retrieval enhancement generation, which has the following characteristics: a forward-looking answer module, which is used to receive the query statement and context information after the first query or iterative generation, and input them into a large language model to generate a forward-looking preliminary answer; a confidence detection module, which sets a confidence score threshold to perform keyword-level confidence evaluation on the content in the forward-looking preliminary answer, and corrects the low-confidence part in the answer according to the evaluation result, and outputs the complete answer content as a confidence answer; a knowledge graph expansion query module, which is used to perform a named entity recognition operation on the confidence answer, combine it with a pre-built small knowledge graph, and expand the identified key entities to obtain an extended query answer; a context memory pool module, which is used to store the context information input for the first time and the relevant information fragments obtained during each round of retrieval, and give priority to information retrieval from the memory pool in the subsequent retrieval process, and only access the external index library when there is no matching content in the memory pool.
[0006] The adaptive information retrieval and optimization system based on retrieval enhancement generation provided by the present invention may also have the following features: wherein, in the forward-looking answer module, the process of obtaining the forward-looking preliminary answer is as follows: for the first input query and its corresponding context information, the large model will automatically generate a forward-looking preliminary answer based on the input content to predict the possible answer direction and content. In the subsequent iterative generation process, the system first searches based on the existing information in the BM25Adpt retriever and the context memory pool. If there is relevant content in the memory pool, it jumps directly to the confidence detection module to continue subsequent processing; if no matching information is retrieved, the BM25 Adpt retriever searches for relevant documents based on the Wikipedia knowledge base, and inputs the current query and the search results into the large model, which generates a forward-looking preliminary answer.
[0007] The adaptive information retrieval and optimization system based on retrieval enhancement generation provided by the present invention may also have the following features: wherein the formula of BM25 Adpt is as follows:
[0008]
[0009] Where D represents the document; Q represents the query, which consists of n query words q i Composition; IDF(q i ) represents the query word q i The inverse document frequency of f(q i ,D) represents word q i The frequency of a word in document D; |D| represents the length of document D; avgdl represents the average length of all documents. The processing process is as follows: BM25Adpt dynamically adjusts parameters k1 and b to enable the algorithm to more flexibly adapt to different queries and document distributions, thereby improving the retrieval effect. Among them, k1 is used to control the sensitivity of word frequency to the score. The dynamic adjustment parameter k1 can be automatically calculated based on the statistical characteristics of the term. b controls the strength of document length normalization. The dynamic adjustment parameter b can adjust the normalization strength according to the document length distribution.
[0010] In the adaptive information retrieval and optimization system based on retrieval enhancement generation provided by the present invention, it can also have the following characteristics: wherein, in the confidence detection module, the process of obtaining the confidence answer is: for the forward-looking preliminary answer that is higher than the threshold set in the confidence detection module, it enters the credible answer optimization module, first combined with the iteration termination standard, for those that meet the standard, the whole round of query is ended and the final answer is output, and for those that do not meet the standard, it is input into the knowledge graph expansion query module; for the forward-looking preliminary answer that is lower than the threshold set in the confidence detection module, it enters the unreliable answer repair module, questions are asked about the key parts of the query that are lower than the threshold, relevant documents are retrieved to complete and modify the low-confidence parts in the forward-looking preliminary answer, and the repaired query is input into the knowledge graph expansion query module.
[0011] The adaptive information retrieval and optimization system based on retrieval enhancement generation provided by the present invention may also have the following features: wherein, the processing process of the iteration termination standard is: judging whether there are unfinished queries, whether the generated length exceeds the maximum limit, and whether the number of operation steps exceeds the set maximum number of iterations based on the confidence answer output by the confidence detection module.
[0012] The adaptive information retrieval and optimization system based on retrieval enhancement generation provided by the present invention may also have the following features: wherein, in the knowledge graph expansion query module, the process of obtaining the expanded query answer is: based on the confidence answer obtained by the confidence detection module, the pre-trained natural language processing model performs the named entity recognition operation, extracts the entities in the query, and combines the pre-built knowledge graph to expand the original query.
[0013] The adaptive information retrieval and optimization system based on retrieval enhancement generation provided by the present invention may also have the following features: wherein, the process of acquiring the knowledge graph is: based on the data set used, key entities in the query statement are extracted from it, and with the help of a large language model and Wikipedia resources, different expressions that have synonymous or near-synonymous relationships with these entities are identified, thereby constructing a small knowledge graph.
[0014] The adaptive information retrieval and optimization system based on retrieval enhancement generation provided by the present invention may also have the following features: wherein, the processing process of the context memory pool module is: the original input context information and the relevant documents obtained in each retrieval are stored in the context memory pool in sequence; in each subsequent retrieval process, the system first regards the memory pool as a local document library, and searches in the memory pool according to the current query content and in combination with the BM25 Adpt retriever; if no matching content is retrieved, a further retrieval operation is performed in the Wikipedia index.
[0015] The present invention provides an adaptive information retrieval and optimization method based on retrieval enhancement generation, which has the following characteristics and includes the following steps: Step 1, the original query statement and related context are input for the first time, and the forward-looking answer module inputs the two into the large language model to generate a forward-looking preliminary answer, and the related context is stored in the memory pool of the context memory pool module; Step 2, the forward-looking preliminary answer is input into the confidence detection module, and the module sets a threshold and performs keyword-level confidence scoring on the generated forward-looking preliminary answer to obtain a confidence-corrected answer; Step 3, the knowledge graph expansion query module first performs named entity recognition on the confidence-corrected answer based on the natural language processing model to extract the key entities therein. Subsequently, combined with the pre-built small entity knowledge graph diagram, each identified entity is expanded with synonymous or near-synonymous relationships, and the expanded query is the extended query answer; in step 4, the extended query answer is judged by the iteration termination criterion to see whether it meets the output condition. If it meets the condition, the final answer is output; otherwise, it is combined with the first query answer as a new round of query; in step 5, the new round of query is input into the context memory pool module. The retriever BM25 Adpt searches the memory pool for information that meets the new round of query answers based on the new round of query and the updated memory pool in step 1. For the newly generated query, the previous operations will be iteratively executed until the entire query meets the iteration termination criterion and the final answer is output.
[0016] The adaptive information retrieval and optimization method based on retrieval enhancement generation provided by the present invention may also have the following features: wherein, in step 2, the specific process for obtaining confidence-scored answers is as follows: Step 2-1: For answers with confidence levels above a threshold, determine whether they meet the iteration termination criteria. If so, output the final answer; otherwise, enter the knowledge graph expansion query module; Step 2-2: For parts with confidence levels below the threshold, re-question the part, use the retriever to obtain relevant documents, complete and correct the original answer, generate a confidence-corrected answer, and pass it to the next step. Step 5 specifically proceeds as follows: Step 5-1: Search the memory pool to see if there is information that meets the new round of query answers. If so, generate a new round of answers based on the large language model, directly input the answers into the confidence detection module, and execute according to the process of steps 2 to 4. Step 5-2: Otherwise, the new round of answers re-retrieve relevant information as context based on the Wikipedia index, store the context in the memory pool, and simultaneously input the new round of answers and the context information into the large language model, executing the process of steps 1 to 5.
[0017] Beneficial effects of the present invention:
[0018] (1) The present invention utilizes a large language model through a forward-looking answer module to generate a forward-looking preliminary answer based on the input query and its contextual information. This method not only considers the current query but also incorporates contextual information from historical interactions, thereby improving the coherence and accuracy of multiple rounds of dialogue. In addition, the context memory pool module stores the relevant information of each interaction and preferentially retrieves relevant information from the memory pool in subsequent queries, reducing reliance on external index libraries, significantly improving system response speed, and reducing repeated search operations.
[0019] (2) The present invention has designed a multi-level quality control system, including keyword-level confidence assessment and dynamic correction process. After generating the preliminary answer, the confidence detection module will evaluate the output content and determine whether the low-confidence part needs to be corrected or expanded based on the preset threshold. For the answer content below the confidence threshold, the system will automatically trigger further retrieval to supplement the missing information, and expand the synonyms and antonyms of key entities through the knowledge graph expansion query module to ensure the comprehensiveness and accuracy of the final answer. This dynamic adjustment mechanism effectively solves the problem of information omission in traditional question-answering systems.
[0020] (3) The present invention adopts an improved BM25 Adpt retriever, which can dynamically adjust parameters according to query complexity and context structure, optimize retrieval weights, and improve retrieval relevance. At the same time, the entity expansion strategy based on the knowledge graph supports the identification and expansion of core entities in the query, enhancing the retrieval coverage. By combining these efficient retrieval strategies with flexible knowledge representation methods, the present invention can significantly improve the overall efficiency and interpretability of the system while ensuring high accuracy. This method is particularly suitable for scenarios that need to deal with complex problems and multiple forms of expression. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 Schematic diagram of the overall structure of the adaptive information retrieval and optimization system based on retrieval enhancement generation in an embodiment of the present invention;
[0022] Figure 2 Schematic diagram of a credible answer optimization module in a confidence detection module in an embodiment of the present invention;
[0023] Figure 3 2 is a schematic diagram of an unreliable answer repair module in a confidence detection module according to an embodiment of the present invention;
[0024] Figure 4 It is a schematic diagram of the entity knowledge graph in an embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to make the technical means, creative features, objectives and effects of the present invention easy to understand, the following embodiments, in conjunction with the accompanying drawings, specifically illustrate the adaptive information retrieval and optimization system and method based on retrieval enhancement generation of the present invention.
[0026] This implementation provides an adaptive information retrieval and optimization method based on retrieval enhancement generation, including a system architecture of a forward-looking answer module, a confidence detection module, a knowledge graph expansion query module, and a context memory pool module.
[0027] Figure 1 It is a schematic diagram of the overall structure of the adaptive information retrieval and optimization system based on retrieval enhancement generation in an embodiment of the present invention.
[0028] like Figure 1 As shown, the adaptive information retrieval and optimization system based on search enhancement generation involved in this embodiment includes a forward-looking answer module, a confidence detection module, a knowledge graph expansion query module, and a context memory pool module. These modules are layered and implemented to achieve query optimization and data transmission between modules.
[0029] The forward-looking answer module is used to receive the original query statement and corresponding context information entered by the user during the first query. In subsequent queries, based on the new query content generated after the previous round of processing, the current query statement and context information are input into the large language model to generate a forward-looking preliminary answer (Look-Aheads Query).
[0030] The logic for obtaining the forward-looking preliminary answer is:
[0031] For the first query input and its corresponding context, the large model automatically generates a forward-looking preliminary answer based on the input content, predicting the possible answer direction and content. In subsequent iterative generation processes, the system first searches based on the existing information in the BM25 Adpt searcher and the context memory pool. If relevant content exists in the memory pool, it directly jumps to the confidence check module for further processing. If no matching information is retrieved, the BM25 Adpt searcher searches for relevant documents from the Wikipedia knowledge base and inputs the current query and search results into the large model, which then generates a forward-looking preliminary answer.
[0032] The processing logic of the BM25 Adpt retriever is:
[0033] BM25 Adpt dynamically adjusts parameters k1 and b, enabling the algorithm to more flexibly adapt to different queries and document distributions, thereby improving retrieval performance. k1 controls the sensitivity of term frequency to the score. Dynamic adjustment of k1 automatically calculates the parameter based on the statistical characteristics of the term (such as frequency of occurrence and document distribution). b controls the strength of document length normalization. Dynamic adjustment of b adjusts the normalization strength based on the document length distribution.
[0034] The BM 25Adpt formula is as follows:
[0035]
[0036] Where D represents the document; Q represents the query, which consists of n query words q i Composition; IDF(q i ) is the query word q i The inverse document frequency of f(q i ,D) is word q i The frequency (i.e., the number of occurrences) in document D; |D| represents the length of document D; and avgdl represents the average length of all documents.
[0037] The confidence detection module sets a confidence score threshold to perform keyword-level confidence assessment on the forward-looking preliminary answer content output by the forward-looking answer module. It is divided into a credible answer optimization module and an unreliable answer repair module. The low-confidence part of the answer is corrected according to the evaluation results, and the complete answer content after evaluation processing is output as the confidence answer (Confidence-Score Query).
[0038] The logic for obtaining confidence answers is:
[0039] For forward-looking preliminary answers that are higher than the threshold set in the confidence detection module, they enter the trusted answer optimization module. First, combined with the iterative termination criteria, the entire round of query is terminated for those that meet the criteria and the final answer is output. For those that do not meet the criteria, they are input into the knowledge graph expansion query module.
[0040] The processing logic of the iteration termination standard is:
[0041] The confidence response output by the confidence detection module is used to determine whether there are unfinished queries, whether the generated length exceeds the maximum limit, and whether the number of operation steps exceeds the set maximum number of iterations.
[0042] For forward-looking preliminary answers that are lower than the threshold set in the confidence detection module, they enter the unreliable answer repair module, ask questions about the key parts of the query that are lower than the threshold, retrieve relevant documents to complete and modify the low-confidence parts of the forward-looking preliminary answers, and input the repaired queries into the knowledge graph expansion query module.
[0043] The knowledge graph extended query module, based on the content output by the confidence detection module, uses a pre-trained natural language processing model to perform named entity recognition operations, combined with a pre-built small knowledge graph, to expand the identified key entities, obtain an optimized extended query statement, and thus obtain an extended query answer (Exp Query).
[0044] The logic for obtaining the extended query answer is:
[0045] Based on the confidence answer obtained by the confidence detection module, the pre-trained natural language processing model performs named entity recognition operations, extracts entities in the query, and combines them with the customized knowledge graph to expand the original query.
[0046] The processing logic of the knowledge graph is:
[0047] Based on the dataset used, key entities in the query statement are extracted, and with the help of a large language model and Wikipedia resources, different expressions that have synonymous or near-synonymous relationships with these entities are identified, thereby constructing a small knowledge graph.
[0048] The context memory pool module is used to store the context information input for the first time and the relevant information fragments obtained during each round of retrieval. In subsequent retrieval processes except the first one, information retrieval is performed from the memory pool first, and the external index library is accessed only when there is no matching content in the memory pool.
[0049] The processing logic of the context memory pool module is:
[0050] The context information of the original input and the relevant documents obtained in each retrieval are stored in the context memory pool in sequence. In each subsequent retrieval process, the system first regards the memory pool as a local document library, and searches the memory pool based on the current query content and combined with the BM25 Adpt retriever. If no matching content is retrieved, further search operations are performed in the Wikipedia index.
[0051] In summary, the process in this embodiment is: input the original query and related context into the forward-looking answer module, and generate a forward-looking answer through a large language model. The generated forward-looking answer is input into the confidence detection module. If the final result is obtained, the query round is ended; otherwise, a new answer is generated. The answer obtained in the confidence detection module is input into the knowledge graph expansion query module for entity extraction and expansion to obtain the expanded answer. The expanded answer obtained above is passed through the iterative termination standard to determine whether the answer is finished. If not, a new round of iterative operation is performed in combination with the context memory pool. A closed-loop adaptive retrieval process is formed between each module in the form of data flow.
[0052] This embodiment also provides an adaptive information retrieval and optimization method based on retrieval enhancement generation.
[0053] like Figure 1 As shown, the adaptive information retrieval and optimization method based on retrieval enhancement generation in this embodiment includes the following steps:
[0054] In step 1, the original query statement (Query) and related context (Context) are input for the first time. The forward-looking answer module inputs them into the large language model to generate a forward-looking preliminary answer (Look-Aheads Query). At the same time, the Context is stored in the memory pool of the context memory pool module.
[0055] In step 2, the forward-looking preliminary answer Look-Aheads Query generated in step 1 is input into the confidence detection module. The module sets a threshold and performs a keyword-level confidence score on the generated Look-Aheads Query.
[0056] Figure 2Schematic diagram of a credible answer optimization module in a confidence detection module in an embodiment of the present invention.
[0057] Step 2-1, further, such as Figure 2 As shown in the schematic diagram of the credible answer optimization module in the confidence detection module, for the answer content with a confidence higher than the threshold, it is judged whether it meets the iteration termination criteria. If it does, the final answer is output; otherwise, it enters the knowledge graph expansion query module.
[0058] Figure 3 2 is a schematic diagram of an unreliable answer repair module in a confidence detection module in an embodiment of the present invention.
[0059] Step 2-2, further, such as Figure 3 As shown in the diagram of the unreliable answer repair module in the confidence detection module, for the part with confidence below the threshold, the question is re-asked, the retriever is used to obtain relevant documents, the original answer is completed and corrected, and the Confidence-Score Query is formed and passed to the next process.
[0060] Figure 4 It is a schematic diagram of the entity knowledge graph in an embodiment of the present invention.
[0061] Step 3: The knowledge graph expansion query module first performs named entity recognition on the Confidence-Score Query based on the natural language processing model to extract the key entities. Figure 4 Schematic diagram of a pre-built small entity knowledge graph. Synonymous or near-synonymous relationships are expanded for each identified entity. The expanded query is ExpQuery.
[0062] Step 4: The Exp Query generated in step 3 is subjected to the iteration termination criteria to determine whether it meets the output conditions. If it meets the conditions, the final answer is output. Otherwise, the first query Query, i.e., Query + Exp Query, is combined as a new round of query Query 1.
[0063] In step 5, the query Query 1 generated in step 4 is input into the context memory pool module. The retriever BM25Adpt searches the memory pool based on Query 1 and the updated memory pool in step 1 to see whether there is information that meets Query 1.
[0064] Step 5-1: If it exists, generate the relevant answer Query 1* based on the large language model, input the answer directly into the confidence detection module, and execute according to the process in steps 2 to 4.
[0065] Otherwise, in step 5-2, Query 1 re-retrieves relevant information from the Wikipedia index as context, stores this context in the memory pool, and simultaneously feeds both Query 1 and this context into the large language model, executing the process from steps 1 to 5. This approach effectively reduces repeated search operations, improving overall response speed and resource utilization.
[0066] Step 5-3: The BM25 Adpt formula is as follows:
[0067]
[0068] Where D represents the document; Q represents the query, which consists of n query words q i Composition; IDF(q i ) is the query word q i The inverse document frequency of f(q i ,D) is word q i The frequency (i.e., the number of occurrences) in document D; |D| represents the length of document D; and avgdl represents the average length of all documents.
[0069] For newly generated queries such as Figure 1 Query 1-Query n will iteratively execute the previous operations until the entire query reaches the iteration termination criteria and outputs the final answer.
[0070] The adaptive information retrieval and optimization method based on retrieval enhancement generation provided in this embodiment has significant technical effects and advantages. This method realizes semantic-driven answer generation by introducing a forward-looking answer module and combining it with a large language model; uses a confidence detection module to evaluate the quality of the generated content and dynamically determines whether it needs to be revised or expanded; uses the knowledge graph to expand the query module to effectively solve the retrieval omission problem caused by entity ambiguity and expression diversity; and realizes efficient reuse of knowledge through the context memory pool module, reduces repeated retrieval, and improves the overall efficiency of the system. Compared with the traditional retrieval enhancement generation method, this method realizes the dynamic adjustment of the retrieval strategy during the generation process, enhances the model's adaptability to context changes, and significantly improves the factual accuracy, logical coherence and semantic relevance of the generated results. It is suitable for a variety of application scenarios such as complex question and answer, long text generation and multi-hop reasoning, and has good practical value and promotion prospects.
[0071] In summary, the method proposed in this embodiment is an adaptive information retrieval and optimization method that integrates forward-looking generation, dynamic retrieval, confidence assessment and context reuse. It breaks through the limitations of one-time retrieval and fixed knowledge input of traditional retrieval enhancement generation methods. On the basis of ensuring the interpretability and accuracy of the generated content, it improves the applicability and stability of the system in scenarios such as complex question and answer, long text generation and multi-round dialogues, and has good practical value and prospects for industrial promotion.
[0072] In summary, the adaptive information retrieval and optimization system and method based on search-enhanced generation proposed in this embodiment can achieve the following core functions and technical advantages:
[0073] 1. Dynamic and forward-looking answer generation: A large language model is used to combine the current query and contextual information to generate forward-looking preliminary answers. In subsequent iterations, historical information in the memory pool is combined to reuse content and improve generation consistency.
[0074] 2. Confidence assessment and automatic correction: The generated answer content is evaluated for confidence at the keyword level, and its credibility is determined based on the preset threshold. Low-confidence parts are automatically questioned and corrected to improve the factual accuracy of the output content.
[0075] 3. Entity expansion and multi-expression unification based on knowledge graphs: Use named entity recognition technology to extract key entities, and combine them with pre-built small knowledge graphs to expand entities into synonymous or near-synonymous relationships, solving the problem of missed detection caused by multiple expressions of the same entity and significantly improving retrieval coverage.
[0076] 4. Knowledge graph-based entity expansion and multi-expression unification: Use named entity recognition technology to extract key entities, and combine pre-built small knowledge graphs to expand entities to synonymous or near-synonymous relationships, solving the problem of missed detection caused by multiple expressions of the same entity, and significantly improving retrieval coverage.
[0077] 5. Multi-round iterative optimization and adaptive termination judgment: Providing iterative termination criteria to implement adaptive termination control, avoid invalid cycles, and improve overall operating efficiency.
[0078] The above embodiments are preferred examples of the present invention and are not intended to limit the scope of protection of the present invention.
Claims
1. An adaptive information retrieval and optimization system based on retrieval enhancement generation, characterized in that: include: The forward-looking answer module is used to receive the initial query or iteratively generated query statement and context information, and input it into the large language model to generate a forward-looking preliminary answer; A confidence detection module sets a confidence score threshold to perform a keyword-level confidence assessment on the content of the forward-looking preliminary answer, and corrects the low-confidence parts of the answer based on the assessment results, and outputs the complete answer content as a confidence answer; A knowledge graph expansion query module is used to perform named entity recognition on the confidence answer, combine it with a pre-built small knowledge graph, and expand the identified key entities to obtain an expanded query answer; The context memory pool module is used to store the context information input for the first time and the relevant information fragments obtained during each round of retrieval. In the subsequent retrieval process, information is retrieved from this memory pool first, and the external index library is accessed only when there is no matching content in the memory pool.
2. The adaptive information retrieval and optimization system based on search enhancement generation according to claim 1, characterized in that: in, In the forward-looking answer module, the process of obtaining the forward-looking preliminary answer is as follows: For the first input query and its corresponding context information, the big model will automatically generate a forward-looking preliminary answer based on the input content to predict the possible answer direction and content. In the subsequent iterative generation process, the system first searches based on the existing information in the BM25 Adpt retriever and the context memory pool. If there is relevant content in the memory pool, it jumps directly to the confidence detection module to continue subsequent processing. If no matching information is retrieved, the BM25 Adpt retriever searches for relevant documents based on the Wikipedia knowledge base, and inputs the current query and the search results into the large model, which generates the forward-looking preliminary answer.
3. The adaptive information retrieval and optimization system based on search-enhanced generation according to claim 2, characterized in that: in, The formula for BM25 Adpt is as follows: Where D represents the document; Q represents the query, which consists of n query words q i Composition; IDF(q i ) represents the query word q i The inverse document frequency of f(q i ,D) represents word q i The frequency in document D; |D| represents the length of document D; avgdl represents the average length of all documents. The processing process is: BM25 Adpt dynamically adjusts parameters k1 and b, enabling the algorithm to more flexibly adapt to different queries and document distributions, thereby improving retrieval performance. k1 is used to control the sensitivity of word frequency to the score. The dynamic adjustment parameter k1 can be automatically calculated based on the statistical characteristics of the term. b controls the strength of document length normalization. The dynamic adjustment parameter b can adjust the normalization strength based on the document length distribution.
4. The adaptive information retrieval and optimization system based on retrieval enhancement generation according to claim 1, Its characteristics are: Among them, in the confidence detection module, the process of obtaining the confidence answer is: Forward-looking preliminary answers that are higher than the threshold set in the confidence detection module, they enter the credible answer optimization module. First, combined with the iterative termination criteria, the entire round of query is terminated and the final answer is output for those that meet the criteria. For those that do not meet the criteria, they are input into the knowledge graph expansion query module. For the forward-looking preliminary answer that is lower than the threshold set in the confidence detection module, it enters the unreliable answer repair module, asks questions about the key parts of the query that are lower than the threshold, retrieves relevant documents to complete and modify the low-confidence part of the forward-looking preliminary answer, and inputs the repaired query into the knowledge graph expansion query module.
5. The adaptive information retrieval and optimization system based on search-enhanced generation according to claim 4, characterized in that: in, The processing process of the iterative termination criterion is as follows: The confidence response output by the confidence detection module is used to determine whether there are unfinished queries, whether the generated length exceeds the maximum limit, and whether the number of operation steps exceeds the set maximum number of iterations.
6. The adaptive information retrieval and optimization system based on search enhancement generation according to claim 1, characterized in that: in, In the knowledge graph extended query module, the process of obtaining the extended query answer is as follows: Based on the confidence answer obtained by the confidence detection module, the pre-trained natural language processing model performs named entity recognition operations, extracts entities in the query, and combines them with the pre-built knowledge graph to expand the original query.
7. The adaptive information retrieval and optimization system based on search-enhanced generation according to claim 6, characterized in that: in, The process of acquiring the knowledge graph is as follows: Based on the dataset used, key entities in the query statement are extracted, and with the help of a large language model and Wikipedia resources, different expressions that have synonymous or near-synonymous relationships with these entities are identified, thereby constructing a small knowledge graph.
8. The adaptive information retrieval and optimization system based on search enhancement generation according to claim 1, characterized in that: in, The processing process of the context memory pool module is: The context information of the original input and the relevant documents obtained in each retrieval are stored in the context memory pool in sequence. In each subsequent retrieval process, the system first regards the memory pool as a local document library, and searches the memory pool based on the current query content and combined with the BM25 Adpt retriever. If no matching content is retrieved, further search operations are performed in the Wikipedia index.
9. An adaptive information retrieval and optimization method based on retrieval enhancement generation, characterized in that: The following steps are involved: Step 1: Input the original query and related context for the first time. The forward-looking answer module inputs the two into the large language model to generate a forward-looking preliminary answer. At the same time, the related context is stored in the memory pool of the context memory pool module. Step 2: Input the forward-looking preliminary answer into a confidence detection module, which sets a threshold and performs a keyword-level confidence score on the generated forward-looking preliminary answer to obtain a confidence-corrected answer; In step 3, the knowledge graph query expansion module first performs named entity recognition on the confidence-corrected answer based on a natural language processing model to extract key entities. Subsequently, based on a pre-built small entity knowledge graph, each identified entity is expanded to a synonym or near-synonym relationship. The expanded query becomes the expanded query answer. Step 4: The expanded query answer is subjected to the iteration termination criteria to determine whether it meets the output conditions. If it meets the conditions, the final answer is output; otherwise, it is combined with the first query answer as a new round of query; In step 5, the new round of queries is input into the context memory pool module. The retriever BM25 Adpt searches the memory pool for information that meets the answer to the new round of queries based on the new round of queries and the updated memory pool in step 1. The previous operations are iteratively executed for the newly generated queries until the entire query meets the iteration termination criteria and the final answer is output.
10. The adaptive information retrieval and optimization method based on retrieval enhancement generation according to claim 9, characterized in that: in, In step 2, the specific process of obtaining the confidence score answer is: Step 2-1: For answers with a confidence level higher than the threshold, determine whether they meet the iteration termination criteria. If so, output the final answer; otherwise, enter the knowledge graph expansion query module. Step 2-2: For the part with confidence lower than the threshold, re-question the part, use the search engine to obtain relevant documents, complete and correct the original answer, form the confidence-corrected answer and pass it to the next process. In step 5, the specific process is: Step 5-1: Search the memory pool to see if there is information that matches the new round of query answers. If so, generate a new round of answers based on the large language model, input the answers directly into the confidence detection module, and execute according to the process of steps 2 to 4; Step 5-2: Otherwise, the new round of answers will re-retrieve relevant information as context based on the Wikipedia index and store the context in the memory pool. At the same time, the new round of answers and the context information are input into the large language model together, and the process in steps 1 to 5 is executed.
Citation Information
Cited By
Enterprise knowledge question-answering system, method, equipment and medium
CN121071108A
Information retrieval system and method based on semantic normalization
CN121210488A
Information retrieval method and related device
CN121722814A
