Agent Training Optimization: A "Teaching Director" Approach to More Effective LLM Post-Training

    This article explains how organizing agent post-training data like a teaching process, rather than simply collecting successful trajectories, can improve results. It covers a controlled experimental setup, the finding that process-oriented data and retained skill hints outperform vanilla SFT, and a practical four-step pipeline with engineering safeguards for reproducible gains.

    1. Background: Why Agent Post-Training Needs a “Teaching Director”

    In agent post-training, teams often focus on model size, inference budget, or the number of tools, while overlooking a more fundamental issue: how the training data is organized. Many failures do not stem from insufficient model capability, but from supervision signals that present only the final answer, with no representation of task decomposition, checkpoints, or error-correction paths.

    The “teaching director” idea upgrades data production from “collecting successful results” to “designing a teaching process”: a stable teacher policy produces trajectories, a unified task pool controls difficulty distribution, a fixed sample budget controls variables, and a single supervised fine-tuning (SFT) recipe completes training. This setup answers a key question: does the gain come from how the data is organized, or from other overlooked variables?

    2. Strict Controlled Experiment: Lock the Variables, Then Compare

    To validate the value of data organization, you must run a single-variable controlled comparison. At minimum, lock down the following four items:

    • Fixed teacher policy: the same teacher model, the same prompts, and the same tool permissions;
    • Fixed task pool: consistent task distribution, difficulty tiers, and evaluation criteria;
    • Fixed sample size: for example, 512 trajectories, to avoid confounding by data scale;
    • Fixed training recipe: the same full SFT pipeline and hyperparameter strategy.

    Under these conditions, you can compare two types of training input: one that keeps only successful trajectories (Vanilla SFT), and one that introduces process-oriented guidance and checkpoints into the trajectories (AutoMaster-style data organization). The original material shows that across six evaluations spanning three benchmarks—terminal operation, deep search, and software engineering—the latter improved by roughly 1.42 to 8.99 percentage points on average. The engineering takeaway is that how the data “tells the story” often matters more than how much data there is.

    3. Counterintuitive Finding: No Hints at Evaluation, but Keep Them in Training

    The second key pattern is that even when no skill hints are provided at evaluation time, keeping skill instructions in the training input (Keep) still outperforms removing them (Remove). With identical supervision outputs, the Keep condition won by roughly 2.15 to 4.01 percentage points across six experiments.

    The explanation is that prompts are not only for aligning the training and inference distributions; they also serve as course structure and attention guidance. Removing prompts degrades training samples into “context-free piles of answers,” making it hard for the model to learn when to retrieve, when to execute, and when to verify. Keeping prompts is like providing scaffolding during training, letting the model internalize task constraints as policy priors.

    Illustrative data structure (pseudocode):

    1. sample = {
    2. "task": "Locate the config and fix a startup failure in a restricted terminal environment",
    3. "skill_hint": "Reproduce first, then minimize, then verify", # Kept in the Keep experiment
    4. "trajectory": [
    5. {"step": 1, "action": "search", "observation": "3 candidate files matched"},
    6. {"step": 2, "action": "terminal", "observation": "Reproduced the failure log"},
    7. {"step": 3, "action": "verify", "observation": "Startup succeeded"}
    8. ]
    9. }

    4. Actionable Methodology: A Four-Step “Teaching Pipeline”

    1. Task tiering: tier by capability dimensions such as terminal operation, retrieval, and code repair, ensuring comparable difficulty between training and evaluation.
    2. Process annotation: fill in “hypothesis–verification–fallback” checkpoints within successful trajectories, rather than keeping only the final commands.
    3. Denoising and de-leakage: remove evaluation answer leakage, environment-specific paths, and identifiable information to ensure generalization.
    4. Ablation reproduction: run at least four comparisons—Keep/Remove and Vanilla/process-oriented data—to produce a reusable report.

    5. Engineering Considerations and Risk Control

    • Avoid “prompt dependence”: while keeping training prompts, gradually decay prompt strength to prevent the model from becoming unstable when evaluation has no prompts.
    • Control teacher bias: if the teacher policy favors a certain type of tool, it amplifies bias at the data layer, so the task pool needs reverse coverage.
    • Close the evaluation loop: terminal tasks need sandbox isolation, retrieval tasks need a fixed index snapshot, and software engineering tasks need fixed dependencies and test criteria.
    • Observability: log each step’s action, latency, and failure reason to help determine whether an issue is a data problem or an inference configuration problem.

    6. Conclusion

    Treating agent training as “teaching” rather than “drilling” yields control and reproducibility: under strictly identical conditions, both process-oriented data organization and retaining prompts during training deliver stable gains. For developers, the most worthwhile investment is not stacking more trajectories, but building a data governance and experimentation system that continuously produces high-quality teaching processes.