Mix-of-Granularity:优化检索增强生成的分块粒度
Mix-of-Granularity: Optimize the Chunking Granularity for Retrieval-Augmented Generation
AI总结:
针对RAG系统多知识源固定检索策略导致信息利用不足的问题,提出MoG方法利用路由器动态确定最佳分块粒度,并扩展为MoGG以图结构检索远距离片段,显著提升下游任务性能。
摘要:
整合来自不同参考数据库的信息是检索增强生成(RAG)系统面临的一项重大挑战,因为每个知识源采用独特的数据结构并遵循不同的规范。用一种固定策略从多个知识源进行检索通常会导致信息利用不足。为了缓解这一缺陷,受Mix-of-Expert启发,我们引入了Mix-of-Granularity (MoG),这是一种利用路由器根据输入查询动态确定知识源最佳粒度的方法。该路由器使用一种采用软标签的新提出的损失函数进行高效训练。我们进一步将MoG扩展为MoG-Graph (MoGG),其中参考文档被预处理为图,从而能够检索到距离较远的文本片段。实验表明,MoG和MoGG能有效预测最佳粒度级别,显著提升了RAG系统在下游任务中的性能。MoG和MoGG的代码已在https://github.com/ZGChung/Mix-of-Granularity发布。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。