Bridging the Divide: How DataFlow-Harness Reduces the 10.9-Point Gap Between Structured AI Data Pipelines and Free-Form Code

When tasked with creating a simple Python script to parse a JSON file, an AI coding agent can typically deliver a solution swiftly and effectively. However, challenges arise when the same agent is asked to design a comprehensive data processing pipeline capable of handling thousands of disorganized documents—this includes tasks such as text chunking, quality scoring, and noise filtration for a Retrieval-Augmented Generation (RAG) system tailored to an organization’s infrastructure.
Although large language models (LLMs) shine in generating straightforward code snippets, their performance often falters on intricate data processing assignments. The code produced tends to be informal, transient scripts, lacking the structured framework that Machine Learning Operations (MLOps) teams require for efficient production, complicating both auditing and visual editing.
In response to this challenge, researchers from Peking University, the Zhongguancun Academy, and Shanghai’s Institute for Advanced Algorithms Research have developed an open-source framework named DataFlow-Harness. This innovative system assists an LLM agent in the construction of organized and visual data processing workflows incrementally, rather than solely relying on raw code generation.
The DataFlow-Harness framework makes the generated data processing pipelines more manageable and allows for smoother integration into existing systems, as the outputs created are both durable and easily modifiable.
According to the researchers, this platform achieved a remarkable 93.3% end-to-end success rate across a benchmark comprising 12 data engineering tasks. Moreover, it significantly reduced API costs—by as much as 72.5%—and response times by 49.9% compared to standard Claude Code, while maintaining a success rate nearly equivalent to that found when providing a complete codebase for script writing. For businesses, this means utilizing AI-driven automation without creating excessive technical debt, thus ensuring that pipelines remain secure, accountable, and suited for production use.
Understanding the “NL2Pipeline gap”
Data-centric artificial intelligence demands organized workflows for tasks including synthetic data generation, retrieval enhancement, and model training. While LLMs can effectively translate natural language descriptions into executable code for such tasks, high accuracy alone does not suffice for deployment in a production environment.
Dr. Runming He, the primary author of the DataFlow-Harness research paper, explained, “The primary hindrance isn’t merely writing Python code; modern coding agents can generate plausible scripts quickly. The more significant challenge involves anchoring that script within a functioning production environment—this includes utilizing operational components that are actually present, aligning with genuine dataset schemas, referencing existing datasets and model services, maintaining dependencies between various stages, and outputting results that other engineers can readily understand and modify.”
General-purpose AI agents often misjudge dependencies, depending on non-existent operators or outdated assumptions about the platform. Rather than yielding a comprehensible artifact for engineers, they generate ephemeral code that proves tough to track using workflow management tools.
This issue has been labeled the “NL2Pipeline gap,” pinpointing the disconnect between expressing workflow requirements in natural language and the necessity for structured, long-lasting pipeline assets in a production setting.
The researchers illustrated this gap through various experiments. For example, when Claude Code was granted the ability to write standard free-form scripts utilizing a codebase, it achieved a 94.2% success rate. However, its success rate dropped to 83.3% when constrained to using only the specific components within the platform to create a native workflow graph. This disparity highlights a key finding: creating native, governable pipelines poses a much greater difficulty for agents compared to producing disposable code.
“Bridging this gap demands more than just refining code-generation accuracy; the construction process must stay anchored in platform semantics and yield artifacts that fit seamlessly with the host environment,” the researchers noted.
Coordinated Components of DataFlow-Harness
“DataFlow-Harness reshapes the agent’s action space,” He remarked. “Rather than asking the agent to create arbitrary code, it retrieves real-time operator data and current workflow states from the MCP and applies structured, incremental modifications to a persistent Directed Acyclic Graph (DAG).”
To facilitate this, the platform organizes workflow creation around four primary components: the Data Pipeline Backend, the interaction layer (DataFlow-WebUI), the MCP Tools Layer, and the AI guidance layer (DataFlow-Skills).
DataFlow-Harness architecture
The Data Pipeline Backend serves as the definitive source of truth spanning conversational, visual, and programmatic interfaces. It illustrates the pipeline as a directed acyclic graph (DAG), a structured workflow diagram that consists of data sources, predefined processing modules referred to as “operators,” and execution dependencies. Instead of generating unstructured code, agents engage with this backend through “typed mutations,” which could involve the addition of an operator or the connection of edges.
DataFlow-Skills are markdown files that enrich the model’s understanding with domain-specific information, guiding operator selection, schema interpretation, and the assembly process. Instead of allowing the AI to guess the combination of components, these skills provide it with compatibility rules that help it to correctly match various data formats and accommodate complex data structures without disrupting the workflow.
The MCP Tools Layer empowers the AI by providing access to the operator registry and the current data workflow state. The AI proposes structured updates using this tools layer, which validates the modifications to ensure that the workflow operates in the correct order and that all interconnected modules speak the same data language.
DataFlow-WebUI offers dual interfaces that enable both humans and AI to collaboratively construct workflows. Developers can articulate their workflow needs through a conversational interface or inspect the workflow as a visual map in a graphical DAG editor, allowing for a thorough assessment and potential adjustments to AI-suggested modifications.

