基于滑动窗口策略的大语言模型检索增强生成系统

Translated title of the contribution: A Retrieval-Augmented Generation System Based on Sliding Window Strategies in Large Language Models

Fenglin Bi, Qiming Zhang, Jiarui Zhang, Yantong Wang, Yang Chen, Yanbin Zhang, Wei Wang, Xuan Zhou

Research output: Contribution to journalArticlepeer-review

Abstract

Leveraging a sliding window strategy, this study presents an innovative retrieval-augmented generation system aimed at enhancing the factual accuracy and reliability of outputs from large language models (LLMs). By applying a sliding window mechanism during the indexing phase, the project effectively addresses the limitations of fixed context window sizes and static retrieval methods. Three specific sliding window strategies are proposed to efficiently process and segment texts, such as fixed window size and fixed step length split (FFS), dynamic window size and fixed step length split (DFS), and dynamic window size and dynamic step length split (DDS). To further enhance retrieval accuracy and relevance, the project employs multiple advanced query techniques, including query expansion and reformulation. Rigorous experimental evaluations are conducted using the state-of-the-art LLaMA-3 model across multiple diverse datasets, encompassing both general knowledge and domain-specific corpora. Results demonstrate optimal performance with a carefully calibrated block size of 1 024 tokens and a step size of 3, significantly improving F1 score across various tasks. This configuration highlights the critical importance of balancing document segment length and sliding window step size to maximize information retention and retrieval efficacy.The sliding window strategy effectively preserves contextual information, reduces information loss, and exhibits adaptability across different datasets and query types.

Translated title of the contributionA Retrieval-Augmented Generation System Based on Sliding Window Strategies in Large Language Models
Original languageChinese (Traditional)
Pages (from-to)1597-1610
Number of pages14
JournalJisuanji Yanjiu yu Fazhan/Computer Research and Development
Volume62
Issue number7
DOIs
StatePublished - Jul 2025

Fingerprint

Dive into the research topics of 'A Retrieval-Augmented Generation System Based on Sliding Window Strategies in Large Language Models'. Together they form a unique fingerprint.

Cite this