ChatPaper.aiChatPaper

メタチャンキング:論理的知覚を介した効率的なテキストセグメンテーションの学習

Meta-Chunking: Learning Efficient Text Segmentation via Logical Perception

October 16, 2024
著者: Jihao Zhao, Zhiyuan Ji, Pengnian Qi, Simin Niu, Bo Tang, Feiyu Xiong, Zhiyu Li
cs.AI

要旨

Retrieval-Augmented Generation(RAG)は、大規模言語モデル(LLMs)に対する有効な補完として機能しますが、そのパイプライン内のテキストチャンキングという重要な側面がしばしば見落とされ、知識集約的なタスクの品質に影響を与えます。本論文では、文と段落の間の粒度であるMeta-Chunkingの概念を紹介します。これは、段落内の文のコレクションであり、深い言語論理的なつながりを持つ文から構成されています。Meta-Chunkingを実装するために、我々はLLMsに基づく2つの戦略を設計しました。Margin Sampling ChunkingとPerplexity Chunkingです。前者は、連続する文を分割する必要があるかどうかを二値分類するためにLLMsを使用し、マージンサンプリングから得られた確率の差に基づいて決定を行います。後者は、Perplexity分布の特性を分析することで、テキストチャンクの境界を正確に特定します。さらに、異なるテキストの固有の複雑さを考慮して、Meta-Chunkingと動的マージングを組み合わせて、細かい粒度と粗い粒度のテキストチャンキングのバランスを実現する戦略を提案します。11つのデータセットで実施された実験は、Meta-ChunkingがRAGに基づくシングルホップおよびマルチホップの質問応答の性能を効率的に向上させることができることを示しています。例えば、2WikiMultihopQAデータセットでは、Meta-Chunkingは類似性チャンキングを1.32上回り、わずか45.8%の時間しかかかりません。当該コードはhttps://github.com/IAAR-Shanghai/Meta-Chunkingで入手可能です。
English
Retrieval-Augmented Generation (RAG), while serving as a viable complement to large language models (LLMs), often overlooks the crucial aspect of text chunking within its pipeline, which impacts the quality of knowledge-intensive tasks. This paper introduces the concept of Meta-Chunking, which refers to a granularity between sentences and paragraphs, consisting of a collection of sentences within a paragraph that have deep linguistic logical connections. To implement Meta-Chunking, we designed two strategies based on LLMs: Margin Sampling Chunking and Perplexity Chunking. The former employs LLMs to perform binary classification on whether consecutive sentences need to be segmented, making decisions based on the probability difference obtained from margin sampling. The latter precisely identifies text chunk boundaries by analyzing the characteristics of perplexity distribution. Additionally, considering the inherent complexity of different texts, we propose a strategy that combines Meta-Chunking with dynamic merging to achieve a balance between fine-grained and coarse-grained text chunking. Experiments conducted on eleven datasets demonstrate that Meta-Chunking can more efficiently improve the performance of single-hop and multi-hop question answering based on RAG. For instance, on the 2WikiMultihopQA dataset, it outperforms similarity chunking by 1.32 while only consuming 45.8% of the time. Our code is available at https://github.com/IAAR-Shanghai/Meta-Chunking.

Summary

AI-Generated Summary

PDF244November 16, 2024