When Your Agent Opens the Chat App: Agent-Controlled Search over Raw Chat Logs Rivals Structured Memory

Ruizhe Li, Licheng Zhang, Benfeng Xu, Mingxuan Du, Zheren Fu, Weidong ChenarXiv 2026

TL;DR

Instead of preprocessing massive chat histories into complex summaries or knowledge graphs, ReFind leaves chat logs completely raw and un-summarized. By equipping an LLM agent with an iterative keyword search loop and chat-native controls (like session deduplication and context expansion), it outperforms state-of-the-art structured memory systems on complex retrieval and fact-tracking benchmarks.

What Problem Does This Paper Address?

Long-term memory is a major bottleneck for LLM agents dealing with extensive interaction histories. The dominant paradigm in the field is to pre-structure this memory offline—converting raw text into vector embeddings, hierarchical summaries, or knowledge graphs before any question is even asked.

However, this preprocessing pass is computationally expensive to maintain incrementally and forces a "bet" on what details to abstract or discard before knowing the user's actual query. The authors challenge this trend by asking a fundamental question: How much of structured memory's benefit actually comes from the structure itself, versus simply having a competent retrieval mechanism over raw data?

Methods

The authors introduce ReFind, an agent-controlled search interface that builds zero semantic structure. It indexes raw chat logs lexically at the turn granularity using a standard BM25 index. It then splits the task into two decoupled stages:

  1. Retrieval (Iterative Evidence Collection): A ReAct-style agent loop autonomously formulates keyword queries over multiple rounds.
  2. Reasoning: An answer-generation stage that processes the collected evidence chronologically.

To make raw lexical search effective for chat histories, ReFind introduces four chat-native controls:

  • Session-Aware Rank Fusion (RRF): Combines turn-level BM25 ranks with session-level aggregate scores to boost turns belonging to highly relevant conversational topics.
  • Context Window Expansion: Instead of returning isolated matching turns, it returns the match plus adjacent turns ($\pm 2$), truncated at session boundaries.
  • Temporal Filtering: Allows the agent to narrow down searches to specific date ranges.
  • Session Deduplication: Tracks and excludes previously inspected sessions across search rounds to maximize information gain.
Search engine core mechanisms in ReFind

Datasets

The system was evaluated using two primary benchmarks:

  • MemoryAgentBench: A suite of ~2,800 questions simulating an agent gradually accumulating history, covering single-/multi-hop QA, LongMemEval, EventQA, and single-/multi-hop FactConsolidation.
  • LongMemEval-S/M: Subsets designed to evaluate long-term memory through needle-in-a-haystack tasks across various context lengths (up to ~500k tokens).

Key Insights and Ideas

  • Late-Binding Abstraction: Structured memory systems abstract information before the query is known, risking information loss. ReFind defers abstraction until query time, when the agent knows exactly what evidence it needs.
  • The Power of Iteration + Lexical Precision: Chat logs are full of highly discriminative surface forms (names, dates, specific phrases). An agent can use partial lexical matches to iteratively discover new terms and refine its search, outperforming single-shot dense embeddings.
  • Zero Index-Construction Overhead: Because it uses a simple BM25 index, new chat turns can be appended instantly without expensive LLM-based summarization or graph-building passes.

Key Results

  • On MemoryAgentBench, ReFind achieved the highest mean accuracy (58.2), outperforming the strongest graph-based system, HippoRAG 2 (53.2), and single-shot BM25-RAG (48.8), using a matched GPT-4o-mini backbone.
  • On LongMemEval-S/M, ReFind achieved 93.2% and 89.3% accuracy respectively using GPT-5-mini, outperforming structured baselines like STITCH (86.0% / 80.0%) and agentic raw-record baselines like GAM (70.0% / 60.0%).
  • Ablation studies showed that removing the context window caused the largest performance drop on short contexts, highlighting that surrounding dialogue is crucial to making lexical hits interpretable.

Limitations and Future Work

  • Query-Time Latency and Cost: Because ReFind relies on multi-round online search and LLM calls at query time, it shifts the computational burden from index-construction time to query time. This makes it less ideal for ultra-low latency requirements.
  • Scope of Tasks: ReFind is highly optimized for precise, evidence-grounded retrieval and factual-update tracking. The authors note it is complementary to, rather than a total replacement for, semantic memory mechanisms that handle high-level abstract synthesis or global summarization.

Summary updated

BibTeX
@misc{li2026when,
  author = {Ruizhe Li and Licheng Zhang and Benfeng Xu and Mingxuan Du and Zheren Fu and Weidong Chen},
  title = {{When Your Agent Opens the Chat App: Agent-Controlled Search over Raw Chat Logs Rivals Structured Memory}},
  year = {2026},
  eprint = {2608.12888},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.12888},
}
Figure