TL;DR for operators

An AI assistant can retain the correct information, retrieve it successfully, and still fail to include it in the evidence selected for answering a question.

Chain on Demand (CoD) addresses this problem by preserving original conversational records and organizing evidence only when a query arrives. Instead of selecting messages exclusively by individual relevance, it considers what each additional message contributes to the evidence already selected.

  • Architecture: Separate durable conversational storage from temporary, query-specific evidence construction.
  • Evidence: A matched experiment across 1,986 questions improves answer accuracy from 74.5% to 76.3%, with an exact paired improvement of 1.86 percentage points.
  • Diagnosis: Of 58 annotated evidence items omitted during anchor selection, 41 were already available within the retrieved candidate pool.
  • Economics: Relative to simple dense retrieval, the complete optimized pipeline increases prompt consumption from 4,206 to 13,218 tokens and memory-construction latency from 21 to 262 milliseconds.
  • Decision: Before expanding memory infrastructure, determine whether existing retrieval systems are failing to access evidence, select it, or reconstruct its original context.

The research supports better evidence allocation under specific benchmark conditions. It does not establish that deferred organization universally outperforms persistent semantic memory.


When remembering is not enough

A customer-service assistant investigating a recurring complaint might retrieve several messages describing the original problem while overlooking the message containing a promised refund. Even if it retrieves that promise, it may miss the surrounding exchange specifying the conditions under which the refund applies.

The information was retained. The evidence assembled for the current question was incomplete.

Research by Di Lu, Zechen Li and Hao Xue1 identifies this problem in a conversational-memory diagnostic. Among 142 benchmark-annotated supporting evidence items, the researchers observe three outcomes before contextual reconstruction:

Evidence status Items Share
Selected for evidence construction 84 59.2%
Retrieved but not selected 41 28.9%
Absent from retrieved candidates 17 12.0%

Source: Section 5.3; Appendix B.4, Table 12.

Most omitted items were already accessible. Increasing retrieval capacity alone would therefore leave a substantial selection problem unresolved.

These counts describe evidence status before reconstruction: some unselected messages may subsequently be recovered through their proximity to selected messages.

For enterprise architects, the distinction changes which part of a memory system deserves further investment.

Preserve the conversation, defer its organization

Conventional memory architectures may transform conversations into summaries, extracted facts, or semantic graphs before future questions are known.

Such representations can provide efficient access to recurring information needs. However, deciding what information deserves emphasis at storage time requires assumptions about how that information will later be used.

Chain on Demand separates two decisions:

  1. What should remain available in persistent memory?
  2. What evidence should be assembled for the current question?

The architecture preserves original conversational turns, including their speaker roles, session identifiers, and positions. Search indexes provide access to these records, while the organization of evidence is deferred until a query arrives.

This complements the design perspective discussed in Write the Memory Before You Search It. Rather than improving the semantic representation prepared in advance, CoD investigates how much can be achieved through better organization at retrieval time.

The two approaches address different architectural decisions. The present research does not establish which is universally preferable.

Evidence selection is a collective decision

Selecting the most relevant individual messages does not necessarily produce the most informative collection.

Several messages may independently match a question about a refund while repeating the same complaint. Another message with a lower similarity score may supply the missing approval condition.

CoD initially retrieves 200 candidate turns through dense vector search. It then selects 60 locations in the original conversation, called anchors, using a greedy allocation rule.

The marginal score of a candidate is:

$$ u_t(m;q)=R(m,q)+\lambda D(m,S_t)+\beta C(m,q,S_t) $$

Here, $R$ measures query relevance, $D$ rewards lexical diversity relative to previously selected anchors, and $C$ measures incremental coverage of unmatched query terms. The selected set $S_t$ changes after each allocation decision.

Consequently, a message’s selection score depends partly on what has already been selected.

After allocating the anchors, CoD restores up to two preceding and two following turns from the same conversational session. It merges overlapping neighborhoods, removes duplicates, and restores chronological ordering.

The anchors identify where evidence resides; the reconstructed conversation supplies its local context.

What the controlled experiments establish

The paper’s strongest evidence comes from a paired comparison across all 1,986 LoCoMo questions.

Both configurations use identical conversational records, candidate pools, anchor budgets, reconstruction procedures, answer models, and evaluators. Only the allocation rule changes.

Matched evaluation Result
Relevance-only allocation 74.5%
CoD allocation 76.3%
Exact paired improvement +1.86 pp
Conversation-cluster 95% confidence interval [0.59, 3.15] pp
Answers improved 135
Answers deteriorated 98
Net additional correct answers 37

Source: Section 4.2; Appendix A.9.

The improvement is modest but informative. It demonstrates that better allocation can increase answer accuracy without expanding candidate access or changing the underlying memory representation.

