Agentic Teaching Framework: How to Make LLMs Better by Teaching Them Skills
This article introduces an agentic teaching framework that turns an AI agent into a "teaching director" that automatically distills reusable skills from task execution and uses them to train a student model. It walks through the three-stage loop (skill distillation, skill-assisted training, and skill-free evaluation), the controlled experimental setup, and the counterintuitive finding that keeping skill instructions during training leads to better results even when those skills are removed at inference time. The article closes with practical engineering recommendations for teams that want to improve model utility under limited compute.
1. Background: “Doing” a Task Is Not the Same as “Learning” It
As agentic applications spread quickly, a familiar pattern shows up: on the same task, an agent with access to a skill library looks impressive, but the moment you remove the skill prompts, the base model reverts to its usual behavior. This suggests that most current approaches stop at bolt-on capabilities: the model has learned to “follow the instructions” rather than internalizing the methodology as a behavioral tendency in its parameters.
This raises a core engineering question: can an agent do more than execute tasks and instead take on the role of a “teaching director” that automatically extracts reusable skills from the task process, then uses those skills to improve a student model, so the student can eventually handle tasks on its own without any prompts?
An open-source agent training framework from a university research team is built around exactly this question. Its approach can be summarized in three stages: skill distillation → skill-assisted training → skill-free evaluation.
2. Method Framework: A Three-Stage Loop
1. Skill Distillation Stage
The teacher agent repeatedly attempts tasks from a task pool and converts both successes and failures into structured skill entries. A skill is not a simple log; it is a “lesson plan” that includes applicable conditions, operational steps, and common pitfalls.
2. Skill-Assisted Training Stage
During supervised fine-tuning, the student model keeps the skill instructions on the input side, while the output side learns only high-quality trajectories. The key point is: the training input includes skills, but the supervised output contains no trace of them.
3. Skill-Free Evaluation Stage
In the final exam, the student model is not attached to any generated skills and must rely purely on its internalized ability to handle three types of hard tasks: terminal operations, deep search, and software engineering.
3. Experimental Setup: Tight Controls Make the Results Convincing
The credibility of the framework comes from “almost strict” control conditions:
- The teacher is fixed to the same model;
- The task pool is exactly the same;
- The training sample size is strictly identical, with 512 trajectories each;
- The full supervised fine-tuning recipe is exactly the same;
- The only variable is “whether automatically generated skills are introduced.”
Under this setup, student models at two scales, 4B and 9B, outperformed conventional supervised fine-tuning based on successful trajectories across all 6 evaluations on three major benchmarks, with an average improvement range of 1.42 to 8.99 percentage points. This range shows that the gains are not limited to large models; smaller models can also benefit from the “teaching dividend”, which is especially important for cost-sensitive enterprise deployments.
4. A Counterintuitive Finding: Why Keeping Skills During Training Works Better
The second conclusion is even more intriguing. Conventional intuition says that if there are no skill prompts at inference time, the skill instructions should be removed during training to align the training and inference distributions. But the experiments show that, with exactly the same supervised output, the group that kept the skill instructions won across all 6 evaluations, leading by 2.15 to 4.01 percentage points.
The reason can be understood this way: the skill instructions act as scaffolding on the input side. They lower the “search difficulty” for the student model when learning trajectories, making it easier for the model to focus on “why do it this way” rather than “what should the first step be.” The scaffolding is removed at exam time, but the representations and policy tendencies formed during the building process are retained.
A schematic way to organize the training samples is shown below:
{"system": "You are a task-execution agent","input": "Task description + retrieved skill entries (applicable conditions/steps/pitfalls)","output": "Expert trajectory identical to the no-skill version"}
5. Engineering Recommendations
- Make the skill library governable: skill entries need deduplication, versioning, and applicable-scenario labels to avoid “lesson plans clashing with each other.”
- Keep training and evaluation strictly isolated: no skill fields should remain in the evaluation input, to prevent inflated metrics.
- Pilot with smaller models first: 4B-level models can already validate the gains, so you can start with a canary environment built from a container platform and log services.
- Establish a control baseline: always keep the “fine-tuning on successful trajectories only” baseline so you can quantify the real increment of the teaching framework.
- Focus on distribution differences rather than blindly aligning: this case suggests that more consistent training and inference distributions are not always better, and scaffold-style inputs may bring extra regularization benefits.
6. Conclusion
Upgrading an agent from an “executor” to a “teaching director” is essentially about turning experience into reusable assets and then internalizing them through training. For teams that want to improve the practical capability of models under limited compute, this “give the scaffolding first, then remove it” paradigm offers a low-cost, verifiable, and reproducible technical path.
