TY - JOUR
T1 - 基于滑动窗口策略的大语言模型检索增强生成系统
AU - Bi, Fenglin
AU - Zhang, Qiming
AU - Zhang, Jiarui
AU - Wang, Yantong
AU - Chen, Yang
AU - Zhang, Yanbin
AU - Wang, Wei
AU - Zhou, Xuan
N1 - Publisher Copyright:
© 2025 Science Press. All rights reserved.
PY - 2025/7
Y1 - 2025/7
N2 - 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.
AB - 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.
KW - document question answering
KW - information retrieval
KW - large language models
KW - retrieval-augmented generation
KW - sliding window mechanism
UR - https://www.scopus.com/pages/publications/105010761436
U2 - 10.7544/issn1000-1239.202440411
DO - 10.7544/issn1000-1239.202440411
M3 - 文章
AN - SCOPUS:105010761436
SN - 1000-1239
VL - 62
SP - 1597
EP - 1610
JO - Jisuanji Yanjiu yu Fazhan/Computer Research and Development
JF - Jisuanji Yanjiu yu Fazhan/Computer Research and Development
IS - 7
ER -