Supervised fine‑tuning on teacher‑generated trajectories is the standard first stage for distilling tool‑calling abilities. Deployed agents re‑run this stage daily or weekly, paying the expensive teacher cost each cycle, but the pipeline uses a generate‑and‑filter mechanism that keeps only passing trajectories and discards the rest. Because failed cases provide no learning signal, the same hard scenarios persist across cycles.
On $\\tau$2-bench, 57% of teacher trials fail, and about two‑thirds of those are near‑misses—most tool calls are correct, undone by a single decisive error.
We introduce PROOF‑Gen (Per‑scenario Reflective Optimization to Overcome Failed Generation), which recovers golden trajectories from failures via per‑scenario prompt optimization. For each failed task, a reflector analyzes the execution trace and evaluation feedback, then writes corrective guidance that steers the teacher toward a passing trajectory. The guidance is stripped before training, so the student learns from clean demonstrations without task‑specific scaffolding.
On $\\tau$2-bench, per‑scenario optimization recovers 93% of failed scenarios. Fine‑tuning on the combined data boosts Qwen3‑4B‑Instruct‑2507 Pass$^1$ from 0.132 to 0.529, and Gemma 4 E4B‑it gains +7.2 pp on BFCL v4 multi‑turn tasks.
In a deployed pipeline, the method lifts trajectory quality by +6.3 pp goal completion, transfers to an on‑device model with +1.5 pp goal completion and +1.7‑5.0 pp across response‑quality metrics, with positive transfer in every locale (non‑English average +1.48 pp).
Blogger's Review: PROOF‑Gen’s self‑reflective correction loop dramatically improves the quality of distilled data, especially for tool‑calling tasks with high failure rates. The approach balances data efficiency and deployment cost, and is promising for broader multilingual and multimodal applications.