A Few Teacher Steps Go a Long Way: Efficient SFT Data Collection for LLM Agents

Junze Ye, Jiayi Cheng, Miao Lu, Michal Mankowski, Jose Blanchet, Mohsen BayatiNeurIPS 2026

TL;DR

Training small LLM agents by having them imitate full, start-to-finish demonstrations from a giant teacher model hits a performance plateau—and costs a fortune in API calls. This paper shows that instead of buying more full demonstrations, you get vastly better agents for a fraction of the budget by letting the student attempt tasks first, and having the teacher step in for just two to five turns to show it how to recover. Even better, this simple supervised fine-tuning (SFT) recipe outperforms reinforcement learning and distillation under matched compute budgets.

What Problem Does This Paper Address?

Imagine teaching a teenager to drive solely by having them watch dashcam footage of a professional chauffeur. Everything looks smooth until the teenager gets behind the wheel, drifts slightly toward a curb, and panics—because the pro never drifted toward a curb in the footage.

In imitation learning, training purely on expert start-to-end trajectories is called Behavior Cloning (BC). When training multi-turn LLM agents (models that use tools, search the web, or write code iteratively), scaling up pure BC hits a wall: the student never learns how to recover from its own compounding mistakes.

Robotics solved this years ago with DAgger, where the student drives, gets into weird states, and queries the expert on what to do next ("on-policy" teacher continuations). Recently, LLM researchers adopted this by running the teacher all the way to task completion from a student's partial attempt, throwing away failed runs. The catch? Querying frontier API teachers is expensive, and you still pay for discarded tokens! Prior studies largely ignored total supervision costs. The authors ask: Once initial behavior cloning plateaus, how should we spend our remaining teacher budget?

Methods

After training an initial student on a small seed dataset of full teacher trajectories (Pure-BC), the authors let the student generate trajectories, pick a random turn along the rollout, and hand the wheel to the teacher. They formalize data collection into specific recipes and track two distinct costs: total teacher inference spend ($C_{\text{i}}$) (including API prefill, KV-cache discounts, and discarded runs) and retained training tokens ($C_{\text{tr}}$).

Table 1: Hyperparameter recipes under Eq. 6. “All” means no filtering. The OP rows use ω = ω1. Setting Ktr = Ki retains every teacher turn in an accepted continuation. OEC [Lauffer et al., 2026] and LEAP/SCoRe [Choudhury and Sodhi, 2025, Lyu et al., 2026] are included for reference.

Alongside standard baselines like Pure-BC and OP-Success (running the teacher to the end and keeping only successes), they introduce two thrifty alternatives:

  • OP-Short: Caps the teacher takeover at just a few turns ($K_{\text{i}}$, e.g., 2–5 steps) with zero outcome filtering.
  • OP-Critical: Only asks the teacher to step in on failed student rollouts, keeps successful teacher rescues, and optionally clips the retained training data to just a few steps ($K_{\text{tr}}$).

Datasets

The authors test their recipes across three existing multi-turn agent benchmarks (no new benchmarks are introduced):

  • HotpotQA: Multi-hop question answering over Wikipedia using a search engine ($T_{\text{max}} = 5$ turns; Qwen2.5-3B student, Qwen3-235B API teacher).
  • OpenThoughts-TB-Dev: Command-line coding tasks inside Docker sandboxes ($T_{\text{max}} = 32$ turns; trained on OpenThoughts-Agent-v1-SFT tasks with Qwen3-8B student and GLM-4.6 API teacher).
  • ALFWorld: Text-based household exploration simulators ($T_{\text{max}} = 50$ turns; Qwen2.5-0.5B student, locally hosted Qwen3-8B teacher).

Key Insights and Ideas

  • The Goldilocks Zone of Teacher Takeovers: Why do 2–5 teacher steps work best? If the teacher runs all the way to completion, you waste money generating late-stage turns shaped mostly by the teacher anyway. Conversely, stopping after one step is often too brief to demonstrate error recovery—and wastes money on API prompt prefills! Continuing for 2–5 turns reuses the KV-cache at ~90% discount while teaching local recovery.
  • Hidden Costs of Post-Filtering: Filtering out failed teacher continuations (OP-Success) shrinks your training dataset ($C_{\text{tr}}$), which speeds up SFT, after you've already paid the API bill ($C_{\text{i}}$). Pre-filtering for student failures (OP-Critical) saves actual teacher inference dollars by not fixing what isn't broken.
  • Lightweight SFT Beats Heavyweight RL/Distillation: Standard SFT works with closed-source, black-box API teachers (no token probabilities needed) and avoids the engineering headache and compute burn of Reinforcement Learning (RL) or On-Policy Distillation (OPD).

