收藏切换
A Retrieval-Augmented Generation System Based on Sliding Window Strategies in Large Language Models
收藏切换
Fenglin Bi1, Qiming Zhang1, Jiarui Zhang1, Yantong Wang1, Yang Chen2, 3, Yanbin Zhang1, *, Wei Wang1, Xuan Zhou1
Journal of Computer Research and Development | 2025, 62(7) : 1597 - 1610
Less
收藏切换
Journal of Computer Research and Development | 2025, 62(7): 1597-1610
• Special Issue on Generative AI-driven Information Systems •
A Retrieval-Augmented Generation System Based on Sliding Window Strategies in Large Language Models
Full
Fenglin Bi1, Qiming Zhang1, Jiarui Zhang1, Yantong Wang1, Yang Chen2, 3, Yanbin Zhang1, *, Wei Wang1, Xuan Zhou1
Affiliations
  • 1School of Data Science and Engineering, East China Normal University, Shanghai 200062
  • 2School of Computer Science, Fudan University, Shanghai 200433
  • 3Shanghai Key Laboratory of Intelligent Information Processing (Fudan University), Shanghai 200433
  • born in 1993. PhD candidate. Student member of CCF. His main research interests include large language models, open source software supply chain and ecology, and software bots

    born in 1999. Master candidate. Student member of CCF. His main research interests include large language model applications and computational pedagogy

    born in 2000. Master candidate. His main research interests include large language models and computational pedagogy

    born in 2000. Master candidate. His main reserach interests include large language models and open source software ecology

    born in 1981. PhD, professor, PhD supervisor. Senior member of ACM, IEEE and CCF. His main research interests include computer networks, social computing, and big data analytics

    born in 1983. Master, engineer, master supervisor. Member of CCF. Her main research interests include computational pedagogy and software engineering

    born in 1979. PhD, professor, PhD supervisor. Member of CCF. His main research interests include open source measurement and digital ecosystems

    born in 1979. PhD, professor, PhD supervisor. Member of CCF. His main research interests include high performance database and information retrieval

About Author:

born in 1993. PhD candidate. Student member of CCF. His main research interests include large language models, open source software supply chain and ecology, and software bots

born in 1999. Master candidate. Student member of CCF. His main research interests include large language model applications and computational pedagogy

born in 2000. Master candidate. His main research interests include large language models and computational pedagogy

born in 2000. Master candidate. His main reserach interests include large language models and open source software ecology

born in 1981. PhD, professor, PhD supervisor. Senior member of ACM, IEEE and CCF. His main research interests include computer networks, social computing, and big data analytics

born in 1983. Master, engineer, master supervisor. Member of CCF. Her main research interests include computational pedagogy and software engineering

born in 1979. PhD, professor, PhD supervisor. Member of CCF. His main research interests include open source measurement and digital ecosystems

born in 1979. PhD, professor, PhD supervisor. Member of CCF. His main research interests include high performance database and information retrieval

Published: 2025-07-01 doi: 10.7544/issn1000-1239.202440411
Outline
收藏切换

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.

retrieval-augmented generation  /  sliding window mechanism  /  large language models  /  information retrieval  /  document question answering
毕枫林, 张豈明, 张嘉睿, 王衍童, 陈阳, 张琰彬, 王伟, 周烜. 基于滑动窗口策略的大语言模型检索增强生成系统. 计算机研究与发展, 2025 , 62 (7) : 1597 -1610 . DOI: 10.7544/issn1000-1239.202440411
Fenglin Bi, Qiming Zhang, Jiarui Zhang, Yantong Wang, Yang Chen, Yanbin Zhang, Wei Wang, Xuan Zhou. A Retrieval-Augmented Generation System Based on Sliding Window Strategies in Large Language Models[J]. Journal of Computer Research and Development, 2025 , 62 (7) : 1597 -1610 . DOI: 10.7544/issn1000-1239.202440411
Year 2025 volume 62 Issue 7
95
39
Cite this Article
BibTeX
Article Info
doi: 10.7544/issn1000-1239.202440411
  • Receive Date:2024-05-31
  • Online Date:2026-11-10
  • Published:2025-07-01
Article Data
Affiliations
History
  • Received:2024-05-31
  • Revised:2025-02-21
  • Accepted:2025-03-03
Affiliations
    1School of Data Science and Engineering, East China Normal University, Shanghai 200062
    2School of Computer Science, Fudan University, Shanghai 200433
    3Shanghai Key Laboratory of Intelligent Information Processing (Fudan University), Shanghai 200433
References
Share
https://castjournals.cast.org.cn/joweb/jsjyjyfz/EN/10.7544/issn1000-1239.202440411
Share to
QR

Scan QR to access full text

Cite this article
BibTeX
Citations
表12种不同金属材料的力学参数
科
Family
属数
Number of
genus
种数
Number of
species
占总种数比例
Percentage of
total species (%)
属
Genus
种数
Number of
species
占总种数比例
Percentage of total
species (%)
鹅膏菌科Amanitaceae 2 11 5.26 鹅膏菌属 Amanita 10 4.78
小菇科 Mycenaceae 2 12 5.74 丝盖伞属 Inocybe 5 2.39
多孔菌科 Polyporaceae 8 14 6.70 蜡蘑属 Laccaria 5 2.39
红菇科 Russulaceae 3 23 11.00 小皮伞属 Marasmius 6 2.87
小菇属 Mycena 11 5.26
光柄菇属 Pluteus 5 2.39
红菇属 Russula 17 8.13
栓菌属 Trametes 5 2.39
关闭全屏
  • BibTeX
  • EndNote
  • RefWorks
  • TxT