CLEAR: Context Augmentation from Contrastive Learning of Experience via Agentic Reflection
On the map: LLM agents and tool use → Agent memory systems
Abstract (arXiv)
Large language model agents rely on effective model context to obtain task-relevant information for decision-making. Many existing context engineering approaches primarily rely on the context generated from the past experience and retrieval mechanisms that reuse these context. However, retrieved context from past tasks must be adapted by the execution agent to fit new situations, placing additional reasoning burden on the underlying LLM. To address this limitation, we propose a generative context augmentation framework using Contrastive Learning of Experience via Agentic Reflection (CLEAR). CLEAR first employs a reflection agent to perform contrastive analysis over past execution trajectories and summarize useful context for each observed task. These summaries are then used as supervised fine-tuning data to train a context augmentation model (CAM). Then we further optimize CAM using reinforcement learning, where the reward signal is obtained by running the task execution agent. By learning to generate task-specific knowledge rather than retrieve knowledge from the past, CAM produces context that is better tailored to the current task. We conduct comprehensive evaluations on the AppWorld and WebShop benchmarks. Experimental results show that CLEAR consistently outperforms strong baselines. It improves task completion rate from 72.62% to 81.15% on AppWorld test set and averaged reward from 0.68 to 0.74 on a subset of WebShop, compared with baseline agent. Our code is publicly available at https://github.com/awslabs/CLEAR.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Agent memory systems, one of 16 directions in LLM agents and tool use. Builds on 68 of its 103 references that are in the map. First posted on arXiv 8 Apr 2026.
Builds on
68 of 103 references.
Closest ancestors · 2
Same direction, newest first
- 2025Learning Hierarchical Procedural Memory for LLM Agents through Bayesian Selection and Contrastive Refinement22 Dec
- 2025Agentic Context Engineering: Evolving Contexts for Self-Improving Language Models6 Oct
Other references · 66
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2017Proximal Policy Optimization Algorithmscited by 14,441
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
- 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 8,851
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
- 2025Qwen3 Technical Reportcited by 8,195
- 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 7,916
- 2018Representation Learning with Contrastive Predictive Codingcited by 7,662
- 2020Scaling Laws for Neural Language Modelscited by 6,411
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
- 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,072
38 more
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,064
- 2022Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedbackcited by 3,634
- 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,155
- 2025DAPO: An Open-Source LLM Reinforcement Learning System at Scalecited by 2,678
- 2022Emergent Abilities of Large Language Modelscited by 2,483
- 2024π0: A Vision-Language-Action Flow Model for General Robot Controlcited by 2,297
- 2023A Survey on Large Language Model based Autonomous Agentscited by 2,203
- 2023Retrieval-Augmented Generation for Large Language Models: A Surveycited by 2,185
- 2023Voyager: An Open-Ended Embodied Agent with Large Language Modelscited by 2,081
- 2024HybridFlow: A Flexible and Efficient RLHF Frameworkcited by 1,980
- 2023AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversationcited by 1,906
- 2023MetaGPT: Meta Programming for A Multi-Agent Collaborative Frameworkcited by 1,761
- 2021WebGPT: Browser-assisted question-answering with human feedbackcited by 1,722
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineeringcited by 1,628
- 2024LlamaFactory: Unified Efficient Fine-Tuning of 100+ Language Modelscited by 1,442
- 2023The Rise and Potential of Large Language Model Based Agents: A Surveycited by 1,422
- 2025Search-R1: Training LLMs to Reason and Leverage Search Engines with Reinforcement Learningcited by 1,371
- 2023CAMEL: Communicative Agents for "Mind" Exploration of Large Language Model Societycited by 1,348
- 2023Gorilla: Large Language Model Connected with Massive APIscited by 1,302
- 2022WebShop: Towards Scalable Real-World Web Interaction with Grounded Language Agentscited by 1,197
- 2021A General Language Assistant as a Laboratory for Alignmentcited by 1,023
- 2025OpenAI GPT-5 System Cardcited by 910
- 2023ChatDev: Communicative Agents for Software Developmentcited by 893
- 2025Group Sequence Policy Optimizationcited by 788
- 2025DeepSeek-V3.2: Pushing the Frontier of Open Large Language Modelscited by 755
- 2024Executable Code Actions Elicit Better LLM Agentscited by 537
- 2025GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learningcited by 449
- 2018Scalable agent alignment via reward modeling: a research directioncited by 438
- 2024AppWorld: A Controllable World of Apps and People for Benchmarking Interactive Coding Agentscited by 359
- 2023Enhancing Retrieval-Augmented Large Language Models with Iterative Retrieval-Generation Synergycited by 343
- 2025ToolRL: Reward is All Tool Learning Needscited by 342
- 2023Multi-Agent Collaboration: Harnessing the Power of Intelligent LLM Agentscited by 329
- 2022Generate rather than Retrieve: Large Language Models are Strong Context Generatorscited by 296
- 2025VAPO: Efficient and Reliable Reinforcement Learning for Advanced Reasoning Taskscited by 281
- 2024Optimizing Instructions and Demonstrations for Multi-Stage Language Model Programscited by 270
- 2023Query Rewriting for Retrieval-Augmented Large Language Modelscited by 211
- 2025Dynamic Cheatsheet: Test-Time Learning with Adaptive Memorycited by 146
- 2025A Survey of Context Engineering for Large Language Modelscited by 120
50 most cited of 66 All 66 (JSON)
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Retrieval-Augmented LLM Agents: Learning to Learn from Experience
- 2026Beyond Reward Engineering: A Data Recipe for Long-Context Reinforcement Learning
- 2025Contextual Experience Replay for Self-Improvement of Language Agents
- 2025Memory as Action: Autonomous Context Curation for Long-Horizon Agentic Tasks
- 2026Decocted Experience Improves Test-Time Inference in LLM Agents
- 2026Agentic Context Learning with Self-Discovered Specification
- 2024Probing the Capacity of Language Model Agents to Operationalize Disparate Experiential Context Despite Distraction
- 2025Memento 2: Learning by Stateful Reflective Memory