DataFlow-WebUI interface
“The current implementation enforces static checks against platform metadata prior to accepting modifications to the pipeline,” He explained. “These checks assess registered datasets, operators, model-serving references, field flow, and some invalid parameter usage, along with structural validity. All results are accessible through a graphical editor and are available for manual or AI-controlled revisions later.”
Performance Insights: 93.3% Success Rate, 72.5% Cost Reduction
The researchers evaluated DataFlow-Harness on a set of 12 tasks across six industrial data processing scenarios, such as QA generation, review governance, and schema normalization, using Claude Opus 4.7 as the foundational model in their experiments.
DataFlow-Harness was compared against three baseline models:
-
Vanilla CC: A baseline with unrestricted coding capabilities using standard Claude Code.
-
Context-Aware CC: An agent with access to the DataFlow codebase context.
-
MCP-only: An agent equipped with the DataFlow MCP tools and tasked with generating platform-native DAGs (but without DataFlow-Skills access).
DataFlow-Harness achieved a 93.3% end-to-end success rate, surpassing the MCP-only approach by 10.0 percentage points and outperforming Vanilla CC (91.7%) while being within 0.9 percentage points of Context-Aware CC (94.2%).

DataFlow-Harness performance on data-processing benchmarks
Notably, it reduced API costs to $0.261 per task, a 72.5% decrease compared to Vanilla CC and 42.8% compared to Context-Aware CC. Task completion times were also improved, being 49.9% faster than Vanilla CC and 17.6% quicker than Context-Aware CC.
DataFlow-Harness demonstrated notable proficiency in managing complex tasks reliant on specialized domain knowledge, such as QA generation. The baseline MCP-only model often produced structurally accurate DAGs but struggled to derive procedure-specific actions from operator descriptions alone.
An illustrative example provided by the researchers involved a task focused on extracting information from textbooks for visual question answering (VQA). This complex assignment required the AI to integrate skills such as PDF parsing, layout recovery, optical character recognition (OCR), figure extraction, multimodal comprehension, and long-range question answering. DataFlow-Harness excelled, achieving a 97.2% precision rate and an 87.3% coverage rate, easily outperforming baseline models. By allowing the AI to leverage existing platform assets rather than creating intricate tasks from scratch, it effectively retrieved a greater number of valid QA pairs from documents.
The experiments also revealed that DataFlow-Harness is exceptionally capable of designing data generation pipelines. For instance, in generating synthetic instruction data, the AI constructed a multi-stage pipeline that created candidate instruction-response pairs, reviewed and revised them, evaluated them using an LLM-based judge, and filtered out low-quality outputs before proceeding to training.
He observed, “Such workflows are expensive to create and risky to maintain when built as a collection of ad hoc scripts. This harness doesn’t automatically ensure safety but transforms them into explicit, editable stages for engineers to examine, test, and regulate using standard production methods.”
Similarly, when engaged in developing a math data cleaning and synthesis pipeline, the outcomes produced by the DataFlow-Harness pipeline led to a better-performing model with higher average accuracy on AIME24 and AIME25 benchmarks compared to results from the traditional Claude Code pipeline.
Integration and Implementation Considerations
For engineering teams contemplating the use of DataFlow-Harness, it is essential to understand its compatibility with existing systems. Being released under the Apache 2.0 license, the current implementation requires some engineering efforts to fit into common tech stacks.
“The current setup is native to the DataFlow platform; it isn’t a plug-and-play option for Airflow, Prefect, or Spark,” He clarified. Teams aiming to use those systems as a foundational execution layer will need to create an adapter that connects their registry, metadata, and execution interfaces with the agent’s control layer.
Additionally, organizations must commit resources to establish the boundaries within which the AI will operate. This entails maintaining an operator registry, defining schemas, and encoding repeated domain procedures as Skills. Given this requirement, He advises against using the framework for minor, one-off transformations where a simple script is adequate or in legacy systems lacking reliable metadata.
Ultimately, even though the platform incorporates validation mechanisms for illogical connections by checking structural properties, it functions as an engineering control layer, not a compliance mechanism. “The harness should be considered a tool for engineering control, rather than a replacement for compliance protocols, validated detection models, access control measures, audit logging, or human approval processes,” He emphasized.
As initiatives like the MCP become more prevalent, the delineation between human engineers and AI agents is anticipated to evolve. “The objective isn’t autonomous data engineering devoid of oversight,” he stated. “It’s about optimizing labor division: agents handle repetitive construction within defined limits, while engineers maintain responsibility for semantics, policies, and consequential decisions that necessitate domain accountability.”



