← Back to Paper Radar

Training Language Agents to Learn from Experience

Yuval Shalev, Zifeng Ding, M. Jamnik
arXiv.org | 2026

Reading guide · Based on sections of the original paper

The authors frame cross-task self-improvement as an In-context Training (ICT) task. In it, a reflector turns an actor's trajectories on non-repeatable tasks into a new system prompt. They train that reflector with GRPO, rewarding each candidate prompt by replaying the previous batch with a frozen actor, and use no human examples.

Why read this

Agent practitioners weighing trainable prompt-level reflection against external memory or retrieval will find a clean setup, small but mostly positive gains at 7B scale, and a released library (MetaGym).

What the authors found

  • On held-out task types, the authors' trained Qwen2.5-7B reflector beats the untrained Qwen2.5-7B reflector in 11 of 12 settings. For example, ALFWorld Cool and Place rises from 42.4% to 49.2% at k=3. The exception is MiniHack Zap at k=3 (14.1% vs 18.8%). Each figure averages 10 ICT runs of 10 turns, keeping the best prompt per run. The untrained reflector also improves on the initial prompt. 5.2 Results
  • A reflector trained only on MiniHack (k=5) beats the untrained model on 4 of 6 ALFWorld task types. The authors call the other two comparable, though both are lower: 83.4% vs 87.8% and 34.0% vs 38.8%. The k=3 MiniHack reflector fails to transfer and is sometimes worse than the untrained model. 5.2 Results

Main limitation

The reported scores come from best-per-run prompts chosen on a fixed, repeatable held-out set. The authors note that such a set may not exist in deployment, so the numbers likely overstate what an agent without an oracle stopping rule would achieve. 5.3 Limitations

Where to start

5.2 Results · Check the per-task variance in Tables 1–2, the batch-size trade-offs, and the evidence that best prompts keep emerging after training turn 4.

Abstract

Language agents can adapt from experience in interactive environments, but current reflection-based methods can only self-correct within a single task instance. Whether such experience can be distilled into reusable lessons that improve performance on future unseen tasks remains unclear. We address this problem by introducing the In-context Training (ICT) task, a framework for evaluating cross-task self-improvement in language agents. In ICT, a reflector model observes trajectories collected by an actor model and generates system prompts intended to improve the actor's performance on future unseen tasks. We then propose an RL-based training pipeline for learning such reflections directly from experience, without human-provided examples. Across ALFWorld and MiniHack, our trained reflectors outperform an untrained baseline on most held-out task families, showing that the ability to learn from experience can itself be learned. In some cases, we observe generalisation beyond the benchmark on which the reflector was trained, to substantially different environments. Finally, we introduce MetaGym, a generic Python library for constructing meta-environments, enabling future research on self-improving language agents.

Generated automatically from paper sections on 2026-11-28.