TL;DR
This paper introduces SAGE, a novel framework for LLM agents that enhances their ability to learn and adapt in complex, dynamic environments. SAGE achieves this through an iterative feedback loop between an assistant and a checker, combined with a novel memory management system inspired by the Ebbinghaus forgetting curve, leading to significant performance improvements across various benchmarks.
What Problem Does This Paper Address?
Large Language Models (LLMs) have shown remarkable capabilities, but when deployed as autonomous agents (LLM agents), they face several challenges. These include making continuous decisions in evolving environments, a lack of long-term memory to retain information over extended interactions, and limited context windows that hinder their ability to process long sequences of information. Existing approaches often address these issues in a task-specific manner, lacking a general framework for systematic improvement. This paper aims to bridge this gap by proposing a more robust and adaptable LLM agent framework.
Methods
The core of the SAGE framework lies in three key mechanisms:
- Iterative Feedback: A "checker" agent provides feedback to an "assistant" agent on its outputs. This feedback loop allows the assistant to iteratively refine its policy and improve its performance over successive interactions, aiming to maximize expected reward.
- Reflection Mechanism: The assistant agent processes its past observations, actions, and stored memory to generate "self-reflections." These reflections are richer than simple rewards and are incorporated into the agent's memory, enhancing its learning capacity and decision-making.
- MemorySyntax: This novel memory management system integrates the Ebbinghaus forgetting curve with linguistic principles. It dynamically manages both short-term memory (STM) and long-term memory (LTM). Information is prioritized based on its retention strength, allowing the agent to selectively retain crucial data, optimize storage, and reduce cognitive load. This mechanism helps overcome memory capacity limitations and improves performance in tasks requiring long-span information.
Datasets
The paper evaluates SAGE on several benchmarks:
- AgentBench: A multidimensional evolutionary benchmark for LLM agents, including tasks from CODE (Knowledge Graph, OS, DB), GAME (ALFWorld), and WEB (WebShop, Mind2Web).
- Complex Problem-Solving Tasks: Long-form QA (HotpotQA), multi-turn dialog (MultiWOZ), and sequential task completion (ALFWorld).
- Long-Context Tasks: LCC Dataset (code generation), RepoBench-P (code retrieval), HotPotQA, and TriviaQA (reading comprehension).
Key Insights and Ideas
- Self-Evolution through Reflection: The ability of agents to "reflect" on their past actions and outcomes, generating richer insights than simple rewards, is a powerful mechanism for self-improvement without additional training.
- Ebbinghaus Forgetting Curve for LLM Memory: Applying the principles of human memory decay to LLM memory management offers a principled way to prioritize and retain information, effectively combating information overload.
- Synergy of Iterative Feedback and Memory: The combination of iterative feedback for immediate refinement and a robust memory system for long-term learning creates a synergistic effect, leading to more adaptable and capable agents.
- Significant Gains for Smaller Models: SAGE demonstrates particularly pronounced improvements on smaller, open-source models, suggesting its potential to democratize advanced agent capabilities.
Key Results
SAGE significantly improves model performance across various benchmarks:
- AgentBench: Achieved up to a 2.26X improvement on closed-source models (e.g., Database task for GPT-3.5) and substantial gains on open-source models. For instance, Llama2-7b showed notable enhancement, and Qwen-1.8B performed close to GPT-3.5 after optimization.
- Complex Problem-Solving: SAGE enhanced answer accuracy, dialog coherence, and step completion. For example, a 20.8% increase in answer accuracy for GPT-3.5 on HotpotQA and a 17.3% improvement in task completion for Mistral-7b on ALFWorld.
- Long-Context Tasks: SAGE outperformed Reflexion and Beam Search on HotPotQA and TriviaQA, achieving F1 scores of 22.06 and 22.76, respectively.
- RAG Agents: ChatGPT-4 with SAGE showed steady accuracy improvements of 3.6% to 4.7% and cut memory consumption by nearly 50% on some tasks without increasing latency.
Limitations and Future Work
- Task Limits: The paper notes that task limits (time constraints) are a primary cause of incomplete tasks, highlighting a general limitation of LLM agents in time-constrained scenarios.
- Ablation Study: The ablation study on memory optimization showed that without it, models performed significantly weaker, underscoring the importance of this component.
- Future Work: The framework's success suggests potential for broader application to other LLMs and further exploration of its self-evolutionary capabilities in more complex and open-ended environments. The theoretical analysis also provides a foundation for understanding the stability and convergence properties of such multi-agent systems.
Summary updated