实证分析文档分块对RAG系统可靠性的影响,给出工业部署优化建议。
A Systematic Analysis of Chunking Strategies for Reliable Question Answering
- 系统评估不同分块方式、大小、重叠与上下文长度对RAG的影响
- 句级分块最经济,2.5千token后性能骤降,语义质量随上下文增大而下降
- 重叠无实际收益,且增加索引成本,适合追求效率的工业场景
我们研究了文档分块策略如何影响工业级检索增强生成(RAG)系统的可靠性。尽管实践中常依赖启发式方法,但我们在Natural Questions数据集上进行了端到端评估,系统性地改变分块方法(基于标记、句子、语义、代码)、分块大小、重叠度和上下文长度。实验采用标准工业配置:SPLADE检索器与Mistral-8B生成器。得出可落地的部署建议:(i) 重叠无显著收益,反而增加索引成本;(ii) 句子分块最具成本效益,在约5千标记内表现媲美语义分块;(iii) 存在“上下文悬崖”,超过约2.5千标记时性能明显下降;(iv) 最优上下文取决于目标——语义质量在小上下文下最佳,精确匹配则需更大上下文。
原文摘要 · Abstract (English)
We study how document chunking choices impact the reliability of Retrieval-Augmented Generation (RAG) systems in industry. While practice often relies on heuristics, our end-to-end evaluation on Natural Questions systematically varies chunking method (token, sentence, semantic, code), chunk size, overlap, and context length. We use a standard industrial setup: SPLADE retrieval and a Mistral-8B generator. We derive actionable lessons for cost-efficient deployment: (i) overlap provides no measurable benefit and increases indexing cost; (ii) sentence chunking is the most cost-effective method, matching semantic chunking up to ~5k tokens; (iii) a "context cliff" reduces quality beyond ~2.5k tokens; and (iv) optimal context depends on the goal (semantic quality peaks at small contexts; exact match at larger ones).
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。