Table of Contents
Fetching ...

Steering Semantic Data Processing With DocWrangler

Shreya Shankar, Bhavya Chopra, Mawil Hasan, Stephen Lee, Björn Hartmann, Joseph M. Hellerstein, Aditya G. Parameswaran, Eugene Wu

TL;DR

DocWrangler tackles the challenge of scalable semantic data processing on unstructured text by introducing a mixed-initiative IDE that treats LLMs as semantic operators. Its three core innovations—in-situ user notes, LLM-assisted prompt refinement, and LLM-assisted operation decomposition—address the gulfs of comprehension, specification, and generalization, respectively. Through a think-aloud study with 10 participants and a real-world deployment with 1,500+ sessions, the work demonstrates how users transform open-ended tasks into structured classifications, iteratively refine pipelines, and rely on decomposition to manage complex operations. The findings illuminate practical impacts on data analysis workflows and offer design guidance for future human-AI collaborative data systems that integrate data visibility, prompt engineering, and automated decomposition.

Abstract

Unstructured text has long been difficult to automatically analyze at scale. Large language models (LLMs) now offer a way forward by enabling {\em semantic data processing}, where familiar data processing operators (e.g., map, reduce, filter) are powered by LLMs instead of code. However, building effective semantic data processing pipelines presents a departure from traditional data pipelines: users need to understand their data to write effective pipelines, yet they need to construct pipelines to extract the data necessary for that understanding -- all while navigating LLM idiosyncrasies and inconsistencies. We present \docwrangler, a mixed-initiative integrated development environment (IDE) for semantic data processing with three novel features to address the gaps between the user, their data, and their pipeline: {\em (i) In-Situ User Notes} that allows users to inspect, annotate, and track observations across documents and LLM outputs, {\em (ii) LLM-Assisted Prompt Refinement} that transforms user notes into improved operations, and {\em (iii) LLM-Assisted Operation Decomposition} that identifies when operations or documents are too complex for the LLM to correctly process and suggests decompositions. Our evaluation combines a think-aloud study with 10 participants and a public-facing deployment (available at \href{https://docetl.org/playground}{docetl.org/playground}) with 1,500+ recorded sessions, revealing how users develop systematic strategies for their semantic data processing tasks; e.g., transforming open-ended operations into classifiers for easier validation and intentionally using vague prompts to learn more about their data or LLM capabilities.

Steering Semantic Data Processing With DocWrangler

TL;DR

DocWrangler tackles the challenge of scalable semantic data processing on unstructured text by introducing a mixed-initiative IDE that treats LLMs as semantic operators. Its three core innovations—in-situ user notes, LLM-assisted prompt refinement, and LLM-assisted operation decomposition—address the gulfs of comprehension, specification, and generalization, respectively. Through a think-aloud study with 10 participants and a real-world deployment with 1,500+ sessions, the work demonstrates how users transform open-ended tasks into structured classifications, iteratively refine pipelines, and rely on decomposition to manage complex operations. The findings illuminate practical impacts on data analysis workflows and offer design guidance for future human-AI collaborative data systems that integrate data visibility, prompt engineering, and automated decomposition.

Abstract

Unstructured text has long been difficult to automatically analyze at scale. Large language models (LLMs) now offer a way forward by enabling {\em semantic data processing}, where familiar data processing operators (e.g., map, reduce, filter) are powered by LLMs instead of code. However, building effective semantic data processing pipelines presents a departure from traditional data pipelines: users need to understand their data to write effective pipelines, yet they need to construct pipelines to extract the data necessary for that understanding -- all while navigating LLM idiosyncrasies and inconsistencies. We present \docwrangler, a mixed-initiative integrated development environment (IDE) for semantic data processing with three novel features to address the gaps between the user, their data, and their pipeline: {\em (i) In-Situ User Notes} that allows users to inspect, annotate, and track observations across documents and LLM outputs, {\em (ii) LLM-Assisted Prompt Refinement} that transforms user notes into improved operations, and {\em (iii) LLM-Assisted Operation Decomposition} that identifies when operations or documents are too complex for the LLM to correctly process and suggests decompositions. Our evaluation combines a think-aloud study with 10 participants and a public-facing deployment (available at \href{https://docetl.org/playground}{docetl.org/playground}) with 1,500+ recorded sessions, revealing how users develop systematic strategies for their semantic data processing tasks; e.g., transforming open-ended operations into classifiers for easier validation and intentionally using vague prompts to learn more about their data or LLM capabilities.

Paper Structure

This paper contains 27 sections, 10 figures, 3 tables.

Figures (10)

  • Figure 1: Screenshot of the DocWrangler IDE showing our notebook-style pipeline constructor (A) and spreadsheet-like data inspector (B). User notes on documents and LLM-generated data, provided in-situ, and the raw document collection are displayed in the left and right sidebars, respectively.
  • Figure 2: Workflow for analyzing patient discomfort from medical transcripts (D1; D2). (A) The user adds a new operation via dropdown menu. (B) A map operation card appears with syntax validation. (C) The user writes a prompt for extracting discomfort information. (D) The user defines an output schema with three attributes to be extracted: discomfort level, description, and symptoms. (E) Before running the full dataset, they sample 10 documents. (F) Results appear in an interactive table. (G) Eye icons reveal exact LLM prompts for each document. (H) Column headers visualize attribute distributions. (I) Sort buttons reorder documents. (J) Adjustable column widths help focus on specific content. (K) Search functionality helps validate extractions.
  • Figure 3: In-situ user notes feature in DocWrangler (D2). (A) User selects attribute to inspect. (B) Document viewer dialog shows attribute statistics and enables in-situ notes. (C) User could inspect documents side-by-side with split-screen view, if they want. (D) User adds a note. (E) Notes persist in the main interface sidebar.
  • Figure 4: Prompt Refinement workflow (D3). (A) User initiates improvement via "Improve" button. (B) A dialog opens, showing the current operation and the user's relevant in-situ notes. (C) AI suggests improved prompt addressing notes (focusing on behavioral discomfort). (D) Improved prompt includes behavioral indicator examples. (E) User can edit the suggestion directly, or instruct the AI to edit it. (F) User runs updated operation. (G) Results show a more accurate discomfort distribution.
  • Figure 5: The Operation Decomposition workflow (D3). (A) A notification suggests decomposing a complex operation, simultaneous extraction of discomfort and symptoms for long documents. (B) A dialog explains why the operation exceeds LLM capabilities, with examples of inconsistent outputs. (C) User can automate decomposition or ignore. (D) System shows real-time optimization process with reasoning (e.g., evaluation criteria for determining the best decomposition). (E) The resulting pipeline splits documents into chunks, executes the original operation on each chunk, and has another operation to unify results.
  • ...and 5 more figures