Table of Contents
Fetching ...

On the Structural Memory of LLM Agents

Ruihong Zeng, Jinyuan Fang, Siwei Liu, Zaiqiao Meng

TL;DR

Few studies examine how memory structures in LLM-based agents affect task performance. The authors systematically compare four structural memory types (chunks, knowledge triples, atomic facts, summaries) plus a mixed memory, under three retrieval strategies, across four tasks and six datasets. They find that mixed memory provides balanced, noise-robust performance; iterative retrieval generally outperforms other methods; task characteristics determine which memory structure excels. The work offers practical guidance for designing memory modules in LLM agents and highlights directions for future research in memory design and retrieval.

Abstract

Memory plays a pivotal role in enabling large language model~(LLM)-based agents to engage in complex and long-term interactions, such as question answering (QA) and dialogue systems. While various memory modules have been proposed for these tasks, the impact of different memory structures across tasks remains insufficiently explored. This paper investigates how memory structures and memory retrieval methods affect the performance of LLM-based agents. Specifically, we evaluate four types of memory structures, including chunks, knowledge triples, atomic facts, and summaries, along with mixed memory that combines these components. In addition, we evaluate three widely used memory retrieval methods: single-step retrieval, reranking, and iterative retrieval. Extensive experiments conducted across four tasks and six datasets yield the following key insights: (1) Different memory structures offer distinct advantages, enabling them to be tailored to specific tasks; (2) Mixed memory structures demonstrate remarkable resilience in noisy environments; (3) Iterative retrieval consistently outperforms other methods across various scenarios. Our investigation aims to inspire further research into the design of memory systems for LLM-based agents.

On the Structural Memory of LLM Agents

TL;DR

Few studies examine how memory structures in LLM-based agents affect task performance. The authors systematically compare four structural memory types (chunks, knowledge triples, atomic facts, summaries) plus a mixed memory, under three retrieval strategies, across four tasks and six datasets. They find that mixed memory provides balanced, noise-robust performance; iterative retrieval generally outperforms other methods; task characteristics determine which memory structure excels. The work offers practical guidance for designing memory modules in LLM agents and highlights directions for future research in memory design and retrieval.

Abstract

Memory plays a pivotal role in enabling large language model~(LLM)-based agents to engage in complex and long-term interactions, such as question answering (QA) and dialogue systems. While various memory modules have been proposed for these tasks, the impact of different memory structures across tasks remains insufficiently explored. This paper investigates how memory structures and memory retrieval methods affect the performance of LLM-based agents. Specifically, we evaluate four types of memory structures, including chunks, knowledge triples, atomic facts, and summaries, along with mixed memory that combines these components. In addition, we evaluate three widely used memory retrieval methods: single-step retrieval, reranking, and iterative retrieval. Extensive experiments conducted across four tasks and six datasets yield the following key insights: (1) Different memory structures offer distinct advantages, enabling them to be tailored to specific tasks; (2) Mixed memory structures demonstrate remarkable resilience in noisy environments; (3) Iterative retrieval consistently outperforms other methods across various scenarios. Our investigation aims to inspire further research into the design of memory systems for LLM-based agents.

Paper Structure

This paper contains 27 sections, 13 figures, 2 tables.

Figures (13)

  • Figure 1: The framework of LLM-based agents, where we focus on the study of memory modules, including memory structures and retrieval methods.
  • Figure 2: Overview of the memory module workflow in LLM-based agents. Raw information is organized into structural memories, which are processed through retrieval methods to identify the most relevant memories for the query, enabling the generation of precise and contextually enriched responses.
  • Figure 3: Performance across six datasets using two answer generation approaches: Memory-Only and Memory-Doc.
  • Figure 4: Performance of different numbers of retrieved memories $K$ on HotPotQA and LoCoMo using single-step retrieval.
  • Figure 5: Performance of different numbers of reranked memories $R$ on HotPotQA and LoCoMo in reranking.
  • ...and 8 more figures