arXiv:2611.02480cs.CLNov 2026

Manuscript Offprint

arXiv:2611.02480

Chain on Demand: Deferred Evidence Organization for Long-Term Conversational Memory

Di Lu, Zechen Li, Hao Xue

ABSTRACT

Long-term conversational memory faces a timing mismatch: write-time summaries and graphs organize history before a future query is known, while independent retrieval can allocate a limited evidence budget to redundant or fragmented turns. We introduce Chain on Demand (CoD), a query-time evidence organization framework over an unchanged turn-level memory. Given a broad candidate pool, CoD constructs a temporary evidence chain by allocating a fixed anchor budget according to query relevance, lexical diversity relative to selected anchors, and newly covered query terms, followed by deterministic restoration of each selected anchor's same-session neighborhood. The resulting chain is used only for the current query, while the underlying conversational memory remains unchanged. In a paired comparison over all 1,986 LoCoMo questions, changing only the allocation rule improves accuracy from 74.5% to 76.3% (+1.86 percentage points; conversation-cluster 95% CI [0.59, 3.15]). CoD also achieves 82.2% accuracy on the 1,540 non-adversarial questions. On LongMemEval-S, one fixed configuration that indexes both user and assistant turns obtains 86.6% across all 500 questions. These results show that long-term memory can preserve the original conversation while deferring evidence organization until the information need is known. Our code is available at https://github.com/Renkiroo/chainondemand

1 INTRODUCTION

Conversational agents need to retain information across interactions that span days, weeks, or months. A later interaction may depend on a fact mentioned much earlier, a preference established in another session, or several pieces of information spread across the conversation. As history grows, the information needed for a later question becomes harder to recover from the full interaction record. Since the complete history rarely fits within the effective context available to the answer model, long-term memory systems must determine which parts of the history to present for the current query.

Long-term memory involves two separable decisions: what representation persists across interactions, and what evidence is presented for a particular query. Many systems construct summaries, segments, links, graphs, or hierarchical memory units during or shortly after interaction (Zhong et al., 2023; Pan et al., 2025; Xu et al., 2025; Rasmussen et al., 2025; Fang et al., 2026; Xu et al., 2026a;b). These representations can make long histories easier to search and manage. However, they commit to an organization before the later query reveals which details matter. Retaining the original turns avoids rewriting the conversational record, but does not determine how a limited query-time evidence budget should be allocated. Persistent storage and query-time evidence construction therefore serve different objectives.

Table 1: Query-time evidence construction in representative systems. “No generated semantic memory” excludes query-independent summaries, cues, and events; sparse or dense indexes do not count. “Fixed query procedure” excludes multi-round agent search. “Set-aware allocation” evaluates each candidate against the evolving selected set. “Source-context restoration” adds original neighboring turns after selection. The columns describe mechanisms rather than an ordinal ranking. † denotes document-level RAG.

DesignNo generated semantic memoryFixed query procedureSet-aware allocationSource-context restoration
LoCoMo dialog RAG (Maharana et al., 2024)✓✓✗✗
SeCom (Pan et al., 2025)✗✓✗✗
SetR† (Lee et al., 2025)–✓✓✗
CueMem (Wang et al., 2026)✗✓✗✓
ReFind (Li et al., 2026a)✓✗✗✓
Chronos (Sen et al., 2026)✗✗✗✓
CoD (ours)✓✓✓✓

Independent query-time retrieval addresses this timing problem only partly. Standard top-KK retrieval scores candidates independently (Gao et al., 2024). Under a fixed budget, several similar turns may occupy the available slots while a less similar turn supplies a missing relation, temporal detail, or intermediate step. The retrieved turns can therefore be individually relevant but collectively insufficient. Query-conditioned compression and set-wise retrieval account for query requirements more explicitly (Xu et al., 2024; Lee et al., 2025), but conversational evidence adds another dependency: a selected turn may require nearby dialogue and temporal order to be interpreted. Simply retrieving more text does not necessarily resolve this issue, as models can fail to use relevant information embedded in long inputs (Liu et al., 2024). Recent conversational memory systems recover source context through temporal–semantic expansion, archive-level context recovery, or reranking and tool use (Wang et al., 2026; Li et al., 2026a; Sen et al., 2026). These approaches establish the value of source-context recovery, but leave open a central question: given a fixed candidate pool and anchor budget, how should conversation locations be selected jointly before their local context is reconstructed?

We introduce Chain on Demand (CoD), a query-time evidence organization framework that constructs a temporary evidence chain over an unchanged turn record. Given a query, CoD first retrieves a broad candidate pool, then allocates a fixed anchor budget using a set-aware relevance–diversity–coverage rule, and finally restores the original same-session neighborhood around the selected locations. The selected anchors therefore specify where evidence should be organized rather than constituting the final evidence context themselves. The resulting chain is constructed only for the current information need and discarded after answering, while the underlying conversational record remains unchanged. This separates persistent memory from query-specific evidence construction while making the allocation decision explicit and directly testable. An adaptive acquisition variant further allows unresolved evidence gaps to trigger additional query-time selection without modifying the persistent memory.

Table 1 positions CoD relative to representative query-time evidence construction designs. The comparison highlights three properties that jointly define our framework: preserving the original conversational record, using a fixed query procedure with explicit set-aware allocation, and restoring source context after selection.

Our central evidence is a paired LoCoMo comparison that changes only the allocation rule. Under the same memory, candidate pool, anchor budget, temporal reconstruction, answer model, and judge, CoD raises accuracy from 74.5% to 76.3%, a 1.86-point gain with a conversation-cluster 95% confidence interval of [0.59, 3.15]. Development diagnostics further isolate the contributions of evidence volume, temporal reconstruction, and set-aware allocation. On LongMemEval-S, a fixed configuration that indexes both user and assistant turns obtains 433/500 (86.6%) across all questions, supporting applicability on a second long-term memory benchmark.

Our contributions are threefold:

  • We formulate long-term conversational memory around deferred evidence organization: the persistent conversational record is preserved, while query-specific evidence is constructed only after the information need is known.

  • We introduce CoD, a query-time evidence organization framework that constructs a temporary evidence chain through broad candidate retrieval, set-aware fixed-budget anchor allocation, and same-session context reconstruction. An adaptive acquisition variant further allows unresolved evidence gaps to trigger additional selection.

  • We isolate the effect of set-aware allocation in a paired comparison over all 1,986 LoCoMo questions: changing only the allocation rule improves accuracy from 74.5% to 76.3% (+1.86 points; conversation-cluster 95% CI [0.59, 3.15]). Development analyses characterize reconstruction and allocation, and LongMemEval-S evaluates the complete pipeline on a second benchmark.

References (50)