arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2410.12189cs.DBcs.AI
收藏

DocETL:面向复杂文档处理的智能体查询重写与评估

DocETL: Agentic Query Rewriting and Evaluation for Complex Document Processing

UC Berkeley(加州大学伯克利分校);BIDS;Columbia University(哥伦比亚大学)

Shreya Shankar, Tristan Chambers, Tarak Shah, Aditya G. Parameswaran, Eugene Wu

AI总结:

针对LLM处理复杂非结构化数据准确性不足的问题,提出DocETL系统,通过基于智能体的查询重写与评估机制优化文档处理流水线,在多项任务中准确率提升25%至80%。

摘要:

分析非结构化数据一直是数据处理中的一项持久挑战。大型语言模型(LLMs)在此方面展现出了潜力,促使近期提出了用于非结构化数据处理的基于LLM的声明式框架。然而,这些框架侧重于在使用LLM执行用户指定操作时降低成本,而不是提高准确性,它们将大多数操作按原样执行(在单次LLM调用中)。这对于复杂任务和数据是有问题的,因为即使使用优化的提示,LLM对于用户定义操作的输出通常也不准确。例如,LLM可能难以在冗长的法律文件中识别特定条款(如不可抗力或赔偿)的所有实例,这需要对数据、任务或两者进行分解。我们提出了DocETL,这是一个优化复杂文档处理流水线的系统,同时考虑了LLM的缺陷。DocETL为用户提供了一个声明式接口来定义此类流水线,并使用基于智能体的方法自动优化它们,利用新颖的基于智能体的重写(我们称之为重写指令)以及优化和评估框架。我们引入了(i)专为基于LLM的任务定制的流水线逻辑重写,(ii)一种智能体引导的计划评估机制,该机制合成并编排特定于任务的验证提示,以及(iii)一种优化算法,该算法在考虑基于智能体的计划生成和评估的延迟的情况下,高效地寻找有前景的计划。我们在四个不同的非结构化文档分析任务上的评估表明,DocETL找到的计划,其输出比精心设计的基线准确率高25%至80%,解决了非结构化数据分析中的一个关键空白。DocETL在docetl.org开源,截至2025年3月,已获得超过1.7k个GitHub Stars,用户遍及多个领域。

英文摘要:

Analyzing unstructured data has been a persistent challenge in data processing. Large Language Models (LLMs) have shown promise in this regard, leading to recent proposals for declarative frameworks for LLM-powered processing of unstructured data. However, these frameworks focus on reducing cost when executing user-specified operations using LLMs, rather than improving accuracy, executing most operations as-is (in a single LLM call). This is problematic for complex tasks and data, where LLM outputs for user-defined operations are often inaccurate, even with optimized prompts. For example, an LLM may struggle to identify {\em all} instances of specific clauses, like force majeure or indemnification, in lengthy legal documents, requiring decomposition of the data, the task, or both. We present DocETL, a system that optimizes complex document processing pipelines, while accounting for LLM shortcomings. DocETL offers a declarative interface for users to define such pipelines and uses an agent-based approach to automatically optimize them, leveraging novel agent-based rewrites (that we call rewrite directives), as well as an optimization and evaluation framework. We introduce (i) logical rewriting of pipelines, tailored for LLM-based tasks, (ii) an agent-guided plan evaluation mechanism that synthesizes and orchestrates task-specific validation prompts, and (iii) an optimization algorithm that efficiently finds promising plans, considering the latencies of agent-based plan generation and evaluation. Our evaluation on four different unstructured document analysis tasks demonstrates that DocETL finds plans with outputs that are 25 to 80% more accurate than well-engineered baselines, addressing a critical gap in unstructured data analysis. DocETL is open-source at docetl.org, and as of March 2025, has amassed over 1.7k GitHub Stars, with users spanning a variety of domains.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