利用大型语言模型实现准确高效的文档分析
Towards Accurate and Efficient Document Analytics with Large Language Models
AI总结:
本文提出ZenDB文档分析系统,利用模板化文档的语义层次结构并结合LLM,支持通过SQL对文档集合执行即席分析查询,在降低成本的同时显著提升精确率与召回率。
摘要:
非结构化数据格式占当前存储数据的80%以上,而从此类格式中提取价值仍然是一项相当大的挑战。特别是,当前用于管理非结构化文档的方法不支持对文档集合进行即席分析查询。此外,将大型语言模型(LLM)直接应用于文档本身,或通过检索增强生成(RAG)过程应用于文档片段,都无法提供高精度的查询结果,而且在仅使用LLM的情况下,还会产生高昂成本。由于集合中的许多非结构化文档通常遵循相似的模板,这些模板赋予了共同的语义结构,因此我们推出了ZenDB,这是一个文档分析系统,利用这种语义结构并结合LLM,来回答针对文档集合的即席SQL查询。ZenDB可高效地从这些模板化文档中提取语义层次结构,并引入了一种新型查询引擎,利用这些结构实现准确且具有成本效益的查询执行。用户可以完全通过SQL为其文档施加模式并对其进行查询。在三个真实世界文档集合上进行的大量实验证明了ZenDB的优势:与基于LLM的基线相比,它可实现高达30%的成本节约,同时保持或提高准确性;并且在精确率上超过基于RAG的基线高达61%,在召回率上超过其高达80%,而成本仅略有增加。
英文摘要:
Unstructured data formats account for over 80% of the data currently stored, and extracting value from such formats remains a considerable challenge. In particular, current approaches for managing unstructured documents do not support ad-hoc analytical queries on document collections. Moreover, Large Language Models (LLMs) directly applied to the documents themselves, or on portions of documents through a process of Retrieval-Augmented Generation (RAG), fail to provide high accuracy query results, and in the LLM-only case, additionally incur high costs. Since many unstructured documents in a collection often follow similar templates that impart a common semantic structure, we introduce ZenDB, a document analytics system that leverages this semantic structure, coupled with LLMs, to answer ad-hoc SQL queries on document collections. ZenDB efficiently extracts semantic hierarchical structures from such templatized documents, and introduces a novel query engine that leverages these structures for accurate and cost-effective query execution. Users can impose a schema on their documents, and query it, all via SQL. Extensive experiments on three real-world document collections demonstrate ZenDB's benefits, achieving up to 30% cost savings compared to LLM-based baselines, while maintaining or improving accuracy, and surpassing RAG-based baselines by up to 61% in precision and 80% in recall, at a marginally higher cost.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。