Agentic Teaching Distillation: A Better Way to Train LLMs
This article introduces the "Head of Teaching" paradigm for post-training AI agents, which shifts the focus from collecting more data to designing structured learning trajectories. It explains the three bottlenecks of success-only SFT, the closed-loop mechanism of task layering, trajectory generation, quality filtering, and error recycling, and a controlled experiment showing consistent gains of 1.42 to 8.99 percentage points over baseline SFT. It also covers a counterintuitive finding: keeping skill prompts during training while removing them at evaluation performs better, along with practical steps for enterprise adoption.
1. The Bottleneck Has Shifted from Compute to Curriculum
As large models iterate quickly, what teams lack is often not training compute but high-quality, reusable training data that covers long-tail scenarios. This is especially true for AI agents, where task chains are long, tool calls are frequent, and failure modes are complex. Supervised fine-tuning (SFT) that relies only on successful trajectories runs into three bottlenecks:
- Success bias: Keeping only successful samples means the model only sees smooth paths and never learns how to recover from failure.
- Distribution fragility: A slight mismatch between training and inference prompt distributions causes noticeable performance swings.
- Insufficient long-tail coverage: Exception branches, retries, and rollbacks in real business workflows are hard to cover through manual labeling alone.
As a result, the industry is shifting attention from “piling up data” to “improving the teaching mechanism”: a stronger agent takes on a role similar to a Head of Teaching, responsible for designing learning trajectories, organizing exercises, grading, and iterating, thereby systematically improving the student model’s learning efficiency.
2. The Core Method: Turning an Agent into a Head of Teaching
The “Head of Teaching” paradigm essentially upgrades data production from “collection” to “instructional design.” The key is not a single prompt but a closed-loop mechanism:
- Task layering: Group the task pool by difficulty and capability dimensions (terminal operations, retrieval, engineering edits) to ensure broad coverage.
- Trajectory generation: The teacher agent produces complete interaction trajectories in a controlled environment, including tool calls, observations, failures, and corrections.
- Quality control: Filter and weight trajectories using verifiable signals (tests passing, answer consistency, step validity).
- Iterative feedback: Feed the student model’s typical errors back into the teaching pool, creating a “mistake notebook” style of reinforcement.
A schematic teaching loop can be expressed in pseudocode:
for round in range(R):tasks = sampler.sample(task_pool, n=512) # Fixed sample size for fair comparisontrajs = teacher.run(tasks, skill_prompt=Keep) # Teacher produces teaching trajectoriesdata = verifier.filter(trajs) # Filter by verifiable signalsstudent = sft(student, data, recipe=FULL_SFT) # Same full SFT recipetask_pool.update(collect_errors(student)) # Recycle mistakes
3. Controlled Experiment Design: Why the Results Are Trustworthy
The most valuable aspect of this paradigm is its disciplined variable control, which makes the conclusions interpretable:
- Fixed teacher: The same teacher model avoids confounds from capability drift.
- Fixed task pool: The same set of tasks keeps difficulty consistent.
- Fixed sample size: 512 trajectories in all cases, ruling out the explanation that “more data is simply better.”
- Fixed training recipe: The same full SFT pipeline and hyperparameter framework.
Under these conditions, student models (at 4B and 9B scales) outperformed conventional SFT using only successful trajectories across all 6 evaluations spanning terminal operations, deep search, and software engineering, with an average improvement of roughly 1.42 to 8.99 percentage points. This indicates the gains come from the teaching structure, not from scale or data volume.
4. A Counterintuitive Finding: No Prompts at Evaluation, but Keep Them in Training
The second conclusion is especially noteworthy for engineering teams: evaluation is conducted with no skill prompts at all, yet keeping skill instructions in the training input (Keep) outperforms removing them to “align training and inference distributions” (Remove). With identical supervised outputs, Keep won in all 6 experiments, by about 2.15 to 4.01 percentage points.
The underlying logic can be explained as follows:
- Prompts are scaffolding, not answer leakage: They help the model learn priors for task decomposition and tool selection.
- Capabilities can be internalized: The scaffolding shapes the policy during training and can still be used when removed at evaluation.
- Over-alignment weakens the learning signal: Removing prompts for distributional consistency is like taking away the teaching scaffold, reducing the information content of samples.
Engineering recommendation: evaluate “training distribution alignment” and “instructional information retention” separately, and do not sacrifice learning signal for surface-level consistency.
5. Practical Adoption: How Enterprises Can Reuse This Paradigm
- Build a verifiable task pool first: Prioritize scenarios with automatic判定 such as script execution, retrieval answer consistency, and unit tests.
- Validate quickly with small samples: Run A/B tests at the 512-trajectory scale to quickly gauge teaching gains.
- Dual-track evaluation: Report both “with prompts” and “without prompts” results to avoid misjudgment.
- Institutionalize mistake recycling: Turn failed trajectories into ongoing teaching material.
- Cost and governance: Use a container platform to isolate execution environments, use logging services and monitoring alerts to track trajectory quality, and use object storage to archive data versions.
6. Conclusion
The lesson of the “Head of Teaching” paradigm is that competitiveness in post-training is shifting from “who has more data” to “who teaches better.” Under strictly controlled comparisons, structured teaching trajectories consistently deliver gains of 1 to 9 percentage points, and the rule of “keep prompts in training, remove them at evaluation” offers a low-risk, reproducible optimization path for engineering deployment.
