Dango: A Mixed-Initiative Data Wrangling System using Large Language Model

Wei-Hao Chen, Weixi Tong, Amanda Case, Tianyi Zhang

Abstract

Data wrangling remains a significant bottleneck in the data science pipeline, often consuming the majority of a practitioner's time. While Programming-by-Demonstration (PBD) and Large Language Model (LLM) interfaces offer potential solutions, they frequently suffer from ambiguity and the "hallucination problem." This paper introduces Dango, a mixed-initiative system that combines user demonstrations and natural language prompts with a multi-agent LLM framework. By proactively resolving ambiguities through clarification questions and providing rule-based, editable explanations, Dango reduces task completion time by 45% and significantly improves the reliability of synthesized scripts.

Introduction

Data wrangling—the process of cleaning and transforming raw data into a usable format—is notoriously the most time-consuming part of the data science pipeline, often consuming up to 80% of a practitioner's time. Existing tools generally fall into two categories: Programming-by-Demonstration (PBD) and LLM-based natural language (NL) interfaces.

PBD requires users to manually provide examples of transformations, which can be cumbersome for complex multi-table operations or conditional logic. Conversely, LLM-based tools, while flexible, often suffer from the "gulf of execution," where users struggle to articulate precise intent, and the "hallucination problem," where the AI generates incorrect code that is difficult for non-programmers to verify. Dango addresses these challenges by facilitating a "mixed-initiative" workflow where the system and user collaborate to refine intent and verify results.

System Design and Methods

Dango utilizes a multi-agent LLM framework (powered by GPT-4o-mini) to manage the wrangling process across three distinct stages:

1. Intent Analysis

Users provide intent through table demonstrations (e.g., editing cells, moving columns) or natural language chat. An Analysis Agent detects potential ambiguities in these inputs. Rather than guessing the user's intent, the system generates multiple-choice Clarification Questions (CQs) to narrow down goals before any code is generated. This proactive approach ensures the system operates on a clear understanding of the task.

2. DSL-based Program Synthesis

Once the intent is clarified, a Synthesis Agent generates a plan and a corresponding script using an extended version of the Potter’s Wheel Domain-Specific Language (DSL). The authors extended this DSL specifically to handle multi-table operations and statistical tests. To ensure technical validity, a syntax checker validates the script before execution.

3. Program Evaluation and Refinement

To bridge the trust gap, an Explanation Agent translates the DSL script into a step-by-step natural language explanation. Crucially, this uses fixed translation rules rather than LLM summarization to prevent "faithful hallucinations"—where a summary sounds correct but does not match the underlying code. Users can directly edit these natural language steps to fix errors, which Dango then uses to regenerate the underlying code. Additionally, a Data Provenance View uses React Flow to visualize the relationship between different table versions, helping users track complex multi-table lineages.

Evaluation

The authors evaluated Dango through two primary studies:

  • User Study: 38 participants, ranging from novices to experts, performed seven representative data wrangling tasks, including table segmentation, fuzzy matching, and statistical analysis.
  • Generalizability Case Study: The system was tested against a benchmark of 24 tasks, including 10 from prior literature (e.g., Wrangler and Potter's Wheel) and 14 new multi-table tasks designed to test complex logic.

Key Results and Insights

Efficiency and Accuracy

Participants using the full Dango system completed tasks in an average of 3 minutes and 30 seconds, representing a 45% reduction in time compared to a baseline LLM-summary system. Furthermore, users required significantly fewer attempts to reach a correct solution (1.43 attempts vs. 2.0 in the baseline).

Reducing Hallucinations

Dango’s proactive approach—detecting ambiguity before synthesis—reduced the hallucination rate from 0.65 to 0.18 per task session. By forcing clarification early, the system avoids the common pitfall of generating plausible but incorrect transformations.

Trust through Rule-Based Explanations

The study found that grammar-based translation for explanations ensured the natural language description was a 100% accurate reflection of the DSL script. This allowed users to trust the system's output and effectively use the "edit NL" feature to fix code without needing to learn the underlying DSL syntax.

User Preference

82% of participants preferred the version of Dango with proactive clarification questions, citing reduced mental effort and higher confidence in the results. The system effectively "leveled" the performance gap between novices and experts for most standard tasks.

Limitations and Future Work

Despite its successes, Dango has several limitations. The current DSL lacks traditional control structures like for or while loops and does not support complex Excel-style formulas within cells. Additionally, the system was tested in a controlled lab setting with relatively small datasets; future work is required to evaluate its performance on massive, real-world data. The authors also suggest that future versions could incorporate multimodal interactions, such as sketching or gestures, to further clarify user intent.

Conclusion

Dango demonstrates that a mixed-initiative approach, combining proactive clarification with rule-based transparency, can significantly improve the efficiency and reliability of AI-assisted data wrangling. By allowing users to interact with code through natural language editing, Dango lowers the barrier to entry for complex data transformation tasks.

Summary updated

BibTeX
@inproceedings{chen2025dango,
  author = {Wei-Hao Chen and Weixi Tong and Amanda Case and Tianyi Zhang},
  title = {{Dango: A Mixed-Initiative Data Wrangling System using Large Language Model}},
  booktitle = {CHI},
  year = {2025},
  doi = {10.1145/3706598.3714135},
}
Figure