TL;DR
DataFlow-Harness bridges the "NL2Pipeline gap" by shifting LLM coding agents away from generating disposable, free-form scripts and toward constructing platform-native, editable visual DAG workflows. By combining procedural guidance (Skills) with live environment grounding (via the Model Context Protocol), it matches the reliability of unconstrained script-generation baselines while slashing monetary costs by up to 72.5% and latency by half.
What Problem Does This Paper Address?
While Large Language Models (LLMs) excel at automating data-processing tasks, standard coding agents typically output one-off, disposable Python scripts. In production environments, this creates what the authors term the NL2Pipeline gap: a disconnect between a user's natural language requirements and the structured, persistent, and auditable pipeline assets (like Directed Acyclic Graphs, or DAGs) required by enterprise data platforms.
Free-form scripts are notoriously difficult to audit via graphical interfaces, frequently hallucinate dependencies, and fail to integrate with platform governance mechanisms. To make LLM-driven data engineering production-ready, agents must build workflows that remain visible, editable, and grounded in the actual host platform's constraints.
Methods
The authors introduce DataFlow-Harness, a platform-grounded framework that constrains and guides an LLM agent (specifically Claude Code running Claude Opus 4.7) using four decoupled components:
- Data Pipeline Backend: Serves as the authoritative source of truth, formally representing pipelines through data sources, configured operators, directed edges, and field schemas.
- MCP (Model Context Protocol) Tools Layer: Connects the agent directly to the live platform. Instead of writing raw code, the agent executes typed, incremental mutations (e.g., adding/removing operators, updating parameters). A Request-Validate-Commit protocol automatically rejects any changes that break DAG acyclicity or schema compatibility.
- DataFlow-Skills: Injects domain-specific procedural knowledge into the agent's context. This includes "procedural blueprints" (sequences for schema inference and operator selection) and "compositional constraints" (modality matching and field-flow conventions) to ensure the generated DAGs make semantic sense.
- DataFlow-WebUI: A dual-modality interface that uses WebSockets to seamlessly synchronize the agent's conversational authoring with a visual DAG editor, allowing humans to inspect or manually tweak the pipeline at any time.
Datasets
The framework was evaluated using three distinct setups:
- 12-Task Data-Engineering Benchmark: A newly compiled benchmark spanning six industrial scenarios: QA generation, review governance, long-document processing, multi-field scoring, schema normalization, and low-quality filtering.
- Textbook-to-VQA Extraction Task: A highly complex workflow synthesis task based on FlipVQA-Miner settings, requiring the composition of document parsing, layout analysis, multimodal content extraction, and long-range question-answer matching.
- Downstream Training Sets: Pipelines generated by the agent were executed to synthesize training data, which was then used to fine-tune downstream models (Qwen2.5-32B-Instruct and Qwen2.5-7B-Base) to evaluate data utility.
Key Insights and Ideas
- The "Tool-Use" Paradox: Forcing an LLM to generate structured DAGs instead of free-form code increases its cognitive burden. Simply giving the agent access to platform APIs (the "MCP-only" baseline) causes a severe drop in success. Agents require explicit procedural "Skills" to successfully navigate architectural constraints.
- Compactness Breeds Efficiency: Structured DAG mutations are significantly more compact than verbose Python scripts. By eliminating the need to generate boilerplate code, DataFlow-Harness drastically reduces token consumption, which directly drives down API costs and latency.
- Skills are Context-Dependent: Procedural guidance provides massive accuracy boosts for ambiguous, knowledge-heavy tasks (like multi-stage QA generation) but offers little to no benefit for trivially routable tasks (like field renaming or simple filtering).
Key Results
- High Reliability at a Fraction of the Cost: On the 12-task benchmark, DataFlow-Harness achieved a 93.3% end-to-end pass rate. This sits within a mere 0.9 percentage points of the repository-grounded script baseline (Context-Aware Claude Code) but operates with 42.8% lower monetary cost and 17.6% lower latency. Compared to Vanilla Claude Code, it cut costs by 72.5% and latency by 49.9%.
- Superior Extraction Quality: In the complex Textbook-to-VQA task, DataFlow-Harness achieved 97.2% precision and 87.3% coverage, substantially outperforming the script-generation baselines by building more complete extraction chains rather than just filtering conservatively.
- Downstream Utility Gains: Models trained on data generated by the DataFlow-Harness pipelines achieved higher average accuracy on tough math and coding benchmarks (like AIME and MBPP), proving that platform grounding helps agents author structurally superior data-cleaning pipelines.
Limitations and Future Work
While promising, the authors note several limitations:
- The evaluation relies on a single model family (Claude Opus 4.7) and a relatively small, platform-specific benchmark.
- The platform's automated validation engine checks for structural and schema correctness but cannot guarantee underlying semantic correctness.
- The downstream utility evaluation is framed as a controlled case study and lacks multi-seed statistical analysis or task-clustered confidence intervals.
- Future work is required to directly evaluate enterprise-level platform features such as pipeline persistence, multi-user concurrent editing, provenance tracking, and disaster recovery.
Summary updated