Training Language Agents to Learn from Experience
Not on the map. Why?
Abstract (arXiv)
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.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 22 of its 23 references that are in the map. First posted on arXiv 19 May 2026.
Builds on
22 of 23 references.
References · 22
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 9,379
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,276
- 2023A Survey on Large Language Model based Autonomous Agentscited by 2,242
- 2024Qwen2 Technical Reportcited by 2,120
- 2024HybridFlow: A Flexible and Efficient RLHF Frameworkcited by 2,057
- 2020ALFWorld: Aligning Text and Embodied Environments for Interactive Learningcited by 1,205
- 2023ExpeL: LLM Agents Are Experiential Learnerscited by 876
- 2023Large Language Models as Optimizerscited by 864
- 2025GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learningcited by 542
- 2023Cognitive Architectures for Language Agentscited by 429
10 more
- 2023Retroformer: Retrospective Large Language Agents with Policy Gradient Optimizationcited by 112
- 2021MiniHack the Planet: A Sandbox for Open-Ended Reinforcement Learning Researchcited by 97
- 2024LMAct: A Benchmark for In-Context Imitation Learning with Long Multimodal Demonstrationscited by 32
- 2025Meta-RL Induces Exploration in Language Agentscited by 21
- 2025Assessing Adaptive World Models in Machines with Novel Gamescited by 20
- 2025Self-Generated In-Context Examples Improve LLM Agents for Sequential Decision-Making Taskscited by 19
- 2025System Prompt Optimization with Meta-Learningcited by 18
- 2025SAMULE: Self-Learning Agents Enhanced by Multi-level Reflectioncited by 15
- 2024Can foundation models actively gather information in interactive environments to test hypotheses?cited by 8
- 2025Improving Retrospective Language Agents via Joint Policy Gradient Optimizationcited by 4
Built on by
Citing papers per year: 2026: 1.
1 paper.