English

Mix-of-Granularity: Optimize the Chunking Granularity for Retrieval-Augmented Generation

Machine Learning 2025-01-28 v2 Artificial Intelligence Computation and Language

Abstract

Integrating information from various reference databases is a major challenge for Retrieval-Augmented Generation (RAG) systems because each knowledge source adopts a unique data structure and follows different conventions. Retrieving from multiple knowledge sources with one fixed strategy usually leads to under-exploitation of information. To mitigate this drawback, inspired by Mix-of-Expert, we introduce Mix-of-Granularity (MoG), a method that dynamically determines the optimal granularity of a knowledge source based on input queries using a router. The router is efficiently trained with a newly proposed loss function employing soft labels. We further extend MoG to MoG-Graph (MoGG), where reference documents are pre-processed as graphs, enabling the retrieval of distantly situated snippets. Experiments demonstrate that MoG and MoGG effectively predict optimal granularity levels, significantly enhancing the performance of the RAG system in downstream tasks. The code of both MoG and MoGG are released in https://github.com/ZGChung/Mix-of-Granularity.

Keywords

Cite

@article{arxiv.2406.00456,
  title  = {Mix-of-Granularity: Optimize the Chunking Granularity for Retrieval-Augmented Generation},
  author = {Zijie Zhong and Hanwen Liu and Xiaoya Cui and Xiaofan Zhang and Zengchang Qin},
  journal= {arXiv preprint arXiv:2406.00456},
  year   = {2025}
}

Comments

COLING 2025 conference paper. 19 pages, 6 figures and 11 tables

R2 v1 2026-06-28T16:49:37.467Z