How AI Agents Are Transforming the Full Workflow of LLM Training

    This article explores how AI agents are increasingly involved in the training of large language models (LLMs) beyond inference. It covers three core areas: synthetic data generation for post-training, reward model construction for reinforcement learning, and automated creation of RL environments. It also discusses engineering-side integration such as code generation, fault diagnosis, and performance tuning, along with the essential conditions and risk boundaries for reliable deployment. The piece provides a practical overview of the emerging paradigm where models help build models.

    1. Setting the Stage: Agents Are No Longer Just Using Models — They Are Building Them

    In the past, discussions about AI agents were mostly application-focused: having them call tools, generate reports, or automate workflows. Over the past year or two, a more significant trend has emerged — agents are moving backward into the training loop of large language models. They now contribute to data production, quality evaluation, and environment setup, and are becoming an integral part of the training pipeline.

    Publicly available training recipes for several open-source LLMs reveal that a substantial fraction of the task environments used in reinforcement learning are automatically constructed by models and agents. In some instruction-tuning datasets, the share of synthetic data exceeds 90%. These numbers indicate that “AI participating in AI training” is no longer a proof-of-concept but a large-scale production practice.

    This article addresses three key questions: Which parts of the training process can agents participate in? How are they implemented technically? What practical considerations should be kept in mind for deployment?

    2. Three Core Areas Where Agents Participate in Training

    2.1 Post-Training Synthesized Data: From Manual Annotation to Pipeline Production

    Supervised fine-tuning (SFT) and preference alignment require large volumes of high-quality instruction data. Traditional methods rely on human writing and labeling, which is costly, slow, and limited in coverage. The industry now widely adopts a “synthetic data pipeline” approach:

    • Seed generation: A strong model generates instructions in batches based on topic distributions, difficulty levels, and capability dimensions (reasoning, coding, math, multilingual, etc.).
    • Self-evolution: Existing instructions are rewritten, made more complex, or broken into sub-problems, exponentially expanding coverage.
    • Multi-model evaluation: Different models score and rank responses to create preference pairs, replacing part of manual labeling.
    • Quality filtering: Rule-based validation, deduplication, and fact-checking models are applied layer by layer to control noise.

    This entire pipeline is itself a collaborative process involving multiple agents — generation, review, and revision each play a distinct role. Industry experience shows that, provided filtering and quality control are strict, synthetic data can achieve nearly the same quality as human-annotated data for many alignment tasks, at a cost that is an order of magnitude lower.

    2.2 Reward Scoring: Turning Annotators into Judge Models

    Reinforcement learning (RLHF/RLVR) requires a reliable reward signal. Beyond rule-based verifiers (such as comparing math answers or passing unit tests), the reward model itself is trained on large amounts of labeled data — and these labels are increasingly generated by a strong model in the form of preference tags, with human sampling used for calibration.

    A common engineering structure looks like this:

    1. def reward(response: str, task: dict) -> float:
    2. rule_score = verifier(response, task) # rule-based reward: correctness, format, constraints
    3. judge_score = llm_judge(response, task) # model judge: usefulness, safety, fluency
    4. return alpha * rule_score + (1 - alpha) * judge_score

    In verifiable domains (math, code), rule-based rewards are preferred to ensure objectivity. In open-ended domains, LLM-as-a-Judge is used, with mechanisms such as pairwise judge agreement and human arbitration to reduce judge noise. This “judge agent” is a direct example of agents participating in training.

    2.3 Training Environment Construction: Agents Automatically Build Challenges

    Reinforcement learning requires task environments — problems, sandboxes, test cases, and interaction interfaces. Hand-writing thousands of high-quality environments is impractical, leading to the emergence of “agent-built environments.” Given a capability goal and difficulty distribution for a certain domain, an agent automatically generates task descriptions, verification scripts, and reference implementations, then runs a self-test loop inside a sandbox (task solvability, scoring correctness, difficulty distribution). Environments that fail are automatically discarded or sent back for revision. Public data shows that in some models’ RL training environments, the number of agent-constructed environments has reached the thousands. This essentially turns “environment engineering” into a programmable, iterable data problem.

    3. Engineering Practice: Deep Integration of Agents in Training Code

    Beyond data and environments, agents are also making headway in training engineering itself:

    1. Writing and maintaining training code: AI-powered coding tools can now handle a large portion of data loading, distributed configuration, and evaluation script generation. A leading lab has publicly stated that more than half of the merged code in its repository was produced by models, including training-related code.
    2. Training fault diagnosis: Interruptions, loss spikes, and out-of-memory errors are everyday occurrences. Agents can aggregate error messages from log services, compare differences against the last healthy checkpoint, and pinpoint the specific operator or configuration issue, offering fix suggestions — reducing troubleshooting time from hours to minutes.
    3. Kernel and performance tuning: More advanced exploration involves having agents automatically optimize operator kernels and compilation strategies — searching for faster implementations while preserving semantic equivalence. Research systems have shown that evolutionary search can improve overall training throughput by about 1%. The percentage may look small, but across a pre-training run that spans months, the savings in compute and cost are substantial.

    These three types of work share a common trait: they all involve tasks with clear feedback signals that can be automatically verified — exactly the scenarios where agents excel.

    4. Prerequisites for Deployment and Risk Boundaries

    To make agents reliably participate in training, several conditions must be met:

    • Strong verification signals: Tasks must have programmatically verifiable correctness criteria (tests passing, numerical comparison, constraint checks). Otherwise, the quality of synthetic data degrades rapidly.
    • Multi-layer quality gates: Generation, review, and spot-checking must be separated to avoid model self-reinforcement leading to distribution collapse and diversity loss.
    • Human calibration anchors: Periodically use a human-labeled subset to calibrate the automatic scoring system, preventing reward hacking.
    • Full observability: Rely on unified logging, monitoring, alerts, and experiment tracking so that every synthetic data point and every auto-built environment is traceable and rollback-able.
    • Compliance and copyright review: Synthetic data also needs screening for sensitive content and intellectual property issues — this is non-negotiable in enterprise-level training.

    At the same time, it is important to recognize the limits: agents excel at amplifying existing capabilities and processes, not at making the high-level judgments about training objectives. Decisions about data mixing ratios, reward design, and when to stop training still require human experience and care.

    5. Summary

    AI agents participating in LLM training currently concentrate on three main fronts: post-training synthetic data generation, reward signal production, and reinforcement learning environment construction. On the engineering side, they contribute to code writing, fault diagnosis, and performance tuning. The common logic is to hand the “verifiable and iterable” parts of training to automated pipelines, while human focus shifts to objective definition and quality control. As self-improvement loops mature, the share of “using models to build models” will continue to rise, and this will become the normal state of future training infrastructure.