Retrieval enhancement generation method and system based on historical information driving
By adopting a historical information-driven search enhancement generation method in the timeline background summary task, using multi-strategy similarity calculation and dynamic sliding window mechanism, combined with a structured alignment prompt template, the problems of insufficient background information, insufficient summary information and deviation in the previous technology are solved, and a comprehensive and accurate summary is achieved.
Patent Information
- Application Number
- CN202510056071.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-05-16
AI Technical Summary
The prior art has problems of insufficient background information, insufficient summary information and deviation in the timeline background summary task, resulting in the lack of completeness, accuracy and coherence of generated summary.
Using a search-enhanced generation method and system based on historical information, through multi-strategy similarity calculation and dynamic sliding window mechanism, the scope of use of background information is dynamically adjusted, combined with structured aligned prompt templates, the current background and historical background are combined to generate a comprehensive and accurate summary.
Ensure that the generated summary is comprehensive and accurate, adapts to the needs of different tasks, reduces noise and redundant information, and improves the completeness, accuracy and coherence of the summary.
Smart Images

Figure CN120011553A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information enhancement technology, and in particular to a retrieval enhancement generation method and system driven by historical information. Background Art
[0002] In an era of global information explosion, it is often difficult for people to understand the relationship between an event over time. Therefore, it is necessary to understand the relationship between events more accurately and quickly to assist news readers and workers to quickly understand the development of an event. The summaries in the timeline background summary task are an important tool for readers to grasp the latest news relationships. These summaries provide historical information related to the current context, refine the evolution of past events, and can help us deeply understand the connection between the context of an event at any specific time and its historical context.
[0003] At present, the timeline background summary task mainly relies on natural language processing technology, which generates summaries by processing text data and combining large models. These technologies usually generate timeline summaries based on the following two methods: the first is to use only the background information of the current time. By analyzing the current background information, a summary of the current time background is generated to help users understand the development of events in the current context; the second is to select the nearest historical background combination. This method guides the generation of summaries by introducing additional context information.
[0004] Although existing technologies have achieved certain results in the timeline background summary task, there are still some shortcomings:
[0005] 1) Insufficient background information: Using only the current background may not provide enough contextual information, resulting in the lack of completeness and accuracy of the generated summary. Especially in long documents or complex tasks, a single background may not fully cover the core content of the task. Although using the nearest background can increase the amount of information, if the background is not properly selected, such as being irrelevant to the current task or containing noise, it may introduce irrelevant information, resulting in a decrease in the accuracy of summary generation.
[0006] 2) Insufficient summary information: If the current context is relatively isolated or lacks a global perspective, the generated summary may ignore other important related information, resulting in a one-sided summary. Introducing nearby context may lead to information redundancy, especially when the task prefix and background information are too close, which may generate a lengthy and unfocused summary.
[0007] 3) Summary information bias: When there are logical connections between different paragraphs or parts in a document, using only the current background may sever these connections, making the generated summary lack coherence. The immediate background may be affected by the document structure or content distribution. If the selected background fragment is too one-sided or biased, it may lead the model to generate a biased summary. Summary of the invention
[0008] The present invention provides a method and system for enhancing retrieval generation based on historical information drive. The method and system can dynamically adjust the use scope of background information through independent historical information drive, and can be replaced by other enhanced retrieval technologies to ensure that the generated summary is comprehensive and accurate and adapt to the needs of different tasks. The method combines multi-strategy similarity calculation with a sliding window mechanism to flexibly identify the historical background most relevant to the current task and avoid noise and redundant information. The method combines the current background with the historical background through a structured aligned prompt template, flexibly adapts to different prompt generation algorithms, and constructs a retriever that meets the requirements of diverse tasks and scenarios.
[0009] The present invention provides a retrieval enhancement generation method based on historical information driving, comprising:
[0010] The user makes a query request;
[0011] After receiving the query request, the retriever retrieves the relevant documents;
[0012] Combine relevant documents with prompt instructions to build prompt templates and generate formatted prompts;
[0013] Feed the formatted prompt into the generative model to generate a summary.
[0014] Preferably, the construction of the prompt template specifically comprises: adopting a multi-strategy similarity calculation method in combination with a dynamic sliding window, determining the scope and size of the search and the most relevant historical background, combining the selected historical background information with a common task prefix, and constructing a prompt template.
[0015] A retrieval enhancement generation system driven by historical information, comprising:
[0016] Query module, used for users to make query requests;
[0017] A retriever module, used to retrieve relevant documents after receiving a query request;
[0018] The prompt template module is used to build a prompt template by combining relevant documents with prompt instructions and generate formatted prompts;
[0019] The summary generation module is used to input the formatted prompt into the generation model to generate a summary.
[0020] Preferably, the prompt template module includes a historical background scoring submodule, a historical background selection submodule and a prompt input construction submodule;
[0021] The historical background scoring submodule is used to utilize entity and text location information in multi-dimensional space and adopt a multi-strategy similarity calculation method;
[0022] The historical background selection submodule is used to adopt an improved sliding window mechanism;
[0023] The prompt input construction submodule is used to combine the selected historical background information with the common task prefix to construct a dedicated prompt template.
[0024] Preferably, the historical background scoring submodule is specifically:
[0025] Named entity recognition is used to extract entities from background information, perform word segmentation and remove stop words to clean text data;
[0026] The current context is used as the query, and a multi-strategy similarity calculation is used to evaluate the relationship between entities and texts in the historical context relative to the query;
[0027] Quantify the relationships between entities and texts in historical contexts through scores.
[0028] Preferably, the multi-strategy similarity calculation is specifically as follows:
[0029]
[0030] Among them, e q The entity extracted from the current background; w q Represents the vocabulary processed by the current context; i represents the index of the historical context, which is in the range of [0, t); Represents the entity extracted from the i-th historical context; represents the word after the i-th historical context processing; entityExtraction(q) is the entity extracted by named entity recognition, tokenizer(U i ) is the vocabulary obtained by word segmentation and removing stop words;
[0031] The relationship between entities and texts in the historical context quantified by scores is specifically:
[0032] score=es-ts.
[0033] Preferably, the historical background selection submodule is specifically:
[0034] A dynamically adjusted sliding window mechanism is introduced to control the selection range of the background. The model's attention is focused through continuous text fragments of fixed length, and the window is gradually moved as the text progresses until the TopK relevant background information is found.
[0035] Preferably, the dynamically adjusted sliding window mechanism is specifically:
[0036] Set the initialization window to L and the current time point U t As q, the first window range of q is [tL-1, t-1], and U is calculated from this window range. t Find the most relevant historical context; select the one that is most relevant to the current query (U t′ ) and set q to U t′ , and adjust the size and position of the window, setting the new window size to [t′-L-1, t′+L-1].
[0037] Preferably, the prompt input construction submodule is specifically:
[0038] Use task prompt prefixes to guide the model to generate accurate and concise summary content;
[0039] The most relevant historical information obtained by the model is combined with the user's current historical background U t Splice them together to form a prompt template for comprehensive input.
[0040] Compared with the prior art, the present invention has the following beneficial effects:
[0041] The present invention discloses a retrieval enhancement generation method and system driven by historical information. The method dynamically adjusts the use scope of background information through independent historical information drive and can be replaced by other enhanced retrieval technologies to ensure that the generated summary is comprehensive and accurate and adapts to the needs of different tasks. The method combines multi-strategy similarity calculation with a sliding window mechanism to flexibly identify the historical background most relevant to the current task and avoid noise and redundant information. The method combines the current background with the historical background through a structured aligned prompt template, flexibly adapts to different prompt generation algorithms, and constructs a retriever that meets the requirements of diverse tasks and scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a flowchart of a retrieval enhancement generation method driven by historical information provided by an embodiment of the present invention;
[0043] Figure 2 It is a schematic diagram of a module of a retrieval enhancement generation system driven by historical information provided by an embodiment of the present invention;
[0044] Figure 3It is a schematic diagram of a framework of a retrieval enhancement generation system driven by historical information provided by an embodiment of the present invention;
[0045] Figure 4 It is a schematic diagram of a retriever module provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] like Figure 1 As shown, the present application provides a retrieval enhancement generation method driven by historical information, comprising:
[0048] The user makes a query request;
[0049] After receiving the query request, the retriever retrieves the relevant documents;
[0050] Combine relevant documents with prompt instructions to build prompt templates and generate formatted prompts;
[0051] Feed the formatted prompt into the generative model to generate a summary.
[0052] In the above scheme, when the user makes a query request, the system starts to operate, the retriever quickly receives the request and retrieves relevant documents from multiple document repositories, which cover various information sources such as current background and historical background, among which the historical background includes relevant background; after obtaining the relevant documents, the retriever constructs a prompt template according to certain rules, and this template contains key instructions on how to process the documents; the retriever combines the retrieved relevant documents with the current background and the prompt prefix to form a prompt template; the prompts that pass through the prompt template are accurately input into the generation model, and the generation model analyzes and processes the prompts based on its own algorithms and learning capabilities, and finally generates a summary that meets the user's needs, providing the user with concise and accurate information content.
[0053] Preferably, the construction of the prompt template specifically comprises: adopting a multi-strategy similarity calculation method in combination with a dynamic sliding window, determining the scope and size of the search and the most relevant historical background, combining the selected historical background information with a common task prefix, and constructing the prompt template.
[0054] In the above scheme, the present invention combines RAG technology to dynamically integrate historical information with current context to solve the following technical problems:
[0055] Dynamic integration driven by historical information: The existing technology only relies on the current or recent background to generate summaries, which may lead to a lack of completeness and accuracy of information. The present invention introduces dynamic integration of historical information and current background to expand the scope of background information, thereby ensuring that the generated summary can cover the core content of the event and provide a more comprehensive perspective; it not only improves the completeness of the summary, but also enhances the accuracy of the information, so that readers can better understand the development context of the event;
[0056] Improve information relevance and coherence: The existing technology may ignore the connection between historical background and background in the generation of background summary, resulting in one-sided or lack of coherence in the summary; the present invention uses standard RAG technology to dynamically select and integrate the information of the current background, ensuring that the logical connection between the current background and the historical background can be fully reflected when generating the summary, avoiding the isolation and fragmentation of information, thereby improving the coherence and relevance of the generated summary;
[0057] Reduce redundancy and noise: The method of introducing nearby background in the prior art may cause information redundancy or noise interference, making the generated summary lack focus; the framework of the present invention is based on RAG technology, constructs a special retriever to optimize the background selection method, dynamically screens background information related to the current task, avoids introducing irrelevant or noisy content, ensures that the generated summary is concise and highlights the key points, thereby improving the accuracy and conciseness of the summary.
[0058] like Figure 2 As shown, a retrieval enhancement generation system driven by historical information includes:
[0059] Query module, used for users to make query requests;
[0060] A retriever module, used to retrieve relevant documents after receiving a query request;
[0061] The prompt template module is used to build a prompt template by combining relevant documents with prompt instructions and generate formatted prompts;
[0062] The summary generation module is used to input the formatted prompt into the generation model to generate a summary.
[0063] Preferably, the prompt template module includes a historical background scoring submodule, a historical background selection submodule and a prompt input construction submodule;
[0064] The historical background scoring submodule is used to utilize entity and text location information in multi-dimensional space and adopt a multi-strategy similarity calculation method;
[0065] The historical background selection submodule is used to adopt an improved sliding window mechanism;
[0066] The prompt input construction submodule is used to combine the selected historical background information with the common task prefix to construct a dedicated prompt template.
[0067] Preferably, the historical background scoring submodule is specifically:
[0068] Named entity recognition is used to extract entities from background information, perform word segmentation and remove stop words to clean text data;
[0069] The current context is used as the query, and a multi-strategy similarity calculation is used to evaluate the relationship between entities and texts in the historical context relative to the query;
[0070] Quantify the relationships between entities and texts in historical contexts through scores.
[0071] Preferably, the multi-strategy similarity calculation is specifically as follows:
[0072]
[0073] Among them, e q The entity extracted from the current background; w q Represents the vocabulary processed by the current context; i represents the index of the historical context, which is in the range of [0, t); Represents the entity extracted from the i-th historical context; represents the word after the i-th historical context processing; entityExtraction(q) is the entity extracted by named entity recognition, tokenizer(U i ) is the vocabulary obtained by word segmentation and removing stop words;
[0074] The relationship between entities and texts in the historical context quantified by scores is specifically:
[0075] score=es-ts.
[0076] In the above scheme, the traditional similarity calculation method usually only considers the simple similarity between entities or texts, while ignoring the complementary information that may exist between entities and texts. This limits the effective retrieval and utilization of relevant information in the generation of background summaries. The present invention adopts a technical solution of a multi-strategy similarity calculation method; the method particularly emphasizes the comprehensive application of entity similarity and text similarity to find the historical background that is most relevant to the current background and has complementary information.
[0077] By using the English model loaded by SpaCy, named entity recognition technology is used to extract entities from the background information; word segmentation is performed and stop words are removed to clean the text data. This processing step ensures the accuracy and relevance of the input data. tas query q, and apply Jaccard similarity calculation to evaluate the relationship between entities and texts in the historical context relative to q.
[0078] Preferably, the historical background selection submodule is specifically:
[0079] A dynamically adjusted sliding window mechanism is introduced to control the selection range of the background. The model's attention is focused through continuous text fragments of fixed length, and the window is gradually moved as the text progresses until the TopK relevant background information is found.
[0080] Preferably, the dynamically adjusted sliding window mechanism is specifically:
[0081] Set the initialization window to L and the current time point U t As q, the first window range of q is [tL-1, t-1], and U is calculated from this window range. t Find the most relevant historical context; select the one that is most relevant to the current query (U t′ ) and set q to U t′ , and adjust the size and position of the window, setting the new window size to [t′-L-1, t′+L-1].
[0082] In the above scheme, an improved sliding window mechanism is introduced. This mechanism has been widely used in the field of natural language processing for text analysis, information extraction, and sentiment analysis. It focuses the model's attention through continuous text segments of fixed length, and gradually moves the window to cover the entire text as the text progresses. The core idea of the sliding window mechanism is to limit the calculation of self-attention to a smaller window, similar to the processing method of Swin Transformer. This method not only optimizes computational efficiency, but also reduces the demand for computing resources while maintaining high accuracy. Specifically, when it comes to the generation of timeline summaries, considering the time sensitivity of event background information, the farther the historical information is from the current time point, the less its impact on the current event. Therefore, a dynamically adjusted sliding window is used to adapt to this time decay characteristic.
[0083] Specifically, initialize the window size to L and set U t As q, the window range of the first q is [tL-1, t-1]. We use the scoring module to score U from within this window range. t Find the most relevant historical context; whenever a historical context (U t′ ) then we set q to U t′, and adjust the window size and position accordingly, setting the new window size to [t′-L-1, t′+L-1]; this adaptive window adjustment mechanism ensures that the model can continue to focus on the historical information that is most relevant to the current query.
[0084] It is important to note that we must pay attention to the boundaries of the historical background range. The historical background range is always [0, t-1]. Therefore, when t′+L exceeds t-1, the right boundary is truncated and its maximum boundary is set to t-1. When t′-L is less than 0, its minimum boundary is set to 0, and the process is repeated TopK-1 times. This ensures that the window always moves within a reasonable historical background range, thereby maintaining the accuracy and relevance of summary generation.
[0085] Preferably, the prompt input construction submodule is specifically:
[0086] Use task prompt prefixes to guide the model to generate accurate and concise summary content;
[0087] The most relevant historical information obtained by the model is combined with the user's current historical background U t Splice them together to form a prompt template for comprehensive input.
[0088] In the above scheme, at a time when the problem of large model hallucination is becoming increasingly serious, the key to RAG technology is to construct an effective prompt template to ensure the quality and relevance of the generated content; use the task prompt prefix "Instruction: Provide a short summary of the below articles." to guide the model to generate accurate and concise summary content.
[0089] In addition, in order to enhance the use of background information, the TOPK most relevant historical information obtained by the model is combined with the user’s current query (U t ) to form a comprehensive input; this not only improves the relevance of the generated content, but also significantly reduces the occurrence of hallucination problems. Specifically, the prompt template is: “Instruction: Provide a short summary of the below articles. Input:<current background><relative historicalbackgrounds> ”.
[0090] like Figure 3 As shown, in an embodiment provided by the present application, a system process for generating a summary based on a document is disclosed, specifically:
[0091] Query: The starting point of the process, indicating the query request raised by the user.
[0092] Retriever: The query request first enters the retriever, which retrieves relevant documents from three different background document repositories:
[0093] Current background: Contains the latest relevant documents.
[0094] Relative backgrounds: retrieved through historical background.
[0095] Historical backgrounds: Contains relevant documents from the past.
[0096] Prompt: The retrieved document will be fed into the prompt module. The prompt module contains an instruction to give a brief summary of the following article.
[0097] Generate model: The formatted prompt is fed into the generative model, which produces a short summary.
[0098] Background summarization: The bottom of the figure shows a specific background summary example, which is as follows:
[0099] “On April 20th, BP-operated drilling rig Deepwater Horizon exploded in the Gulf of Mexico, 84km south-east of Venice, Louisiana, when a blowout preventer failed to activate, leaving 11dead and 17injured. The rig has been found upside down about a quarter-mile from the blowout preventer. Multiple federal departments and agencies are involved in..."
[0100] This passage describes the explosion of the Deepwater Horizon drilling platform in the Gulf of Mexico on April 20, 2010, which killed 11 people and injured 17, and introduces some of the subsequent circumstances of the incident.
[0101] The whole process shows how to start from the user's query, retrieve relevant documents, generate prompts, and then generate summaries through the generative model. This system can be used to quickly summarize a large number of documents and provide key information.
[0102] like Figure 4 As shown, in one embodiment provided by the present application, the relevant architecture of the retriever module is disclosed, specifically:
[0103] Module 1: Historical Backgrounds Scoring
[0104] Module 2: Historical Backgrounds Selection (Historical Background Selection Module)
[0105] Module 3: Prompt Input Construction Based on Historical Backgrounds (prompt input construction module based on historical background)
[0106] Module 1: Historical Backgrounds Scoring
[0107] Function: Score historical background documents.
[0108] Input: query and window range.
[0109] Query (query) with U t Indicates that the window range is [tL-1,t-1].
[0110] Output: Rating of historical background document.
[0111] Module 2: Historical Backgrounds Selection
[0112] Function: Select the most relevant historical background documents based on the score.
[0113] Input: Scoring results from module 1.
[0114] Textual similarity and entity similarity.
[0115] The window range is represented by [t′-L-1, t′+L-1, where t=t′. The most similar background t′ is selected according to module 1 to update the window range.
[0116] Output: Selected historical background document.
[0117] Module 3: Prompt Input Construction Based on Historical Backgrounds
[0118] Function: Build prompt input based on selected historical background documents.
[0119] Input: Selected historical background documents.
[0120] Output: Prompt, used to generate a text summary.
[0121] Prompt: The prompt includes instructions for a brief summary of the following article.
[0122] Specific articles include:
[0123] 2010-04-20: The Deepwater Horizon drilling rig exploded in the Gulf of Mexico.
[0124] 2010-04-25: Coast Guard helicopters and rescue planes responded, searching for 11 missing workers.
[0125] 2010-04-27: The U.S. Coast Guard suspends search for 11 missing workers who are presumed dead.
[0126] TOPK: Figure 4 An arrow is shown pointing from module 3 to TOPK, indicating that the historical background document is finally selected for generating the text summary.
[0127] This embodiment scores and selects historical background documents, constructs prompt input, and finally generates a text summary. Each module in the system has a clear function, and is interconnected through input and output to form a complete text summary generation process.
[0128] Preferably, a device comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the historical information-driven retrieval enhancement generation method when executing the computer program.
[0129] Preferably, a computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the historical information-driven retrieval enhancement generation method.
[0130] Preferably, the computer program can be divided into one or more modules / units (such as computer programs), and the one or more modules / units are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units can be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in the terminal device.
[0131] The processor may be a central processing unit (CPU), or other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor. The processor is the control center of the terminal device, and various parts of the terminal device are connected using various interfaces and lines.
[0132] The memory mainly includes a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function, etc., and the data storage area can store related data, etc. In addition, the memory can be a high-speed random access memory, or a non-volatile memory, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, and a flash card (Flash Card), etc., or the memory can also be other volatile solid-state storage devices.
[0133] It should be noted that the above-mentioned terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art will understand that the above-mentioned terminal device is merely an example and does not constitute a limitation on the terminal device. It may include more or fewer components, or a combination of certain components, or different components.
[0134] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A retrieval enhancement generation method driven by historical information, characterized in that: include: The user makes a query request; After receiving the query request, the retriever retrieves the relevant documents; Combine relevant documents with prompt instructions to build prompt templates and generate formatted prompts; Feed the formatted prompt into the generative model to generate a summary.
2. The method for generating retrieval enhancement based on historical information drive according to claim 1, characterized in that: The construction of the prompt template specifically comprises: adopting a multi-strategy similarity calculation method in combination with a dynamic sliding window, determining the scope and size of the search and the most relevant historical background, combining the selected historical background information with a common task prefix, and constructing the prompt template.
3. A retrieval enhancement generation system driven by historical information, characterized in that: include: Query module, used for users to make query requests; A retriever module, used to retrieve relevant documents after receiving a query request; The prompt template module is used to build a prompt template by combining relevant documents with prompt instructions and generate formatted prompts; The summary generation module is used to input the formatted prompt into the generation model to generate a summary.
4. A retrieval enhancement generation system based on historical information drive according to claim 3, characterized in that: The prompt template module includes a historical background scoring submodule, a historical background selection submodule and a prompt input construction submodule; The historical background scoring submodule is used to utilize entity and text location information in multi-dimensional space and adopt a multi-strategy similarity calculation method; The historical background selection submodule is used to adopt an improved sliding window mechanism; The prompt input construction submodule is used to combine the selected historical background information with the common task prefix to construct a prompt template.
5. A retrieval enhancement generation system based on historical information drive according to claim 4, characterized in that: The historical background submodule is specifically: Named entity recognition is used to extract entities from background information, perform word segmentation and remove stop words to clean text data; The current context is used as the query, and a multi-strategy similarity calculation is used to evaluate the relationship between entities and texts in the historical context relative to the query; Quantify the relationships between entities and texts in historical contexts through scores.
6. A retrieval enhancement generation system based on historical information drive according to claim 5, characterized in that: The multi-strategy similarity calculation is specifically as follows: Among them, e q The entity extracted from the current background; w q Represents the vocabulary processed by the current context; i represents the index of the historical context, which is in the range of [0, t); Represents the entity extracted from the i-th historical context; represents the word after the i-th historical context processing; entityExtraction(q) is the entity extracted by named entity recognition, tokenizer(U i ) is the vocabulary obtained by word segmentation and removing stop words; The relationship between entities and texts in the historical context quantified by scores is specifically: score=es-ts.
7. A retrieval enhancement generation system based on historical information drive according to claim 6, characterized in that: The historical background selection submodule is specifically: A dynamically adjusted sliding window mechanism is introduced to control the selection range of the background. The model's attention is focused through continuous text fragments of fixed length, and the window is gradually moved as the text progresses until the TopK relevant background information is found.
8. The retrieval enhancement generation system based on historical information drive according to claim 7, characterized in that: The dynamic adjustment sliding window mechanism is specifically as follows: Set the initialization window to L and the current time point U t As q, the first window range of q is [tL-1, t-1], and U is calculated from this window range. t Find the most relevant historical context; select the one that is most relevant to the current query (U t′ ) and set q to U t′ , and adjust the size and position of the window, setting the new window size to [t ′ -L-1,t ′ +L-1].
9. The retrieval enhancement generation system based on historical information drive according to claim 8, characterized in that: The prompt input construction submodule is specifically: Use task prompt prefixes to guide the model to generate accurate and concise summary content; The most relevant historical information obtained by the model is combined with the user's current historical background U t Splice them together to form a prompt template for comprehensive input.
Citation Information
Patent Citations
Text generation enhancement method and device applied to retrieval enhancement generation
CN118377844A
Apparatus and method for document retrieval
JP2006268789A