对比两种文档分块方法,找出提升大模型问答准确率的最优策略
Reconstructing Context: Evaluating Advanced Chunking Strategies for Retrieval-Augmented Generation
- 采用延迟分块和上下文检索两种新策略,保留更完整语义信息
- 上下文检索保持语义连贯性更好,但计算开销更高
- 延迟分块效率高但易丢失关键信息,适合资源受限场景
检索增强生成(RAG)通过引入外部知识源,显著提升了大语言模型(LLM)输出的准确性与可解释性。然而,如何在LLM输入长度受限的前提下有效管理海量外部知识,仍是核心挑战。传统方法将文档切分为固定大小的片段,虽缓解了输入限制,却常导致上下文断裂,影响检索完整性与生成连贯性。为此,晚节分块(late chunking)与上下文检索(contextual retrieval)两类先进策略被提出,旨在保留全局语义结构。本研究系统评估了二者在优化RAG系统中的有效性与效率:结果表明,上下文检索在保持语义一致性方面表现更优,但需更多计算资源;而晚节分块效率更高,但存在相关性与完整性下降的风险。
原文摘要 · Abstract (English)
Retrieval-augmented generation (RAG) has become a transformative approach for enhancing large language models (LLMs) by grounding their outputs in external knowledge sources. Yet, a critical question persists: how can vast volumes of external knowledge be managed effectively within the input constraints of LLMs? Traditional methods address this by chunking external documents into smaller, fixed-size segments. While this approach alleviates input limitations, it often fragments context, resulting in incomplete retrieval and diminished coherence in generation. To overcome these shortcomings, two advanced techniques, late chunking and contextual retrieval, have been introduced, both aiming to preserve global context. Despite their potential, their comparative strengths and limitations remain unclear. This study presents a rigorous analysis of late chunking and contextual retrieval, evaluating their effectiveness and efficiency in optimizing RAG systems. Our results indicate that contextual retrieval preserves semantic coherence more effectively but requires greater computational resources. In contrast, late chunking offers higher efficiency but tends to sacrifice relevance and completeness.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。