mlsanityData to 7 Oct 2026

CLEAR: Context Augmentation from Contrastive Learning of Experience via Agentic Reflection

arXiv 2604.07487 ↗First posted 8 Apr 2026cs.AIcited by 0

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

  1. 2025Learning Hierarchical Procedural Memory for LLM Agents through Bayesian Selection and Contrastive Refinement22 Dec
  2. 2025Agentic Context Engineering: Evolving Contexts for Self-Improving Language Models6 Oct

Other references · 66

  1. 2022Training language models to follow instructions with human feedbackcited by 15,712
  2. 2017Proximal Policy Optimization Algorithmscited by 14,441
  3. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  4. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
  5. 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 8,851
  6. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
  7. 2025Qwen3 Technical Reportcited by 8,195
  8. 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 7,916
  9. 2018Representation Learning with Contrastive Predictive Codingcited by 7,662
  10. 2020Scaling Laws for Neural Language Modelscited by 6,411
  11. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
  12. 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,072
38 more
  1. 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,064
  2. 2022Training a Helpful and Harmless Assistant with Reinforcement Learning from Human Feedbackcited by 3,634
  3. 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,155
  4. 2025DAPO: An Open-Source LLM Reinforcement Learning System at Scalecited by 2,678
  5. 2022Emergent Abilities of Large Language Modelscited by 2,483
  6. 2024π0: A Vision-Language-Action Flow Model for General Robot Controlcited by 2,297
  7. 2023A Survey on Large Language Model based Autonomous Agentscited by 2,203
  8. 2023Retrieval-Augmented Generation for Large Language Models: A Surveycited by 2,185
  9. 2023Voyager: An Open-Ended Embodied Agent with Large Language Modelscited by 2,081
  10. 2024HybridFlow: A Flexible and Efficient RLHF Frameworkcited by 1,980
  11. 2023AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversationcited by 1,906
  12. 2023MetaGPT: Meta Programming for A Multi-Agent Collaborative Frameworkcited by 1,761
  13. 2021WebGPT: Browser-assisted question-answering with human feedbackcited by 1,722
  14. 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineeringcited by 1,628
  15. 2024LlamaFactory: Unified Efficient Fine-Tuning of 100+ Language Modelscited by 1,442
  16. 2023The Rise and Potential of Large Language Model Based Agents: A Surveycited by 1,422
  17. 2025Search-R1: Training LLMs to Reason and Leverage Search Engines with Reinforcement Learningcited by 1,371
  18. 2023CAMEL: Communicative Agents for "Mind" Exploration of Large Language Model Societycited by 1,348
  19. 2023Gorilla: Large Language Model Connected with Massive APIscited by 1,302
  20. 2022WebShop: Towards Scalable Real-World Web Interaction with Grounded Language Agentscited by 1,197
  21. 2021A General Language Assistant as a Laboratory for Alignmentcited by 1,023
  22. 2025OpenAI GPT-5 System Cardcited by 910
  23. 2023ChatDev: Communicative Agents for Software Developmentcited by 893
  24. 2025Group Sequence Policy Optimizationcited by 788
  25. 2025DeepSeek-V3.2: Pushing the Frontier of Open Large Language Modelscited by 755
  26. 2024Executable Code Actions Elicit Better LLM Agentscited by 537
  27. 2025GEPA: Reflective Prompt Evolution Can Outperform Reinforcement Learningcited by 449
  28. 2018Scalable agent alignment via reward modeling: a research directioncited by 438
  29. 2024AppWorld: A Controllable World of Apps and People for Benchmarking Interactive Coding Agentscited by 359
  30. 2023Enhancing Retrieval-Augmented Large Language Models with Iterative Retrieval-Generation Synergycited by 343
  31. 2025ToolRL: Reward is All Tool Learning Needscited by 342
  32. 2023Multi-Agent Collaboration: Harnessing the Power of Intelligent LLM Agentscited by 329
  33. 2022Generate rather than Retrieve: Large Language Models are Strong Context Generatorscited by 296
  34. 2025VAPO: Efficient and Reliable Reinforcement Learning for Advanced Reasoning Taskscited by 281
  35. 2024Optimizing Instructions and Demonstrations for Multi-Stage Language Model Programscited by 270
  36. 2023Query Rewriting for Retrieval-Augmented Large Language Modelscited by 211
  37. 2025Dynamic Cheatsheet: Test-Time Learning with Adaptive Memorycited by 146
  38. 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

  1. 2026Retrieval-Augmented LLM Agents: Learning to Learn from Experience
  2. 2026Beyond Reward Engineering: A Data Recipe for Long-Context Reinforcement Learning
  3. 2025Contextual Experience Replay for Self-Improvement of Language Agents
  4. 2025Memory as Action: Autonomous Context Curation for Long-Horizon Agentic Tasks
  5. 2026Decocted Experience Improves Test-Time Inference in LLM Agents
  6. 2026Agentic Context Learning with Self-Discovered Specification
  7. 2024Probing the Capacity of Language Model Agents to Operationalize Disparate Experiential Context Despite Distraction
  8. 2025Memento 2: Learning by Stateful Reflective Memory