DataFlow-Harness closes the “NL2Pipeline gap” with 93.3% pass rate and 72.5% lower API costs
Researchers at Peking University and others turn AI code from disposable scripts into governable, editable workflow graphs for RAG pipelines.

DataFlow-Harness, an open-source framework from researchers at Peking University, Zhongguancun Academy, and Shanghai’s Institute for Advanced Algorithms Research, teaches LLM coding agents to build native, structured data pipelines. For decision-makers, it materially improves production readiness by lifting end-to-end pass rates to 93.3% while cutting API costs by up to 72.5%.
If you’ve ever watched an AI coding agent nail a small Python script and then face-plant when asked to build a real data pipeline, you’ve hit the exact problem DataFlow-Harness is designed to fix. The researchers report a 93.3% observed end-to-end pass rate on a 12-task data-engineering benchmark. And they do it while reducing API costs by up to 72.5% and response latency by 49.9% versus a baseline approach.
The “why now” is that the failure mode is not just technical. Standard LLM agents tend to produce free-form, disposable scripts that are detached from the governable workflow abstractions MLOps teams rely on to audit, edit, and operate pipelines in production. DataFlow-Harness changes that by guiding an LLM agent to build structured, visual data-processing workflows step-by-step, where the generated artifacts are persistent and easily editable instead of being thrown over the fence as one-off code.
To understand the stakes, zoom out to what “pipeline work” actually means in data-centric AI. It’s not one clever function. It’s ingesting thousands of messy documents, chunking text, scoring quality, filtering noise, and wiring it all into a Retrieval-Augmented Generation (RAG) system that fits a specific enterprise stack. LLMs can translate natural language into executable code quickly, but the paper’s argument is that high task accuracy is not enough for production deployment. What matters is grounding the output in the live platform: operators that are actually installed, the real dataset schema, registered datasets and model services, correct dependencies between stages, and an artifact another engineer can understand and revise.
The researchers define that mismatch as the “NL2Pipeline gap”: the disconnect between a user expressing workflow requirements in natural language and the production environment requiring structured and persistent pipeline assets. This is where things get concrete. In one comparison, Claude Code hit a 94.2% success rate when allowed to write standard, free-form scripts with codebase context. But when restricted to creating only platform-native workflow graphs using the platform’s building blocks, the success rate dropped to 83.3%. In other words, the agent can often generate “correct-looking code,” but producing a native, governable pipeline graph is meaningfully harder.
DataFlow-Harness’s thesis is that closing the gap takes more than improving code-generation accuracy. The build process has to remain grounded in platform semantics, and it has to produce artifacts that integrate with the host platform. Practically, they do this by changing the agent’s action space. As first author Runming He (from the DataFlow-Harness paper) explains, instead of asking the agent to emit arbitrary code, the system retrieves the live operator registry and current pipeline state through MCP and applies typed, incremental changes to a persistent directed acyclic graph (DAG).
The framework is organized around four components: the Data Pipeline Backend, DataFlow-WebUI, the MCP Tools Layer, and the AI guidance layer called DataFlow-Skills. The Data Pipeline Backend is the authoritative source of truth across conversational, visual, and programmatic interfaces. It represents the pipeline as a DAG: data sources, pre-built processing modules (operators), and execution dependencies. Rather than generating free-form code, agents interact through “typed mutations” like adding an operator or connecting edges.
DataFlow-Skills are markdown files that inject domain-specific knowledge into the model’s context window. Instead of letting the AI guess how to assemble components, these skills provide compatibility rules for operator selection, schema inference, and assembly procedures. Then the MCP Tools Layer gives the AI access to the operator registry and current workflow state, so the system can propose structured changes. Validations follow: the platform checks that the workflow runs in a valid sequence and that connected modules speak the same data language.
Finally, DataFlow-WebUI supports both human and AI collaboration. Developers can describe workflow requirements in natural language, and they can inspect the workflow as a graphical map in a DAG editor. Importantly, the current implementation performs static checks against platform metadata before accepting pipeline changes. That includes checks for registered datasets, operators and model-serving references, field flow, some invalid parameter usage, plus structural validity. The result is visible in a graphical editor and can be revised manually or by the agent in later turns.
On results, the researchers tested DataFlow-Harness on a 12-task benchmark across six industrial data-processing scenarios such as QA generation, review governance, and schema normalization. They used Claude Opus 4.7 as the backbone model and compared against three baselines: Vanilla CC (an unconstrained coding baseline using standard Claude Code), Context-Aware CC (an agent with access to the DataFlow codebase), and MCP-only (access to the DataFlow MCP tools, instructed to generate platform-native DAGs without DataFlow-Skills). DataFlow-Harness achieved a 93.3% end-to-end pass rate, improving by 10.0 percentage points over MCP-only and beating Vanilla CC at 91.7%. It also stayed within 0.9 percentage points of Context-Aware CC at 94.2%.
Then come the operational metrics that CFOs and platform teams care about: API costs dropped to $0.261 per task, a 72.5% decrease versus Vanilla CC and a 42.8% decrease versus Context-Aware CC. Response latency improved by 49.9% versus Vanilla CC and by 17.6% versus Context-Aware CC. The system also proved especially effective on complex tasks that depend on implicit domain knowledge like QA generation. The paper even walks through a textbook-to-VQA extraction task, where the job required stitching together capabilities such as PDF parsing, layout recovery, OCR, figure extraction, multimodal understanding, and long-range question handling.
Strategically, this matters because enterprise AI teams are stuck between two bad choices: move fast with LLM-generated scripts that nobody can confidently audit, or slow down with pipeline engineering that is expensive and hard to iterate. By turning agent outputs into native, governable workflow graphs with validation and editable artifacts, DataFlow-Harness aims to deliver AI automation speed without accumulating unmanageable technical debt. For anyone building RAG, synthetic data generation, retrieval augmentation, or model training pipelines, it’s a reminder that production-grade AI is less about writing code and more about making code live inside a system you can govern.
This story's Key Insights and Take-aways are locked.
Create a free account to unlock Executive Actions for one credit.
Register to UnlockAlways free for Executives Club members. Join the Club
More in Technology

Steve Hanke says AI is job-safe because it costs “incredibly costly,” not free
The Johns Hopkins economist argues AI will not replace workers broadly, because water, power, and chips decide the limits.

Tom Evslin pushed Exchange into the internet, even as Bill Gates tried to delay it
The AT&T internet project and Microsoft Exchange gateways show why “we'll do it later” can cost you timing.

Pixel 11 lineup leaks: $899 base, $100 hike, 256GB storage, RAM cut to 12GB
Android Headlines says Google is raising prices at the same time it swaps storage and trims RAM on Pro models ahead of Aug. 12.

