DocETL: Agentic Query Rewriting and Evaluation for Complex Document Processing
On the map: LLM agents and tool use → Web, search, and research agents
Abstract (arXiv)
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.
Key facts. Cited by 49 papers in the map (data through 7 Oct 2026). Placed in Web, search, and research agents, one of 16 directions in LLM agents and tool use. Builds on 30 of its 103 references that are in the map. First posted on arXiv 16 Oct 2024.
Builds on
30 of 103 references.
Closest ancestors · 1
Same direction, newest first
Other references · 29
- 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,393
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
- 2024From Local to Global: A Graph RAG Approach to Query-Focused Summarizationcited by 1,411
- 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,378
- 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 871
- 2023Large Language Models Can Be Easily Distracted by Irrelevant Contextcited by 820
- 2023A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPTcited by 612
- 2024Generative Verifiers: Reward Modeling as Next-Token Predictioncited by 465
- 2023LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compressioncited by 443
- 2023JudgeLM: Fine-tuned Large Language Models are Scalable Judgescited by 351
- 2023Hard Prompts Made Easy: Gradient-Based Discrete Optimization for Prompt Tuning and Discoverycited by 329
- 2021CUAD: An Expert-Annotated NLP Dataset for Legal Contract Reviewcited by 232
17 more
- 2024Aligning with Human Judgement: The Role of Pairwise Preference in Large Language Model Evaluatorscited by 146
- 2024Who Validates the Validators? Aligning LLM-Assisted Evaluation of LLM Outputs with Human Preferencescited by 142
- 2024CHASE-SQL: Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQLcited by 132
- 2023Calibrated Language Models Must Hallucinatecited by 114
- 2023Language Models Enable Simple Systems for Generating Structured Views of Heterogeneous Data Lakescited by 101
- 2024On Limitations of the Transformer Architecturecited by 63
- 2017IDK Cascades: Fast Deep Learning by Learning not to Overthinkcited by 47
- 2024Confabulation: The Surprising Value of Large Language Model Hallucinationscited by 42
- 2017NoScope: Optimizing Neural Network Queries over Video at Scalecited by 37
- 2024A Declarative System for Optimizing AI Workloadscited by 35
- 2023CHORUS: Foundation Models for Unified Data Discovery and Explorationcited by 24
- 2024The Design of an LLM-powered Unstructured Analytics Systemcited by 20
- 2021DB-BERT: a Database Tuning Tool that "Reads the Manual"cited by 19
- 2024SPADE: Synthesizing Data Quality Assertions for Large Language Model Pipelinescited by 19
- 2023Revisiting Prompt Engineering via Declarative Crowdsourcingcited by 12
- 2023Observatory: Characterizing Embeddings of Relational Tablescited by 12
- 2023BioDEX: Large-Scale Biomedical Adverse Drug Event Extraction for Real-World Pharmacovigilancecited by 10
Built on by
Citing papers per year: 2025: 21; 2026: 28.
49 papers.
Sort:
By area:
- 2025Holistic Agent Leaderboard: The Missing Infrastructure for AI Agent Evaluationcited by 83
- 2026Atomix: Timely, Transactional Tool Use for Reliable Agentic Workflowscited by 27
- 2025Minions: Cost-efficient Collaboration Between On-device and Cloud Language Modelscited by 17
- 2025BookRAG: A Hierarchical Structure-aware Index-based Approach for Retrieval-Augmented Generation on Complex Documentscited by 16
- 2025ELT-Bench: An End-to-End Benchmark for Evaluating AI Agents on ELT Pipelinescited by 15
- 2025Abacus: A Cost-Based Optimizer for Semantic Operator Systemscited by 11
- 2025Cortex AISQL: A Production SQL Engine for Unstructured Datacited by 11
- 2025Toward Agentic AI: Generative Information Retrieval Inspired Intelligent Communications and Networkingcited by 9
- 2025Cut Costs, Not Accuracy: LLM-Powered Data Processing with Guaranteescited by 8
- 2025SemBench: A Benchmark for Semantic Query Processing Enginescited by 8
- 2026TOKI: A Bitemporal Operator Algebra for Contradiction Resolution in LLM-Agent Persistent Memorycited by 7
- 2025Visual Template Inference for Data Extraction from Documentscited by 6
37 more
- 2025Batch Query Processing and Optimization for Agentic Workflowscited by 6
- 2025PalimpChat: Declarative and Interactive AI analyticscited by 4
- 2025Can an LLM Induce a Graph? Investigating Memory Drift and Context Lengthcited by 3
- 2025Beyond Relational: Semantic-Aware Multi-Modal Analytics with LLM-Native Query Optimizationcited by 3
- 2026100x Cost & Latency Reduction: Performance Analysis of AI Query Approximation using Lightweight Proxy Modelscited by 3
- 2026Real-Time Trustworthiness Scoring for LLM Structured Outputs and Data Extractioncited by 3
- 2025ScaleDoc: Scaling LLM-based Predicates over Large Document Collectionscited by 2
- 2026DTBench: A Synthetic Benchmark for Document-to-Table Extractioncited by 2
- 2026Navigating Large-Scale Document Collections: MuDABench for Multi-Document Analytical QAcited by 2
- 2025Access Paths for Efficient Ordering with Large Language Modelscited by 1
- 2025DRAMA: Unifying Data Retrieval and Analysis for Open-Domain Analytic Queriescited by 1
- 2026GraphSeek: Next-Generation Graph Analytics with LLMscited by 1
- 2026Understanding LLM Performance Degradation in Multi-Instance Processing: The Roles of Instance Count and Context Lengthcited by 1
- 2026Credo: Declarative Control of LLM Pipelines via Beliefs and Policiescited by 1
- 2026HVM-GraphRAG: Holistic-View Multimodal Graph Retrieval-Augmented Generation on Complex Documentcited by 1
- 2026EnSI-RAG: Entity-Structure-Indexed Retrieval-Augmented Generation for Long-Document Question Answeringcited by 1
- 2025LLM-Powered Proactive Data Systemscited by 0
- 2025Legal Document Summarization: Enhancing Judicial Efficiency through Automation Detectioncited by 0
- 2025Can AI autonomously build, operate, and use the entire data stack?cited by 0
- 2025KathDB: Explainable Multimodal Database Management System with Human-AI Collaborationcited by 0
- 2026Autonomous Data Processing using Meta-Agentscited by 0
- 2026Demonstration of Pneuma-Seeker: Agentic System for Reifying and Fulfilling Information Needs on Tabular Datacited by 0
- 2026Agent-Aided Design for Dynamic CAD Modelscited by 0
- 2026Declarative Data Services: Structured Agentic Discovery for Composing Data Systemscited by 0
- 2026POIROT: Interrogating Agents for Failure Detection in Multi-Agent Systemscited by 0
- 2026ASMR: Agentic Schema Generation for Ship Maintenance Report Writingcited by 0
- 2026Kalypso: Relational LLM Servingcited by 0
- 2026Beyond Tables: Doc2DB-Bench for Relationally Faithful Document-to-Database Constructioncited by 0
- 2026Carnot: Interpretable, Interactive, and Optimized Execution of Deep Research Queriescited by 0
- 2026CTIFoundry: An Agent-Native Corpus Scaffold for Cyber Threat Intelligencecited by 0
- 2026SAGE: A Unified Algebra and Self-Adaptive Execution for AI Functions in SQLcited by 0
- 2026Compositional Online Learning for Semantic Data Processing Systemscited by 0
- 2026EnSIMem: Entity-Structured Indexing for Long-Term Agent Memorycited by 0
- 2026No More Free Lunch: Corpus Task Complexity Matters as Corpora Growcited by 0
- 2026Fail Loudly: An Auditable Runtime for Agentic Data Analysiscited by 0
- 2026Robust Hierarchical Structures for Agentic Document Analysiscited by 0
- 2026Towards Reliable AI Data Scientists: Data Agents with Workflow Harnessescited by 0
- 2026Towards Reliable AI Data Scientists: Data Agents with Workflow Harnesses28 Sep 2026
- 2026Robust Hierarchical Structures for Agentic Document Analysis27 Sep 2026
- 2026Fail Loudly: An Auditable Runtime for Agentic Data Analysis26 Sep 2026
- 2026No More Free Lunch: Corpus Task Complexity Matters as Corpora Grow24 Sep 2026
- 2026EnSIMem: Entity-Structured Indexing for Long-Term Agent Memory23 Sep 2026
- 2026Compositional Online Learning for Semantic Data Processing Systems27 Aug 2026
- 2026EnSI-RAG: Entity-Structure-Indexed Retrieval-Augmented Generation for Long-Document Question Answering21 Aug 2026
- 2026SAGE: A Unified Algebra and Self-Adaptive Execution for AI Functions in SQL21 Aug 2026
- 2026CTIFoundry: An Agent-Native Corpus Scaffold for Cyber Threat Intelligence19 Aug 2026
- 2026Carnot: Interpretable, Interactive, and Optimized Execution of Deep Research Queries10 Aug 2026
- 2026Beyond Tables: Doc2DB-Bench for Relationally Faithful Document-to-Database Construction9 Aug 2026
- 2026HVM-GraphRAG: Holistic-View Multimodal Graph Retrieval-Augmented Generation on Complex Document26 Jul 2026
37 more
- 2026Kalypso: Relational LLM Serving26 Jul 2026
- 2026ASMR: Agentic Schema Generation for Ship Maintenance Report Writing9 Jul 2026
- 2026TOKI: A Bitemporal Operator Algebra for Contradiction Resolution in LLM-Agent Persistent Memory4 Jun 2026
- 2026POIROT: Interrogating Agents for Failure Detection in Multi-Agent Systems1 Jun 2026
- 2026Declarative Data Services: Structured Agentic Discovery for Composing Data Systems20 May 2026
- 2026Navigating Large-Scale Document Collections: MuDABench for Multi-Document Analytical QA24 Apr 2026
- 2026Agent-Aided Design for Dynamic CAD Models16 Apr 2026
- 2026Demonstration of Pneuma-Seeker: Agentic System for Reifying and Fulfilling Information Needs on Tabular Data15 Apr 2026
- 2026Credo: Declarative Control of LLM Pipelines via Beliefs and Policies15 Apr 2026
- 2026Understanding LLM Performance Degradation in Multi-Instance Processing: The Roles of Instance Count and Context Length23 Mar 2026
- 2026100x Cost & Latency Reduction: Performance Analysis of AI Query Approximation using Lightweight Proxy Models16 Mar 2026
- 2026Real-Time Trustworthiness Scoring for LLM Structured Outputs and Data Extraction24 Feb 2026
- 2026Atomix: Timely, Transactional Tool Use for Reliable Agentic Workflows16 Feb 2026
- 2026DTBench: A Synthetic Benchmark for Document-to-Table Extraction14 Feb 2026
- 2026GraphSeek: Next-Generation Graph Analytics with LLMs11 Feb 2026
- 2026Autonomous Data Processing using Meta-Agents30 Jan 2026
- 2025KathDB: Explainable Multimodal Database Management System with Human-AI Collaboration11 Dec 2025
- 2025Can AI autonomously build, operate, and use the entire data stack?8 Dec 2025
- 2025BookRAG: A Hierarchical Structure-aware Index-based Approach for Retrieval-Augmented Generation on Complex Documents3 Dec 2025
- 2025Beyond Relational: Semantic-Aware Multi-Modal Analytics with LLM-Native Query Optimization25 Nov 2025
- 2025Cortex AISQL: A Production SQL Engine for Unstructured Data10 Nov 2025
- 2025SemBench: A Benchmark for Semantic Query Processing Engines3 Nov 2025
- 2025DRAMA: Unifying Data Retrieval and Analysis for Open-Domain Analytic Queries31 Oct 2025
- 2025Holistic Agent Leaderboard: The Missing Infrastructure for AI Agent Evaluation13 Oct 2025
- 2025Can an LLM Induce a Graph? Investigating Memory Drift and Context Length4 Oct 2025
- 2025ScaleDoc: Scaling LLM-based Predicates over Large Document Collections16 Sep 2025
- 2025Cut Costs, Not Accuracy: LLM-Powered Data Processing with Guarantees2 Sep 2025
- 2025Batch Query Processing and Optimization for Agentic Workflows2 Sep 2025
- 2025Access Paths for Efficient Ordering with Large Language Models30 Aug 2025
- 2025Legal Document Summarization: Enhancing Judicial Efficiency through Automation Detection25 Jul 2025
- 2025Abacus: A Cost-Based Optimizer for Semantic Operator Systems20 May 2025
- 2025ELT-Bench: An End-to-End Benchmark for Evaluating AI Agents on ELT Pipelines7 Apr 2025
- 2025Toward Agentic AI: Generative Information Retrieval Inspired Intelligent Communications and Networking24 Feb 2025
- 2025Minions: Cost-efficient Collaboration Between On-device and Cloud Language Models21 Feb 2025
- 2025LLM-Powered Proactive Data Systems18 Feb 2025
- 2025PalimpChat: Declarative and Interactive AI analytics5 Feb 2025
- 2025Visual Template Inference for Data Extraction from Documents11 Jan 2025
- 2025Holistic Agent Leaderboard: The Missing Infrastructure for AI Agent Evaluationcited by 83
- 2025ELT-Bench: An End-to-End Benchmark for Evaluating AI Agents on ELT Pipelinescited by 15
- 2025Toward Agentic AI: Generative Information Retrieval Inspired Intelligent Communications and Networkingcited by 9
- 2026TOKI: A Bitemporal Operator Algebra for Contradiction Resolution in LLM-Agent Persistent Memorycited by 7
- 2026Credo: Declarative Control of LLM Pipelines via Beliefs and Policiescited by 1
- 2026Demonstration of Pneuma-Seeker: Agentic System for Reifying and Fulfilling Information Needs on Tabular Datacited by 0
- 2026Agent-Aided Design for Dynamic CAD Modelscited by 0
- 2026Declarative Data Services: Structured Agentic Discovery for Composing Data Systemscited by 0
- 2026ASMR: Agentic Schema Generation for Ship Maintenance Report Writingcited by 0
- 2026Carnot: Interpretable, Interactive, and Optimized Execution of Deep Research Queriescited by 0
- 2026CTIFoundry: An Agent-Native Corpus Scaffold for Cyber Threat Intelligencecited by 0
- 2026Fail Loudly: An Auditable Runtime for Agentic Data Analysiscited by 0
12 most cited of 14 All 14 (JSON)
- 2026Towards Reliable AI Data Scientists: Data Agents with Workflow Harnesses28 Sep 2026
- 2026Robust Hierarchical Structures for Agentic Document Analysis27 Sep 2026
- 2026Fail Loudly: An Auditable Runtime for Agentic Data Analysis26 Sep 2026
- 2026CTIFoundry: An Agent-Native Corpus Scaffold for Cyber Threat Intelligence19 Aug 2026
- 2026Carnot: Interpretable, Interactive, and Optimized Execution of Deep Research Queries10 Aug 2026
- 2026ASMR: Agentic Schema Generation for Ship Maintenance Report Writing9 Jul 2026
- 2026TOKI: A Bitemporal Operator Algebra for Contradiction Resolution in LLM-Agent Persistent Memory4 Jun 2026
- 2026Declarative Data Services: Structured Agentic Discovery for Composing Data Systems20 May 2026
- 2026Agent-Aided Design for Dynamic CAD Models16 Apr 2026
- 2026Demonstration of Pneuma-Seeker: Agentic System for Reifying and Fulfilling Information Needs on Tabular Data15 Apr 2026
- 2026Credo: Declarative Control of LLM Pipelines via Beliefs and Policies15 Apr 2026
- 2025Holistic Agent Leaderboard: The Missing Infrastructure for AI Agent Evaluation13 Oct 2025
12 newest of 14 All 14 (JSON)
- 2025BookRAG: A Hierarchical Structure-aware Index-based Approach for Retrieval-Augmented Generation on Complex Documentscited by 16
- 2026HVM-GraphRAG: Holistic-View Multimodal Graph Retrieval-Augmented Generation on Complex Documentcited by 1
- 2026EnSI-RAG: Entity-Structure-Indexed Retrieval-Augmented Generation for Long-Document Question Answeringcited by 1
- 2026EnSI-RAG: Entity-Structure-Indexed Retrieval-Augmented Generation for Long-Document Question Answering21 Aug 2026
- 2026HVM-GraphRAG: Holistic-View Multimodal Graph Retrieval-Augmented Generation on Complex Document26 Jul 2026
- 2025BookRAG: A Hierarchical Structure-aware Index-based Approach for Retrieval-Augmented Generation on Complex Documents3 Dec 2025
- 2025Batch Query Processing and Optimization for Agentic Workflowscited by 6
- 2026Kalypso: Relational LLM Servingcited by 0
- 2026Kalypso: Relational LLM Serving26 Jul 2026
- 2025Batch Query Processing and Optimization for Agentic Workflows2 Sep 2025
- 2026Atomix: Timely, Transactional Tool Use for Reliable Agentic Workflowscited by 27
- 2025Abacus: A Cost-Based Optimizer for Semantic Operator Systemscited by 11
- 2025Cortex AISQL: A Production SQL Engine for Unstructured Datacited by 11
- 2025Cut Costs, Not Accuracy: LLM-Powered Data Processing with Guaranteescited by 8
- 2025SemBench: A Benchmark for Semantic Query Processing Enginescited by 8
- 2025Visual Template Inference for Data Extraction from Documentscited by 6
- 2025PalimpChat: Declarative and Interactive AI analyticscited by 4
- 2025Can an LLM Induce a Graph? Investigating Memory Drift and Context Lengthcited by 3
- 2025Beyond Relational: Semantic-Aware Multi-Modal Analytics with LLM-Native Query Optimizationcited by 3
- 2026100x Cost & Latency Reduction: Performance Analysis of AI Query Approximation using Lightweight Proxy Modelscited by 3
- 2026Real-Time Trustworthiness Scoring for LLM Structured Outputs and Data Extractioncited by 3
- 2025ScaleDoc: Scaling LLM-based Predicates over Large Document Collectionscited by 2
12 most cited of 28 All 28 (JSON)
- 2026No More Free Lunch: Corpus Task Complexity Matters as Corpora Grow24 Sep 2026
- 2026EnSIMem: Entity-Structured Indexing for Long-Term Agent Memory23 Sep 2026
- 2026Compositional Online Learning for Semantic Data Processing Systems27 Aug 2026
- 2026SAGE: A Unified Algebra and Self-Adaptive Execution for AI Functions in SQL21 Aug 2026
- 2026Beyond Tables: Doc2DB-Bench for Relationally Faithful Document-to-Database Construction9 Aug 2026
- 2026Navigating Large-Scale Document Collections: MuDABench for Multi-Document Analytical QA24 Apr 2026
- 2026Understanding LLM Performance Degradation in Multi-Instance Processing: The Roles of Instance Count and Context Length23 Mar 2026
- 2026100x Cost & Latency Reduction: Performance Analysis of AI Query Approximation using Lightweight Proxy Models16 Mar 2026
- 2026Real-Time Trustworthiness Scoring for LLM Structured Outputs and Data Extraction24 Feb 2026
- 2026Atomix: Timely, Transactional Tool Use for Reliable Agentic Workflows16 Feb 2026
- 2026DTBench: A Synthetic Benchmark for Document-to-Table Extraction14 Feb 2026
- 2026GraphSeek: Next-Generation Graph Analytics with LLMs11 Feb 2026
12 newest of 28 All 28 (JSON)
Similar, not cited
Close in wording, no citation either way
- 2026LongDA: Benchmarking LLM Agents for Long-Document Data Analysis
- 2025LLM/Agent-as-Data-Analyst: A Survey
- 2026GenDB: The Next Generation of Query Processing -- Synthesized, Not Engineered
- 2025Large Language Model-based Data Science Agent: A Survey
- 2026AV-SQL: Decomposing Complex Text-to-SQL Queries with Agentic Views
- 2025BAPPA: Benchmarking Agents, Plans, and Pipelines for Automated Text-to-SQL Generation
- 2026Gavel: Agent Meets Checklist for Evaluating LLMs on Long-Context Legal Summarization
- 2026Benchmarking Multi-Agent LLM Architectures for Financial Document Processing: A Comparative Study of Orchestration Patterns, Cost-Accuracy Tradeoffs and Production Scaling Strategies