DataFlow: An LLM-Driven Framework for Unified Data Preparation and Workflow Automation in the Era of Data-Centric AI

Hao Liang, Xiaochen Ma, Zhou Liu, Zhen Hao Wong, Zhengyang Zhao, Zimo Meng, Runming He, Chengyu Shen, Qifeng Cai, Zhaoyang Han, Meiyi Qiang, Yalin Feng, Tianyi Bai, Zewei Pan, Ziyi Guo, Yizhen Jiang, Jingwen Deng, Qijie You, Peichao Lai, Tianyu Guo, Chi Hsu Tsai, Hengyi Feng, Rui Hu, Wenkai Yu, Junbo Niu, Bohan Zeng, Ruichuan An, Lu Ma, Jihao Huang, Yaowei Zheng, Conghui He, Linpeng Tang, Bin Cui, Weinan E, Wentao ZhangarXiv 2025 · OpenReview

Abstract

The rapidly growing demand for high-quality data in Large Language Models (LLMs) has intensified the need for scalable, reliable, and semantically rich data preparation pipelines. However, current practices remain dominated by ad-hoc scripts and loosely specified workflows, which lack principled abstractions, hinder reproducibility, and offer limited support for model-in-the-loop data generation. To address these challenges, we present DataFlow, a unified and extensible LLM-driven data preparation framework. DataFlow is designed with system-level abstractions that enable modular, reusable, and composable data transformations, and provides a PyTorch-style pipeline construction API for building debuggable and optimizable dataflows. The framework consists of nearly 200 reusable operators and six domain-general pipelines spanning text, mathematical reasoning, code, Text-to-SQL, agentic RAG, and large-scale knowledge extraction. To further improve usability, we introduce DataFlow-Agent, which automatically translates natural-language specifications into executable pipelines via operator synthesis, pipeline planning, and iterative verification. Across six representative use cases, DataFlow consistently improves downstream LLM performance. Our math, code, and text pipelines outperform curated human datasets and specialized synthetic baselines, achieving up to +3% execution accuracy in Text-to-SQL over SynSQL, +7% average improvements on code benchmarks, and 1–3 point gains on MATH, GSM8K, and AIME. Moreover, a unified 10K-sample dataset produced by DataFlow enables base models to surpass counterparts trained on 1M Infinity-Instruct data. These results demonstrate that DataFlow provides a practical and high-performance substrate for reliable, reproducible, and scalable LLM data preparation, and establishes a system-level foundation for future data-centric AI development.

Introduction

In the era of "Data-Centric AI," the performance of Large Language Models (LLMs) is increasingly dictated by data quality rather than just model size. However, the process of preparing this data remains fragmented and largely unstandardized. Most researchers rely on a "spaghetti code" of ad-hoc scripts and loosely defined workflows that are difficult to reproduce, scale, or extend.

Existing tools like NeMo Curator or Data-Juicer excel at cleaning and filtering massive web crawls, but they are not primarily designed for the modern "model-in-the-loop" era. Today’s high-performance data is not just found; it is synthesized, evaluated, and iteratively refined by LLMs themselves. DataFlow addresses this gap by providing a system-level foundation for this new paradigm, shifting the focus from simple filtering to LLM-driven synthesis and refinement.

Comparison of DataFlow with existing data curation frameworks across key dimensions.

The DataFlow Framework

DataFlow is built on four architectural pillars designed to standardize data preparation into a repeatable engineering process:

  1. System-Level Abstractions: The framework utilizes a global tabular storage layer and a unified LLM serving API (supporting engines like vLLM and SGLang). This decouples the logic of data transformation from the underlying hardware and storage plumbing.
  2. PyTorch-like Programming Interface: Adopting a familiar run() and forward() syntax, DataFlow allows developers to build "Dataflows" as modular, debuggable, and optimizable pipelines, similar to how PyTorch handles neural networks.
  3. Standardized Operator Zoo: The framework includes nearly 200 reusable operators categorized into four functional types: Generate (adding data), Evaluate (scoring data), Filter (removing low-quality samples), and Refine (editing existing samples).
  4. DataFlow-Agent: This agentic orchestration layer, built on LangGraph, allows users to provide natural-language specifications. The agent then automatically synthesizes, plans, and debugs the necessary pipeline, lowering the barrier to entry for complex data tasks.
Overview of the DataFlow-System architecture, illustrating the core components, operator zoo, and agentic orchestration layer.

Experimental Results

The paper validates DataFlow across six domain-general pipelines, including Text, Math, Code, Text-to-SQL, Agentic RAG, and Knowledge Extraction.

Performance Gains

  • Math & Code: DataFlow pipelines yielded 1–3 point gains on MATH and GSM8K benchmarks and a +7% average improvement on code benchmarks compared to specialized synthetic baselines.
  • Text-to-SQL: The framework achieved a +3% execution accuracy boost over SynSQL while requiring significantly less training data.
  • Knowledge Extraction: In medical QA tasks, DataFlow-generated data provided absolute accuracy gains of 15–20% over zero-shot and RAG-based baselines.

The Efficiency of High-Quality Data

A striking insight from the study is that 10K high-quality samples can outperform 1M mediocre ones. Models trained on the DataFlow-Instruct-10K dataset—produced entirely through the framework—outperformed counterparts trained on 1,000,000 samples from the Infinity-Instruct dataset. This demonstrates that DataFlow effectively turns data preparation into an optimization loop where quality is prioritized over sheer volume.

Conclusion and Future Work

DataFlow establishes a practical substrate for reliable and scalable LLM data preparation. While the DataFlow-Agent demonstrates strong alignment with user intent (scoring 0.80), challenges remain in consistent code implementation (scoring 0.49), which the authors aim to address in future iterations. Future development will also expand the ecosystem to include new modalities (Table, Graph, Multimodal) and specialized variants for science and industry applications.

Summary updated

BibTeX
@misc{liang2025dataflow,
  author = {Hao Liang and Xiaochen Ma and Zhou Liu and Zhen Hao Wong and Zhengyang Zhao and Zimo Meng and Runming He and Chengyu Shen and Qifeng Cai and Zhaoyang Han and Meiyi Qiang and Yalin Feng and Tianyi Bai and Zewei Pan and Ziyi Guo and Yizhen Jiang and Jingwen Deng and Qijie You and Peichao Lai and Tianyu Guo and Chi Hsu Tsai and Hengyi Feng and Rui Hu and Wenkai Yu and Junbo Niu and Bohan Zeng and Ruichuan An and Lu Ma and Jihao Huang and Yaowei Zheng and Conghui He and Linpeng Tang and Bin Cui and Weinan E and Wentao Zhang},
  title = {{DataFlow: An LLM-Driven Framework for Unified Data Preparation and Workflow Automation in the Era of Data-Centric AI}},
  year = {2025},
  eprint = {2512.16676},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.16676},
}
Figure