LLM-AutoDP: Automatic Data Processing via LLM Agents for Model Fine-tuning

Wei Huang, Anda Cheng, Yinggui Wang, Lei Wang, Tao WeiarXiv 2026

TL;DR

LLM-AutoDP is an automated framework that leverages LLM agents to orchestrate and optimize data processing pipelines for model fine-tuning without human intervention. By combining semantic strategy generation with three novel acceleration techniques, it delivers fine-tuned models that achieve an 80%+ win rate over raw-data baselines while slashing pipeline search times by up to 10x.

What Problem Does This Paper Address?

Fine-tuning Large Language Models (LLMs) on domain-specific data (such as medicine or law) is essential for specialized performance. However, raw data scraped from the web or crowdsourced is notoriously noisy, containing duplicates, low-level text artifacts, and low-quality responses.

Traditionally, engineers clean this data through manual, iterative trial-and-error. This approach is not only labor-intensive and slow, but it also introduces severe privacy risks in fields like healthcare, where humans must directly inspect sensitive records. While automated machine learning (AutoML) frameworks exist, they lack a semantic understanding of data processing operations, leading to slow convergence and massive computational overhead when paired with heavy LLM fine-tuning loops.

Methods

LLM-AutoDP solves this by treating data processing as an iterative search problem managed by an LLM meta-agent operating in a "black-box" mode. The framework consists of two interactive modules:

  1. Strategy Generation Module: Guided by prompt templates, an LLM agent selects and sequences operations from a predefined operator pool (spanning cleaning, optimization, generation, and selection). It uses a group relative comparison mechanism to analyze feedback from previous rounds and iteratively refine its prompts.
  2. Strategy Evaluation Module: The proposed pipeline is applied to the data, a model is fine-tuned, and its performance is scored to provide a feedback signal to the generation module.

To make this computationally viable, the authors introduce three crucial acceleration techniques:

  • Distribution-Preserving Sampling (DPS): Instead of using the full dataset for evaluation, it samples a representative 20% subset using embedding similarities to maintain the original data distribution manifold.
  • Processing Target Selection (PTS): A lightweight binary classifier (distilled from Qwen3-32B into a Qwen2.5-7B model) pre-screens the data, ensuring the system only spends time processing noisy samples while leaving clean data untouched.
  • Cache-and-Reuse Mechanism (CRM): It caches intermediate datasets from previous rounds. If a new strategy shares a prefix with an older one, the system reuses the cached state and only executes the newly added suffix operations.
Figure 1: The overall framework of LLM-AutoDP. The left part utilizes an LLM as an agent to iteratively refine the prompt, enabling the agent to generate high-quality data processing strategies. The right part consists of an evaluation module for generating strategy feedback scores and an acceleration module for speeding up data processing. The LLM iteratively controls the interaction between the two parts to select high-quality processing strategies.

Datasets

The framework was rigorously evaluated on four medical dialogue and QA datasets:

  • cMedQA2
  • Chinese-medical-dialogue (CMD)
  • Huatuo-26M-Lite
  • Medical-O1-Reasoning-SFT

To demonstrate cross-domain generalization, the authors also validated the framework on a legal dataset, DISC-Law-SFT.

Key Insights and Ideas

  • Privacy via Black-Box Optimization: Because the LLM agent relies entirely on performance feedback scores and abstract metadata prompts, it never actually "sees" the raw text. This allows for automated data cleaning in high-privacy environments.
  • Semantic Search Efficiency: Traditional AutoML algorithms blindly permute operations. LLM agents, possessing semantic understanding of what operators like "remove HTML tags" or "optimize answers" actually do, can converge on optimal pipelines in just 4 to 5 rounds.
  • Compounding Acceleration: Caching, targeted selection, and smart sampling act synergistically. Pruning clean data and reusing pipeline prefixes prevents the exponential cost growth typically seen in iterative LLM training loops.

Key Results

  • High Win Rates: Models fine-tuned on data processed by LLM-AutoDP achieved a win rate exceeding 80% compared to models trained on raw, unprocessed data under GPT-4 evaluation.
  • Outperforming AutoML Baselines: LLM-AutoDP consistently beat SOTA LLM-agent AutoML baselines (like SELA), securing an approximate 65% win rate.
  • Massive Speedups: On the Medical-O1 dataset, combining DPS, PTS, and CRM reduced the total strategy search time from 50 hours down to just 2.5 hours—a staggering 95% reduction in computational overhead.
Figure 2: Visualization of the distribution of the original data and the data sampled by 20% on Huatuo‑26M‑Lite dataset. It can be seen that the distribution of the sampled data is consistent with that of the original data.

Limitations and Future Work

While highly effective, the current iteration of LLM-AutoDP is limited to text-based QA and dialogue datasets. The authors note that extending the framework to support multi-modal data (images, audio, structured tables) is a necessary next step. Additionally, they plan to explicitly integrate formal privacy-preserving mechanisms, such as differential privacy, directly into the loop to provide mathematical guarantees against data leakage during fine-tuning.

Summary updated

BibTeX
@misc{huang2026llm,
  author = {Wei Huang and Anda Cheng and Yinggui Wang and Lei Wang and Tao Wei},
  title = {{LLM-AutoDP: Automatic Data Processing via LLM Agents for Model Fine-tuning}},
  year = {2026},
  eprint = {2601.20375},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2601.20375},
}
Figure