mlsanityData to 7 Oct 2026

DocETL: Agentic Query Rewriting and Evaluation for Complex Document Processing

arXiv 2410.12189 ↗First posted 16 Oct 2024cs.DB cs.AIcited by 49

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

  1. 2024CleanAgent: Automating Data Standardization with LLM-based Agents13 Mar

Other references · 29

  1. 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,393
  2. 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
  3. 2024From Local to Global: A Graph RAG Approach to Query-Focused Summarizationcited by 1,411
  4. 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,378
  5. 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 871
  6. 2023Large Language Models Can Be Easily Distracted by Irrelevant Contextcited by 820
  7. 2023A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPTcited by 612
  8. 2024Generative Verifiers: Reward Modeling as Next-Token Predictioncited by 465
  9. 2023LongLLMLingua: Accelerating and Enhancing LLMs in Long Context Scenarios via Prompt Compressioncited by 443
  10. 2023JudgeLM: Fine-tuned Large Language Models are Scalable Judgescited by 351
  11. 2023Hard Prompts Made Easy: Gradient-Based Discrete Optimization for Prompt Tuning and Discoverycited by 329
  12. 2021CUAD: An Expert-Annotated NLP Dataset for Legal Contract Reviewcited by 232
17 more
  1. 2024Aligning with Human Judgement: The Role of Pairwise Preference in Large Language Model Evaluatorscited by 146
  2. 2024Who Validates the Validators? Aligning LLM-Assisted Evaluation of LLM Outputs with Human Preferencescited by 142
  3. 2024CHASE-SQL: Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQLcited by 132
  4. 2023Calibrated Language Models Must Hallucinatecited by 114
  5. 2023Language Models Enable Simple Systems for Generating Structured Views of Heterogeneous Data Lakescited by 101
  6. 2024On Limitations of the Transformer Architecturecited by 63
  7. 2017IDK Cascades: Fast Deep Learning by Learning not to Overthinkcited by 47
  8. 2024Confabulation: The Surprising Value of Large Language Model Hallucinationscited by 42
  9. 2017NoScope: Optimizing Neural Network Queries over Video at Scalecited by 37
  10. 2024A Declarative System for Optimizing AI Workloadscited by 35
  11. 2023CHORUS: Foundation Models for Unified Data Discovery and Explorationcited by 24
  12. 2024The Design of an LLM-powered Unstructured Analytics Systemcited by 20
  13. 2021DB-BERT: a Database Tuning Tool that "Reads the Manual"cited by 19
  14. 2024SPADE: Synthesizing Data Quality Assertions for Large Language Model Pipelinescited by 19
  15. 2023Revisiting Prompt Engineering via Declarative Crowdsourcingcited by 12
  16. 2023Observatory: Characterizing Embeddings of Relational Tablescited by 12
  17. 2023BioDEX: Large-Scale Biomedical Adverse Drug Event Extraction for Real-World Pharmacovigilancecited by 10

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 21; 2026: 28.

49 papers.

Sort:

By area:

  1. 2025Holistic Agent Leaderboard: The Missing Infrastructure for AI Agent Evaluationcited by 83
  2. 2026Atomix: Timely, Transactional Tool Use for Reliable Agentic Workflowscited by 27
  3. 2025Minions: Cost-efficient Collaboration Between On-device and Cloud Language Modelscited by 17
  4. 2025BookRAG: A Hierarchical Structure-aware Index-based Approach for Retrieval-Augmented Generation on Complex Documentscited by 16
  5. 2025ELT-Bench: An End-to-End Benchmark for Evaluating AI Agents on ELT Pipelinescited by 15
  6. 2025Abacus: A Cost-Based Optimizer for Semantic Operator Systemscited by 11
  7. 2025Cortex AISQL: A Production SQL Engine for Unstructured Datacited by 11
  8. 2025Toward Agentic AI: Generative Information Retrieval Inspired Intelligent Communications and Networkingcited by 9
  9. 2025Cut Costs, Not Accuracy: LLM-Powered Data Processing with Guaranteescited by 8
  10. 2025SemBench: A Benchmark for Semantic Query Processing Enginescited by 8
  11. 2026TOKI: A Bitemporal Operator Algebra for Contradiction Resolution in LLM-Agent Persistent Memorycited by 7
  12. 2025Visual Template Inference for Data Extraction from Documentscited by 6