Key Results

Across all benchmarks, branching from student contexts (OP) beats scaling up full demonstrations (Pure-BC) per dollar spent.

  • Big Savings over Pure-BC: Unfiltered OP-Short beats the strongest scaled Pure-BC baselines while slashing teacher inference costs by 20.4% on HotpotQA ($K_{\text{i}}=2$) and 82.7% on TB-Dev ($K_{\text{i}}=3$, gaining +5.43 percentage points in accuracy).
  • Short vs. Full Continuations: On ALFWorld, capping continuations at 5 steps cuts teacher output tokens by 22.0% compared to full continuations (OP-Full) with minimal accuracy difference (-1.77 pp), while beating 1-step continuations by +2.80 pp.
  • Smart Filtering + Clipping: Combining OP-Critical with 3-to-5-turn clipping matches unfiltered accuracy on HotpotQA and ALFWorld while cutting teacher inference cost by 27% to 42% and retained SFT tokens by 47% to 55%.
  • Compute-Matched Showdowns: On HotpotQA, GRPO (RL) requires 4 to 6$\times$ more compute (node-hours) to match a 1-step OP-Short model. On ALFWorld, OP-Short hits 77.2% unseen-task accuracy in 0.67 H100-hours, whereas reverse-KL OPD peaks at just 72.9% even after 9.9 H100-hours.

Limitations and Future Work

  • Single-Round Only: Experiments only test one round of data expansion from a fixed initial student; dynamics might shift over multiple iterative DAgger rounds.
  • Tuning Required: The optimal continuation cap $K_{\text{i}}$ varies by environment, and there is currently no theoretical rule to pick it without tuning.
  • Verifier Dependency & Cost Estimates: OP-Critical requires automatic outcome verifiers (unavailable in datasets like v1-SFT), and API dollar figures rely on reconstructed KV-cache hit rates rather than exact provider billing logs.

Summary updated

Abstract

DAgger-style supervised finetuning (SFT) combines full teacher demonstrations with teacher continuations of partial student rollouts, providing supervision on contexts the learner encounters. We study how to allocate the teacher-inference budget for acquiring these continuations after initial behavior cloning. One existing collection recipe runs the teacher to termination and retains only successful continuations (OP-Success). Since rejected outputs still incur teacher-inference costs, we compare this recipe with shorter continuations without outcome filtering (OP-Short), and with continuing only failed learner rollouts while retaining successful continuations (OP-Critical). We evaluate these choices against acquiring additional full demonstrations, tracking total teacher-inference cost separately from retained training tokens. Across HotpotQA, ALFWorld, and Terminal-Bench-Dev, multi-turn teacher continuations improve the accuracy-cost tradeoff over scaling full demonstrations. On HotpotQA and Terminal-Bench-Dev, OP-Short surpasses the strongest tested pure behavior-cloning baseline while reducing estimated teacher-inference cost by 20\% and 83\%, respectively, and on ALFWorld five-step continuations cut teacher tokens by 22\% relative to full continuations with minimal accuracy loss. Controlled HotpotQA ablations show that by focusing on failed learner rollouts, OP-Critical achieves comparable accuracy to OP-Success with 30\% lower estimated teacher-inference cost and 36\% fewer retained training tokens. Compute-matched comparisons with reinforcement learning and on-policy distillation further support brief teacher continuations as an efficient and lightweight post-training tool.
BibTeX
@inproceedings{ye2026few,
  author = {Junze Ye and Jiayi Cheng and Miao Lu and Michal Mankowski and Jose Blanchet and Mohsen Bayati},
  title = {{A Few Teacher Steps Go a Long Way: Efficient SFT Data Collection for LLM Agents}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=exsMozVjaF},
}
Figure