多目标代理重写用于无结构数据处理
Multi-Objective Agentic Rewrites for Unstructured Data Processing
AI总结:
MOAR通过引入新的指令类别和全局搜索算法,提升DocETL在准确性和成本上的优化能力,实现更高的准确性并匹配最佳成本。
摘要:
一年前,我们开源了DocETL,一个基于LLM的数据处理声明式系统,截至2026年3月已有3700颗GitHub星标。在DocETL中,用户通过组合自然语言描述的运算符(也称为语义运算符)构建管道,由LLM执行每个运算符的逻辑。然而,由于运算符或其操作数据的复杂性,LLM常给出不准确的结果。为解决这一挑战,DocETL引入了重写指令,即指导LLM代理重写管道的抽象规则,例如将单个过滤器分解为两个独立的语义过滤器可能提高准确性。然而,DocETL仅优化准确性,不考虑成本。如何同时优化二者?我们提出了MOAR(多目标代理重写),一种新的DocETL优化器。为针对成本优化,我们引入了两种新的指令类别,并扩展了所有三个现有类别,总计超过30种指令,比DocETL最初多一倍。此外,由于LLM行为导致运算符之间可能产生不可预测的交互,单独优化运算符或子管道可能产生次优的整体计划。鉴于此,我们设计了一种新的全局搜索算法,探索重写时考虑整个管道的上下文。由于重写空间是无限的——管道可以以多种方式重写,而每个重写后的管道本身也可以被重写——我们的算法采用多臂老虎机框架来优先选择重写哪些管道。在六个工作负载上,MOAR的准确性比ABACUS(次优优化器)高27%,同时在55%的成本下匹配其最佳准确性。
英文摘要:
One year ago, we open-sourced DocETL, a declarative system for LLM-powered data processing that, as of March 2026, has 3.7K GitHub stars and users across domains (e.g., journalism, law, medicine, policy, finance, and urban planning). In DocETL, users build pipelines by composing operators described in natural language, also known as semantic operators, with an LLM executing each operator's logic. However, due to complexity in the operator or the data it operates on, LLMs often give inaccurate results. To address this challenge, DocETL introduced rewrite directives, or abstract rules that guide LLM agents in rewriting pipelines by decomposing operators or data. For example, decomposing a single filter("is this email sent from an executive and discussing fraud?") into the conjunction of two separate semantic filters may improve accuracy. However, DocETL only optimizes for accuracy, not cost. How do we optimize for both? We present MOAR (Multi-Objective Agentic Rewrites), a new optimizer for DocETL. To target cost optimization, we introduce two new categories of directives and extend all three existing categories with new ones, bringing the total to over 30 directives -- more than doubling what DocETL originally had. Moreover, since operators can interact with each other unpredictably due to LLM behavior, optimizing operators or sub-pipelines individually can yield suboptimal overall plans. Recognizing this, we design a new global search algorithm that explores rewrites in the context of entire pipelines. Since the space of rewrites is infinite -- pipelines can be rewritten in many ways, and each rewritten pipeline can itself be rewritten -- our algorithm adapts a multi-armed bandit framework to prioritize which pipelines to rewrite. Across six workloads, MOAR achieves 27% higher accuracy than ABACUS, the next-best optimizer, while matching its best accuracy at 55% of its cost.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。