37 more
  1. 2025Batch Query Processing and Optimization for Agentic Workflowscited by 6
  2. 2025PalimpChat: Declarative and Interactive AI analyticscited by 4
  3. 2025Can an LLM Induce a Graph? Investigating Memory Drift and Context Lengthcited by 3
  4. 2025Beyond Relational: Semantic-Aware Multi-Modal Analytics with LLM-Native Query Optimizationcited by 3
  5. 2026100x Cost & Latency Reduction: Performance Analysis of AI Query Approximation using Lightweight Proxy Modelscited by 3
  6. 2026Real-Time Trustworthiness Scoring for LLM Structured Outputs and Data Extractioncited by 3
  7. 2025ScaleDoc: Scaling LLM-based Predicates over Large Document Collectionscited by 2
  8. 2026DTBench: A Synthetic Benchmark for Document-to-Table Extractioncited by 2
  9. 2026Navigating Large-Scale Document Collections: MuDABench for Multi-Document Analytical QAcited by 2
  10. 2025Access Paths for Efficient Ordering with Large Language Modelscited by 1
  11. 2025DRAMA: Unifying Data Retrieval and Analysis for Open-Domain Analytic Queriescited by 1
  12. 2026GraphSeek: Next-Generation Graph Analytics with LLMscited by 1
  13. 2026Understanding LLM Performance Degradation in Multi-Instance Processing: The Roles of Instance Count and Context Lengthcited by 1
  14. 2026Credo: Declarative Control of LLM Pipelines via Beliefs and Policiescited by 1
  15. 2026HVM-GraphRAG: Holistic-View Multimodal Graph Retrieval-Augmented Generation on Complex Documentcited by 1
  16. 2026EnSI-RAG: Entity-Structure-Indexed Retrieval-Augmented Generation for Long-Document Question Answeringcited by 1
  17. 2025LLM-Powered Proactive Data Systemscited by 0
  18. 2025Legal Document Summarization: Enhancing Judicial Efficiency through Automation Detectioncited by 0
  19. 2025Can AI autonomously build, operate, and use the entire data stack?cited by 0
  20. 2025KathDB: Explainable Multimodal Database Management System with Human-AI Collaborationcited by 0
  21. 2026Autonomous Data Processing using Meta-Agentscited by 0
  22. 2026Demonstration of Pneuma-Seeker: Agentic System for Reifying and Fulfilling Information Needs on Tabular Datacited by 0
  23. 2026Agent-Aided Design for Dynamic CAD Modelscited by 0
  24. 2026Declarative Data Services: Structured Agentic Discovery for Composing Data Systemscited by 0
  25. 2026POIROT: Interrogating Agents for Failure Detection in Multi-Agent Systemscited by 0
  26. 2026ASMR: Agentic Schema Generation for Ship Maintenance Report Writingcited by 0
  27. 2026Kalypso: Relational LLM Servingcited by 0
  28. 2026Beyond Tables: Doc2DB-Bench for Relationally Faithful Document-to-Database Constructioncited by 0
  29. 2026Carnot: Interpretable, Interactive, and Optimized Execution of Deep Research Queriescited by 0
  30. 2026CTIFoundry: An Agent-Native Corpus Scaffold for Cyber Threat Intelligencecited by 0
  31. 2026SAGE: A Unified Algebra and Self-Adaptive Execution for AI Functions in SQLcited by 0
  32. 2026Compositional Online Learning for Semantic Data Processing Systemscited by 0
  33. 2026EnSIMem: Entity-Structured Indexing for Long-Term Agent Memorycited by 0
  34. 2026No More Free Lunch: Corpus Task Complexity Matters as Corpora Growcited by 0
  35. 2026Fail Loudly: An Auditable Runtime for Agentic Data Analysiscited by 0
  36. 2026Robust Hierarchical Structures for Agentic Document Analysiscited by 0
  37. 2026Towards Reliable AI Data Scientists: Data Agents with Workflow Harnessescited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2026LongDA: Benchmarking LLM Agents for Long-Document Data Analysis
  2. 2025LLM/Agent-as-Data-Analyst: A Survey
  3. 2026GenDB: The Next Generation of Query Processing -- Synthesized, Not Engineered
  4. 2025Large Language Model-based Data Science Agent: A Survey
  5. 2026AV-SQL: Decomposing Complex Text-to-SQL Queries with Agentic Views
  6. 2025BAPPA: Benchmarking Agents, Plans, and Pipelines for Automated Text-to-SQL Generation
  7. 2026Gavel: Agent Meets Checklist for Evaluating LLMs on Long-Context Legal Summarization
  8. 2026Benchmarking Multi-Agent LLM Architectures for Financial Document Processing: A Comparative Study of Orchestration Patterns, Cost-Accuracy Tradeoffs and Production Scaling Strategies