Which memory formats and retrievers best help LLM agents reason over long text

December 17, 20247 min

Overview

Decision SnapshotReady For Pilot

The paper runs controlled experiments on six datasets with a real LLM and reports clear numeric gains, but results are limited to selected QA/dialogue benchmarks and constrained hyperparameter ranges.

Citations1

Evidence Strength0.80

Confidence0.85

Risk Signals9

Trust Signals

Findings with numeric evidence: 7/7

Findings with evidence refs: 7/7

Results with explicit delta: 0/4

Reproducibility

Status: Code + data available

Open source: Yes

At A Glance

Cost impact: 60%

Production readiness: 70%

Novelty: 50%

Authors

Ruihong Zeng, Jinyuan Fang, Siwei Liu, Zaiqiao Meng

Links

Abstract / PDF / Code / Data

Why It Matters For Business

Choosing the right memory format and retriever raises agent accuracy and robustness for long documents; mixed memories plus iterative retrieval improve multi-hop and noisy scenarios while tuning retrieval size controls cost.

Who Should Care

Summary TLDR

This paper tests four structured memory formats (chunks, knowledge triples, atomic facts, summaries) plus a mixed combination across three retrieval methods (single-step, reranking, iterative) on six long-context QA and dialogue datasets. Main takeaways: mixed memory is the most balanced and noise‑robust; iterative retrieval usually gives the biggest accuracy gains; chunks/summaries work best for long-context tasks, while triples/atomic facts give better relational precision. Mixed+iterative hit F1=82.11% on HotPotQA and 68.15% on 2WikiMultihopQA. Code and data are on GitHub.

Problem Statement

Different ways of structuring and retrieving memory for LLM agents are widely used, but we lack a systematic comparison showing which memory formats and retrievers work best for specific long-context tasks and how robust they are to noise.

Main Contribution

A controlled empirical study comparing four structural memory types and a mixed memory, across three retrieval methods and six datasets.

Practical findings: mixed memory yields the most balanced performance and noise resilience; iterative retrieval usually outperforms single-step and reranking.

Key Findings

Mixed memory (chunks + triples + atomic facts + summaries) gives the most balanced performance across tasks.

NumbersF1=82.11% on HotPotQA, F1=68.15% on 2Wiki (iterative + mixed)

Practical UseCombine multiple memory formats when you need a single memory design to work well across both long-context and reasoning tasks.

Evidence RefTable 1

Iterative retrieval consistently outperforms single-step and reranking on most evaluated datasets.

NumbersMixed+iterative F1=82.11% (HotPotQA) > reranking/single-step

Practical UsePrefer iterative refinement of the query when accuracy on multi-hop or long-context QA matters, accepting higher compute for retrieval rounds.

Evidence RefTable 1

Results

MetricValueBaselineDeltaSplit / DatasetEvidenceEvidence Ref
F182.11%HotPotQA (mixed memory + iterative retrieval)Mixed memory + iterative retrieval achieved F1=82.11%Table 1
F168.15%2WikiMultihopQA (mixed memory + iterative retrieval)Mixed memory + iterative retrieval achieved F1=68.15%Table 1

What To Try In 7 Days

Implement mixed memory (chunks+triples+atomic+summary) for a key QA pipeline and compare F1 vs current store.

Swap single-step retriever for a small iterative loop (2–3 turns, T≈50) and measure accuracy vs latency.

Tune retrieved K to 50–100 and rerank a small top-R (≈10) rather than reranking huge candidate sets.

Agent Features

Memory
structural_memorymixed_memorychunksknowledge_triplesatomic_factssummaries
Tool Use
retrieverLLM rerankerdocument fetch (Memory-Doc)
Frameworks
LangChain
Is Agentic

Yes

Architectures
LLM-based agent

Optimization Features

Token Efficiency
summary compressionchunking to limit token window

Reproducibility

Code AvailableYes
Data AvailableYes
Open Source StatusYes
LicenseUnknown

Risks & Boundaries

Limitations

Experiments cover only multi-hop QA, single-hop QA, dialogue understanding, and reading comprehension.

Noise robustness tests use random noise documents only, not adversarial or contradictory noise.

When Not To Use

For domains not tested here (self-evolving agents, social simulations) because findings may not generalize.

When noise is adversarial or specifically contradictory (not evaluated).

Failure Modes

Retrieving too many candidates (very large K/R/T) can add irrelevant text and drop accuracy.

Iterative retrieval gives diminishing returns after ~3 iterations while increasing cost.

Core Entities

Models

GPT-4o-mini-128ktext-embedding-3-small

Metrics

Exact MatchF1Accuracy

Datasets

HotPotQA2WikiMultihopQAMuSiQueNarrativeQALoCoMoQuALITY

Benchmarks

long-context QAmulti-hop QAreading comprehensiondialogue understanding

Context Entities

Benchmarks

Retrieval-Augmented Generation (RAG)