BatchDAG: LLM-Planned Execution Graphs for Scalable Ad-Hoc Analysis Over Enterprise Data

BatchDAG: LLM-Planned Execution Graphs for Scalable Ad-Hoc Analysis Over Enterprise Data

BatchDAG:用于企业数据可扩展即席分析的 LLM 规划执行图

Large language models (LLMs) excel at analyzing individual documents but break down on exhaustive, cross-entity analytical questions over enterprise-scale datasets due to context overflow, loss of per-entity attribution, and linear latency from sequential tool calls. 大型语言模型(LLM)在分析单个文档时表现出色,但在处理企业级数据集的详尽跨实体分析问题时却往往力不从心,这主要是由于上下文溢出、实体归因丢失以及顺序工具调用带来的线性延迟所致。

We present BatchDAG, a system in which an LLM generates a typed directed acyclic graph (DAG) of operations — SQL queries, semantic searches, in-memory transforms, parallel fan-outs, and single-shot analyses — which a deterministic engine evaluates with topological-wave parallelism and structured JSON data flow. 我们提出了 BatchDAG 系统,该系统由 LLM 生成包含各类操作(如 SQL 查询、语义搜索、内存转换、并行分发和单次分析)的类型化有向无环图(DAG),并由确定性引擎通过拓扑波并行计算和结构化 JSON 数据流进行评估。

A key optimization, entity-aware batching, groups rows by logical entity before fan-out, reducing LLM calls by up to 47x. BatchDAG is not primarily an accuracy improvement over hand-optimized pipelines; rather, it is a general-purpose orchestration layer that replaces multiple hand-engineered workflows with a single system that generates the appropriate execution strategy from natural language. 一项关键优化是“实体感知批处理”(entity-aware batching),它在分发前按逻辑实体对行进行分组,从而将 LLM 调用次数减少了高达 47 倍。BatchDAG 的主要目的并非在准确性上超越人工优化的流水线,而是一个通用的编排层,它用单一系统取代了多种手工设计的流程,能够根据自然语言自动生成合适的执行策略。

In controlled experiments on 12 transcript-heavy queries, BatchDAG (3.74/5) achieves quality comparable to an expert-designed pipeline (3.25/5) and significantly outperforms a ReAct agent (3.09/5, p<0.01), with superior provenance (77% transcript evidence rate vs. 46-60% for baselines). 在针对 12 个包含大量转录文本的查询进行的对照实验中,BatchDAG(3.74/5 分)达到了与专家设计流水线(3.25/5 分)相当的质量,并显著优于 ReAct 智能体(3.09/5 分,p<0.01),同时具备更优的溯源能力(转录证据率为 77%,而基准模型仅为 46-60%)。

A controlled ablation shows structured JSON intermediates reduce hallucinations by 27% versus prose summaries (paired t-test, p=0.107, n=12). The planner achieves 98.8% valid-DAG rate across 300 planning calls. 对照消融实验表明,与散文式摘要相比,结构化 JSON 中间结果将幻觉减少了 27%(配对 t 检验,p=0.107,n=12)。该规划器在 300 次规划调用中实现了 98.8% 的有效 DAG 生成率。

In production at this http URL, BatchDAG processes queries over 50,000+ meetings in under 60 seconds, with measured per-query costs of $0.02-$0.24 at published GPT-5.1 pricing. 在实际生产环境中,BatchDAG 能够在 60 秒内处理超过 50,000 场会议的查询,按照 GPT-5.1 的公开定价计算,单次查询成本仅为 0.02 至 0.24 美元。