2024-12-04 · 专家 · 机器学习 · 自然语言处理

OCR Hinders RAG: Evaluating the Cascading Impact of OCR on Retrieval-Augmented Generation

本文提出了OHRBench,一个用于评估OCR对RAG系统影响的开源问答基准,并通过实验揭示了当前OCR解决方案的局限性及其对RAG性能的影响。

更新于 2024-12-04。作者:Junyuan Zhang、Qintong Zhang、Bin Wang、Linke Ouyang、Zichen Wen、Ying Li、Ka-Ho Chow、Conghui He、Wentao Zhang。

中文摘要

检索增强生成(Retrieval-augmented Generation, RAG)通过整合外部知识来增强大型语言模型(Large Language Models, LLMs),从而减少幻觉并无需重新训练即可融入最新信息。作为RAG的关键部分,外部知识库通常是通过使用光学字符识别(Optical Character Recognition, OCR)从非结构化的PDF文档中提取结构化数据来构建的。然而,鉴于OCR预测的不完善以及结构化数据固有的非均匀表示,知识库不可避免地会包含各种OCR噪声。在本文中,我们介绍了OHRBench,这是第一个用于理解OCR对RAG系统级联影响的基准。OHRBench包含了来自六个真实世界RAG应用领域的350篇精心挑选的非结构化PDF文档,以及从文档的多模态元素中提取的问答。这挑战了现有用于RAG的OCR解决方案。为了更好地理解OCR对RAG系统的影响,我们确定了两种主要的OCR噪声类型:语义噪声和格式化噪声,并通过扰动生成一系列具有不同程度每种OCR噪声的结构化数据。使用OHRBench,我们首先对当前的OCR解决方案进行了全面的评估,并揭示了没有一种是能够构建高质量知识库的RAG系统。然后,我们系统地评估了这两种噪声类型的影响,并证明了RAG系统的脆弱性。此外,我们讨论了在RAG系统中不使用OCR而采用视觉-语言模型(Vision-Language Models, VLMs)的潜力。代码:https://github.com/opendatalab/OHR-Bench

英文摘要

Retrieval-augmented Generation (RAG) enhances Large Language Models (LLMs) by integrating external knowledge to reduce hallucinations and incorporate up-to-date information without retraining. As an essential part of RAG, external knowledge bases are commonly built by extracting structured data from unstructured PDF documents using Optical Character Recognition (OCR). However, given the imperfect prediction of OCR and the inherent non-uniform representation of structured data, knowledge bases inevitably contain various OCR noises. In this paper, we introduce OHRBench, the first benchmark for understanding the cascading impact of OCR on RAG systems. OHRBench includes 350 carefully selected unstructured PDF documents from six real-world RAG application domains, along with Q&As derived from multimodal elements in documents, challenging existing OCR solutions used for RAG To better understand OCR's impact on RAG systems, we identify two primary types of OCR noise: Semantic Noise and Formatting Noise and apply perturbation to generate a set of structured data with varying degrees of each OCR noise. Using OHRBench, we first conduct a comprehensive evaluation of current OCR solutions and reveal that none is competent for constructing high-quality knowledge bases for RAG systems. We then systematically evaluate the impact of these two noise types and demonstrate the vulnerability of RAG systems. Furthermore, we discuss the potential of employing Vision-Language Models (VLMs) without OCR in RAG systems. Code: https://github.com/opendatalab/OHR-Bench

解读

一句话总结

本文提出了OHRBench,一个用于评估OCR对RAG系统影响的开源问答基准,并通过实验揭示了当前OCR解决方案的局限性及其对RAG性能的影响。

问题1:这篇论文想要解决什么具体问题?

• 问题背景:RAG系统依赖OCR从非结构化PDF文档中提取结构化数据来构建知识库,但OCR的不完美预测和非统一的数据表示导致知识库中存在各种OCR噪声。 • 现有方案不足:现有的OCR解决方案无法完全避免OCR噪声,且缺乏评估OCR对RAG系统影响的基准。 • 研究目标:构建OHRBench基准,评估OCR对RAG系统的影响,并提出改进OCR解决方案和RAG系统的建议。

问题2:论文的核心创新点是什么?

• 技术创新:提出OHRBench基准,包含来自六个实际RAG应用领域的PDF文档和Q&A数据,并引入两种主要OCR噪声类型:语义噪声和格式噪声。 • 方法改进:通过OHRBench基准评估当前OCR解决方案的性能,并分析不同OCR噪声对RAG系统的影响。 • 优势:为OCR解决方案和RAG系统提供了一种新的评估方法,有助于改进OCR解决方案和RAG系统。

问题3:实验结果如何验证了方法的有效性?

• 关键实验:在OHRBench基准上评估了多种OCR解决方案,并分析了不同OCR噪声对RAG系统的影响。 • 性能提升:实验结果表明,当前的OCR解决方案在构建高质量的RAG知识库方面存在局限性,且OCR噪声对RAG系统性能有显著的负面影响。 • 对比结果:与基线方法相比,OHRBench基准能够更全面地评估OCR对RAG系统的影响。

问题4:这个研究的实际应用价值是什么?

• 应用场景:OHRBench基准可用于评估和改进OCR解决方案和RAG系统,适用于各种需要从非结构化文档中提取结构化数据的场景。 • 实施建议:建议在RAG系统中采用更鲁棒的OCR解决方案,并探索使用视觉语言模型来避免OCR的必要性。 • 局限与展望:OHRBench基准的构建和评估需要大量的人力和时间投入,未来可以探索自动化评估方法。此外,OHRBench基准的适用范围可以进一步扩展,以涵盖更多类型的非结构化文档。

来源

机器可读索引:llms.txt