链载Ai

标题: 语义分块真的有效吗? [打印本页]

作者: 链载Ai    时间: 昨天 11:40
标题: 语义分块真的有效吗?

ingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; letter-spacing: 0.75px; white-space: normal; padding-top: 8px; padding-bottom: 8px; line-height: 26px;">最近看到一篇有意思的论文《Is Semantic Chunking Worth the Computational Cost?[1]》,论文探讨了在检索增强型生成(Retrieval-Augmented Generation, RAG)系统中,语义分块(semantic chunking)与传统固定大小分块(fixed-size chunking)的效率和性能比较。

ingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; letter-spacing: 0.75px; white-space: normal; padding-top: 8px; padding-bottom: 8px; line-height: 26px;">语义分块旨在通过将文档分割成语义上连贯的段落来提高检索性能。尽管语义分块越来越受欢迎,但其相对于固定大小分块的实际好处仍然不清楚。这项研究系统地评估了语义分块的有效性,使用了三个常见的与检索相关的任务:文档检索、证据检索和基于检索的答案生成。

ingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; letter-spacing: 0.75px; white-space: normal; padding-top: 8px; padding-bottom: 8px; line-height: 26px;">为了测试对比语义分块是否有效,作者设计了 3 种分块策略,如下图所示。


ingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; font-size: 15px; letter-spacing: 0.75px; white-space: normal; margin-top: 10px; margin-bottom: 10px;">


ingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; letter-spacing: 0.75px; white-space: normal; min-height: 32px; line-height: 28px; color: rgb(119, 48, 152); border-bottom: 1px solid rgb(119, 48, 152); border-top-color: rgb(119, 48, 152); border-right-color: rgb(119, 48, 152); border-left-color: rgb(119, 48, 152); font-size: 22px; margin: 1em auto; padding-top: 0.5em; padding-bottom: 0.5em; text-align: center; width: 367.617px; display: flex; flex-direction: column; justify-content: center;">文档检索

ingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; letter-spacing: 0.75px; white-space: normal; padding-top: 8px; padding-bottom: 8px; line-height: 26px;">文档检索测试结果如下表所示。大部分场景都没有明显的差距,除了 Miracl 和 NQ。而这些标*的表示这些都是基于一些较短的句子缝合到一起的,本身句子之间具有较强的独立性。

DatasetFixed-sizeBreakpointClustering
Miracl*69.4581.8967.35
NQ*43.7963.9341.01
Scidocs*16.8217.6019.87
Scifact*35.2736.2735.70
BioASQ*61.8661.8762.49
NFCorpus*21.3621.0722.12
HotpotQA90.5987.3784.79
MSMARCO93.5892.2393.18
ConditionalQA68.1164.4465.94
Qasper90.9989.2790.77

ingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; letter-spacing: 0.75px; white-space: normal; min-height: 32px; line-height: 28px; color: rgb(119, 48, 152); border-bottom: 1px solid rgb(119, 48, 152); border-top-color: rgb(119, 48, 152); border-right-color: rgb(119, 48, 152); border-left-color: rgb(119, 48, 152); font-size: 22px; margin: 1em auto; padding-top: 0.5em; padding-bottom: 0.5em; text-align: center; width: 367.617px; display: flex; flex-direction: column; justify-content: center;">证据检索

ingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; letter-spacing: 0.75px; white-space: normal; padding-top: 8px; padding-bottom: 8px; line-height: 26px;">证据检索结果如下表所示。在这种测试下,三者几乎不存在差异。

DatasetFixed-sizeBreakpointClustering
ExpertQA47.1147.0846.87
DelucionQA43.0543.2443.36
TechQA28.9828.4927.96
ConditionalQA18.2319.8319.14
Qasper8.668.168.50

ingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif; letter-spacing: 0.75px; white-space: normal; min-height: 32px; line-height: 28px; color: rgb(119, 48, 152); border-bottom: 1px solid rgb(119, 48, 152); border-top-color: rgb(119, 48, 152); border-right-color: rgb(119, 48, 152); border-left-color: rgb(119, 48, 152); font-size: 22px; margin: 1em auto; padding-top: 0.5em; padding-bottom: 0.5em; text-align: center; width: 367.617px; display: flex; flex-direction: column; justify-content: center;">答案生成

基于检索的答案生成测试如下表所示,可以说没有任何区别。

DatasetFixed-sizeBreakpointClustering
ExpertQA0.650.650.65
DelucionQA0.760.760.76
TechQA0.680.680.68
ConditionalQA0.420.430.43
Qasper0.490.490.50

总结

研究结果表明,语义分块的计算成本并没有通过一致的性能提升来证明其合理性。这些发现挑战了之前关于语义分块的假设,并强调了在 RAG 系统中需要更有效的分块策略。总体而言,固定大小分块对于实际的 RAG 应用来说仍然是一个更有效和可靠的选择。






欢迎光临 链载Ai (https://www.lianzai.com/) Powered by Discuz! X3.5