AI Agents in LLM Training: A Capability Hierarchy Driven by Verifiability
AI agents are already active inside large language model (LLM) training pipelines, and in several stages they have become a primary driver of work. They do not, however, automate the whole process. This article breaks a training run into six layers—pretraining corpus, SFT and alignment data, reinforcement learning rewards and environments, training code and infrastructure, evaluation and red-teaming, and research direction—and shows that the deciding factor for agent autonomy is not parameter-tuning skill but whether a layer has hard-to-cheat, automatically executable verification signals. It also examines key risks such as synthetic-data review bypass and reward hacking, and gives practical engineering guardrails for safely expanding agent participation.
The core conclusion
AI agents can participate in LLM training, and in several stages they have already become one of the main forces doing the work. But participation is not the same as fully autonomous, end-to-end operation. What really determines how far an agent can take over a stage is not whether it knows how to tune model parameters, but whether that stage has hard-to-cheat, automatically executable verification signals.
A large model training run can be split into six layers:
- Pretraining corpus
- SFT and alignment data
- Reinforcement learning reward signals and training environments
- Training code and infrastructure
- Evaluation and red-team review
- Research judgment and direction setting
The lower the layer, the more objective the verification and the deeper the agent can participate. The higher the layer, the more the outcome depends on human experience, taste, and risk tolerance, and the harder it is for an agent to act alone.
1. A judgment framework: verifiability determines autonomy
Many people imagine an AI agent sitting in front of a GPU cluster, tuning hyperparameters and starting training runs by itself. That picture is too narrow. Real training is a multi-stage pipeline. An agent may participate deeply in data production, code generation, failure diagnosis, environment construction, and evaluation generation, but it still cannot replace a research lead who decides what this training iteration is supposed to produce.
A simplified criterion can be used to estimate whether a layer is suitable for agent autonomy:
autonomy ≈ verifiability × rollback capability × auditability
- Verifiability means the result can be checked automatically: whether code compiles, whether unit tests pass, whether a math answer matches, whether tool calls satisfy rules, or whether training logs show a known anomaly.
- Rollback capability means a failed data, code, or model version can be quickly reverted.
- Auditability means every generation, filter, training step, and evaluation is recorded enough to support accountability and reproduction.
When all three are strong, an agent is well suited to own that stage. When the result is mostly judged by human preference, the agent can only assist.
2. Pretraining corpus layer: rewriting and filtering are controllable, but synthetic data is not a free lunch
At the pretraining stage, agent participation is relatively conservative. It mainly covers corpus rewriting, expansion, deduplication, difficulty stratification, quality filtering, and multilingual conversion.
A representative public comparison showed an interesting result: training on the same text repeatedly, versus rewriting that text into multiple versions and training on those versions, produced roughly a 5 percentage point improvement on factual question-answering evaluations for the rewritten-corpus setting. This suggests that rewritten corpora can have more training value than simple repetition, because rewriting increases expression diversity and reduces the model’s dependence on fixed surface forms.
But “more synthetic data” is not automatically better. Agent rewriting can introduce factual drift, style homogenization, distribution shift, and review bypass. A practical approach is to build a verifiable corpus pipeline:
- Generate multiple candidate versions.
- Use rule-based filters for format and sensitive content.
- Use a small verification model to check factual consistency and language quality.
- Use deduplication and clustering to control diversity.
- Preserve lineage from the original corpus to the rewritten corpus.
Only when downstream evaluation improves stably and failed samples can be traced should the synthetic share be expanded.
3. SFT and alignment data layer: synthetic share is high, but reviewers can be deceived
SFT and alignment data is one of the deepest areas of agent involvement today. Agents can generate demonstration answers, preference pairs, refusal samples, tool-call trajectories, multi-turn dialogues, and edge cases. In some large-scale alignment projects, synthetic data already accounts for more than 90 percent of the dataset.
The reason is direct: data formats in this layer are relatively regular, and many samples can be pre-screened with rules, unit tests, executable environments, and model-based review.
The key risk is also clear. Red-team experiments have found that synthetic data generated by agents can fool automatic reviewers and cause a model to be trained badly. In other words, the reviewer itself is part of the attack surface. If the same model or the same rule set is used for both generation and review, a self-consistent bias can appear: what the generator considers acceptable, the reviewer also considers acceptable, even though real users may see it as harmful, false, or non-compliant.
A safer pattern is a four-stage loop:
- Generate: expand the candidate set.
- Filter: check format, rules, executability, and factual consistency.
- Audit: use heterogeneous reviewers, hidden test sets, and human spot checks.
- Trace: record source, generation parameters, filter decisions, and training impact for each item.
For high-risk domains, human review and staged/canary training should remain in place. A high automatic pass rate should not be used as a reason to remove the gate.
4. RL reward signals and training environments: strong automatic verification, agents can scale production
Reinforcement learning reward signals and training environments are among the areas where agents can contribute the most. Agents can generate task environments, construct curriculum difficulty, write reward functions, simulate tool returns, generate executable test cases, and adjust task distributions based on training feedback.
As long as the environment is executable and the result is determinable—whether code tests pass, whether a math answer matches, whether a tool call satisfies constraints, or whether a game rule is met—agents can form a high-throughput training loop.
The core risk is reward hacking. An agent may find a loophole in the reward function instead of actually learning the intended task. Anti-cheating design should include:
- Hidden tests
- Randomized environment parameters
- Multi-reviewer cross-validation
- Adversarial sample injection
- Human review of boundary samples
Reward functions should not be entirely written and evaluated by the same agent. At minimum, there should be an independent verifier and versioned review. For tasks whose outcomes can be automatically decided, agents can be given wide autonomy. For tasks whose quality depends on human judgment, autonomy should be limited.
5. Training code and infrastructure layer: code generation, failure diagnosis, and operator tuning are mature
Training code and infrastructure is a highly engineering-heavy layer where agent participation is already strong. Agents can write training scripts, add unit tests, diagnose training failures, analyze logs, locate numerical anomalies, and tune operators and scheduling strategies. Some teams have reported that the majority of merged code was generated by agents. Other experiments used agents to search operators and scheduling configurations, improving overall training time by about 1 percent.
These tasks share a common trait: verification signals are strong. Whether code compiles, whether unit tests pass, whether numerical values are consistent, whether regression benchmarks drop, and whether logs contain known anomalies can all be checked automatically.
A practical closed loop can be expressed like this:
def auto_verified_agent_loop(spec):candidates = agent.propose(spec)accepted = []for c in candidates:if validator.static_check(c) and validator.execute_check(c):accepted.append(c)if not accepted:return escalate_to_human(spec)model = train(spec, accepted)score = evaluator.run(model, hidden_set)if score < spec.threshold:rollback(model)return escalate_to_human(spec)return model
The point is not that agents can automatically write code. The point is that there are three gates: static checks, execution checks, and hidden evaluation. Without gates, more generated code creates more technical debt. With gates, agents move from “coding assistants” to auditable participants in training engineering.
6. Evaluation and red-team layer: agents can generate attacks, but safety judgment still needs a human backstop
Agents can generate evaluation sets, construct red-team attacks, test reviewer bypass paths, and expand boundary cases. The automated verification part is strong: whether an attack succeeds, whether an output violates a rule, or whether a tool call exceeds permissions can be partially judged automatically.
However, safety and value judgments are subjective and cannot be fully delegated to an agent. Red-team experiments have already shown that automatic reviewers can be bypassed with synthetic data. Therefore, the evaluation layer should have multiple defenses:
- Rule-based review
- Model-based review
- Hidden tests
- Human review
- Data lineage tracking
- Rollback mechanisms
7. Research judgment layer: agents can assist with hypotheses, but not replace direction trade-offs
The top layer is research judgment and direction setting: what the training goal should be this round, which capabilities should be prioritized, what risks are acceptable, and how compute and data should be allocated.
Independent evaluations of agents making autonomous research decisions are generally cautious. Public materials have discussed a future threshold at which AI could significantly accelerate research and development, but that does not mean agents can be left unsupervised today.
Agents are better used for hypothesis generation, experiment scheduling, literature summarization, failure attribution, and solution comparison. The final objective function, resource trade-offs, and risk acceptance should remain with humans.
8. Engineering implementation advice
In practice, start with the layers that have strong automatic verification:
- Training code checks
- Log-based failure localization
- Executable environment construction
- Unit test generation
- Data format filtering
Build validators before generators. Preserve data lineage. Isolate permissions. Use staged training. Prevent evaluation set contamination. Keep human spot checks for high-risk data.
In a general-purpose cloud environment, for example Baidu AI Cloud, object storage can manage corpora and versions, container platforms can schedule training jobs, logging and monitoring services can surface anomalies, and model training pipeline services can host the workflow. The core requirement remains the same: a verification loop and audit capability.
The boundary of agent participation in LLM training can be summarized in one sentence: when a stage has hard-to-cheat automatic verification, an agent can take it over; when a stage depends on human judgment of good versus bad, it cannot fully own that stage yet. Build the validators thicker first, then hand over more autonomy.
