arXiv:2410.12788cs.CL2024-10被引 22

用大模型逻辑感知能力提升文本切分质量,让检索生成更准确

Meta-Chunking: Learning Text Segmentation and Semantic Completion via Logical Perception

  • 基于困惑度和置信度设计自适应切分策略,避免传统相似性切分缺陷
  • 引入动态合并与多阶段重写机制,显著增强段落语义完整性和上下文连贯性
  • 可在小模型上实现高质量切分,降低对强指令跟随模型的依赖

尽管检索增强生成(RAG)在知识密集型任务中展现出巨大潜力,但其流程常忽视文本切分这一关键环节。本文提出Meta-Chunking框架,通过双重策略提升切分质量:首先,突破基于相似性的切分局限,利用大语言模型(LLM)的逻辑感知能力,设计基于不确定性的两种自适应切分方法——困惑度切分(Perplexity Chunking)与边界置信度切分(Margin Sampling Chunking);其次,针对不同文本的复杂性,引入元切分(meta-chunk)与动态合并机制,在细粒度与粗粒度之间取得平衡。此外,建立全局信息补偿机制,包含两阶段层次化摘要生成与三阶段文本重写流程(缺失补全、内容精炼、语义完善),全面提升段落的语义完整性与上下文连贯性。大量实验表明,Meta-Chunking有效解决RAG中切分任务的挑战,为大模型提供更具逻辑一致性的文本块。同时,该方法验证了使用小规模模型实现高质量切分的可行性,降低了对强大指令遵循能力的依赖。

原文摘要 · Abstract (English)

While Retrieval-Augmented Generation (RAG) has emerged as a promising paradigm for boosting large language models (LLMs) in knowledge-intensive tasks, it often overlooks the crucial aspect of text chunking within its workflow. This paper proposes the Meta-Chunking framework, which specifically enhances chunking quality through a dual strategy that identifies optimal segmentation points and preserves global information. Initially, breaking limitations of similarity-based chunking, we design two adaptive chunking techniques based on uncertainty, namely Perplexity Chunking and Margin Sampling Chunking, by utilizing the logical perception capabilities of LLMs. Given the inherent complexity across different texts, we integrate meta-chunk with dynamic merging, striking a balance between fine-grained and coarse-grained text chunking. Furthermore, we establish the global information compensation mechanism, encompassing a two-stage hierarchical summary generation process and a three-stage text chunk rewriting procedure focused on missing reflection, refinement, and completion. These components collectively strengthen the semantic integrity and contextual coherence of chunks. Extensive experiments demonstrate that Meta-Chunking effectively addresses challenges of the chunking task within the RAG system, providing LLMs with more logically coherent text chunks. Additionally, our methodology validates the feasibility of implementing high-quality chunking tasks with smaller-scale models, thereby eliminating the reliance on robust instruction-following capabilities.

文本切分RAG大模型语义完整性

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。