Perplexity cuts tool failures by 21% by training on real user mistakes

Perplexity's research team has published a post describing a new post-training method for their Computer agent. Instead of sampling only sessions that ended in success — the standard Rejection Sampling Fine-Tuning approach — the model learns from all interactions, including those that failed. The reasoning is straightforward: a correct final answer does not guarantee every step was sound, and an agent can recover from a tool error and still produce the right output. Imitating such a trajectory risks reinforcing the mistake, while discarding failed sessions throws away clear evidence of avoidable errors.
The pipeline classifies every assistant turn into one of three treatments. Imitate: error-free turns in successful sessions receive standard Cross-Entropy loss. Correct: turns where an error was detected and a verified hint is available receive KL-divergence loss, regardless of whether the session ultimately succeeded or failed. Keep as context: all remaining turns stay in the input but do not contribute to the loss. This means a successful session can supply both imitation and correction targets, while a failed session contributes only corrections.
A hint is a short corrective instruction based on information that was already available to the model. In one example, a search call set recency_filter to 'year' when the schema permits only 'day', 'week', or 'month'. The hint cites the failing call, the validation error, and suggests an allowed value or omission of the optional field. The correction step uses On-Policy Self-Distillation: the same GLM 5.2 checkpoint runs twice on the logged turn; the teacher sees the hint, the student does not. Both use teacher forcing, so no alternative completion is generated. The teacher's next-token probabilities are detached and used as a soft target via forward KL. The combined loss is (CE + λ × KL) divided by the number of masked tokens; when λ equals zero the method reverts to ordinary SFT, and the CE term is critical because correction-only training could let teacher and student collude by ignoring the context.
The data source is training-eligible Computer sessions generated by GLM 5.2, minus personal information and users who opted out. An LLM judge retains only tasks rated 4 or 5 on a 5-point difficulty scale. Two LLM judges must approve the final output for a session to count as successful. For user feedback, three LLM judges identify the responsible turn, and at least two must agree — a necessary step because the last turn before a complaint is the root cause in only about half the cases. Every hint is checked against the information available before the error, to limit hindsight bias. In one case a user asked for 'w3' in Paychex; the model assumed a typo for W-2 and searched for the wrong form; the hint points to that earlier misinterpretation, not just the final answer.
Hints work even before training. In an offline evaluation on 985 held-out error turns, the untrained base model avoided the original failure in 93.7% of cases when given hints, versus 75.1% without them. The corrected-action rate rose from 60.6% to 82.3%. On user-feedback turns, correction or correct-path rates increased from 40.0% to 75.0% when explicit evidence was present, and from 32.5% to 80.0% when intent had to be inferred. The numbers are striking, but they come from internal evaluation on a limited sample, not an externally audited benchmark.
The trained model has not been released as open weights or training code; it runs only as a model option inside Perplexity Computer. The base model, GLM 5.2, is publicly available on Hugging Face — meaning open weights, not fully open source. For developers building their own agents, the practical takeaway is methodological: separating imitation from correction, using context-grounded hints, and on-policy self-distillation are techniques that can be adopted without access to Perplexity's logs.