However, the 98 deteriorated answers also show that aggregate improvement does not guarantee improvement for every query. The primary uncertainty estimate is based on only ten conversations, limiting the breadth of statistical generalization.

The complete architecture additionally achieves 86.6% accuracy across 500 LongMemEval-S questions. This supports its applicability to another benchmark but does not independently isolate the allocator’s contribution.

Contextual relationships matter beyond context volume

A separate 100-question development diagnostic examines why richer evidence construction might improve performance.

Evidence construction Accuracy Mean retrieved words
Dense retrieval, 60 turns 51% 1,268
Dense retrieval, 200 turns 57% 4,587
Relevance-based temporal reconstruction 73% 4,566
CoD 77% 4,575

Source: Section 4.3, Table 4.

The three larger contexts contain approximately the same number of words, yet their accuracy differs considerably.

A further volume-control experiment reports 73% accuracy for local reconstruction against 68.4% for approximately token-matched random expansion.

Component ablations also show that diversity alone reduces accuracy from 73% to 70%, while incremental coverage alone leaves accuracy unchanged. Combining both with relevance produces 77%.

These experiments investigate mechanisms rather than provide additional independent benchmark-wide effect estimates. The development questions overlap with the complete LoCoMo evaluation.

Better evidence construction has a query-time cost

Deferring organization does not eliminate computation. It changes when computation occurs.

Caching lexical representations and pairwise overlaps reduces CoD’s mean selection latency from 7,046 to 115 milliseconds without changing its allocation criterion.

Nevertheless, the optimized architecture remains more resource-intensive than simple dense retrieval.

Mean resource consumption per query Dense-60 Optimized CoD
Memory-construction latency 21 ms 262 ms
Retrieved turns 60 202.82
Prompt tokens 4,206 13,218
Completion tokens 129.4 111.1
Total API tokens 4,335 13,330

Source: Appendices A.7–A.8; 100 diagnostic queries.

The complete pipeline consumes approximately 3.14 times as many prompt tokens and requires an additional 241 milliseconds for memory construction.

Crucially, these resource comparisons concern the entire evidence-construction pipeline relative to Dense-60. They are not the incremental cost of obtaining the 1.86-percentage-point matched allocator improvement.

Nor does memory-construction latency represent complete response latency.

Diagnose memory failures before expanding infrastructure

Cognaptus interpretation: Enterprise AI architects should distinguish at least three stages of memory failure before deciding where to allocate engineering resources.

Failure stage Diagnostic question Potential intervention
Candidate access Was the required evidence retrieved? Improve indexing, retrieval coverage, or candidate generation.
Evidence allocation Was available evidence selected? Test diversity, coverage, and set-aware selection.
Contextual reconstruction Was the selected evidence sufficiently contextualized? Restore neighboring exchanges and relevant dependencies.
Answer generation Did the model correctly use the available evidence? Evaluate reasoning, grounding, and response-generation behavior.

A customer-service platform handling contractual commitments, recurring complaints, or disputed instructions may benefit from retaining original exchanges and reconstructing their conditions when needed.

A platform answering predominantly straightforward factual questions may find simpler retrieval economically preferable.

Operators should compare alternative allocation rules under matched conditions, then evaluate complete pipeline costs separately. Relevant measures include resolution accuracy, escalation rates, prompt expenditure, and response latency.

These are proposed deployment criteria, not commercial outcomes measured by the paper.

Where the evidence stops

The research leaves several consequential architectural questions unresolved.

Local reconstruction cannot explicitly represent dependencies spanning distant turns or multiple sessions. Candidate and anchor budgets are not systematically varied, and the principal evaluations use GPT-4o-mini for both answer generation and automated judging.

An exploratory adaptive acquisition mechanism improves direct gold-evidence recall from 85.2% to 86.6% and complete reconstructed evidence coverage from 84% to 87%. It has not demonstrated corresponding improvements in final answer accuracy.

Retaining original conversational records also requires independent decisions about retention periods, deletion, access controls, and source provenance.

The paper establishes neither production-scale reliability nor a commercial return on the additional computation.

Conclusion

Chain on Demand demonstrates that conversational-memory performance can depend on how existing information is allocated and contextualized, even when persistent storage and candidate access remain unchanged.

For enterprise AI architects, this makes query-time evidence construction a distinct engineering decision rather than an incidental retrieval step.

Before purchasing more elaborate memory infrastructure or increasing retrieval budgets, determine whether the existing system already possesses the information it fails to use. The appropriate intervention depends on where that failure occurs and whether the resulting improvement justifies its operational cost.


Cognaptus: Automate the Present, Incubate the Future.


  1. Di Lu and Zechen Li and Hao Xue (2026). Chain on Demand: Deferred Evidence Organization for Long-Term Conversational Memory. arXiv:2611.02480. https://arxiv.org/abs/2611.02480 ↩︎