v7.4 → v7.5
What changed from v7.4 to v7.5
From v7.4 (2 Jun) to v7.5 (2 Jun): 6,684 words to 6,753 words, 265 words in new or rewritten paragraphs and 196 taken out, 25 paragraphs changed.
Neighbouring layers described in general terms, not by paperThe layers around the index are now described by what they do, a storage layer and a reflection layer, and no longer by the names of the author's other papers, so the paper stands on its own. The improvement notes asked for fewer cross-references to the series. The contract between the layers is spelled out: text, time and source in, tuned settings back.
v7.4 · 2 June 2026v7.5 · 2 June 2026
··· 8 unchanged paragraphs folded ···
v7.4 · 1. IntroductionThe solution takes its name and its shape from the brain. The human hippocampus is not where memories are stored — long-term memories live distributed across the neocortex. The hippocampus is the brain's *indexing organ*: it knows where every memory lives and how to retrieve it. The clinical evidence is stark. Patient H.M., who had both hippocampi removed to treat epilepsy, retained his old memories intact but could no longer form or retrieve new ones — the store was fine; the index was gone [Scoville & Milner, 1957]. **Instant Recall is our attempt to build the AI equivalent of this biological indexing organ — the layer that makes the difference between *having* memories and being *able to use them*.** It draws the same structural separation: a pre-computed concept index, built offline during a Sleep Consolidation phase, maps anchor vocabulary terms to their nearest memory clusters in embedding space [Teyler & DiScenna, 1986]. The mechanism is pre-computed KNN over sentence embeddings — the hippocampal analogy is architectural (index vs. store), not mechanistic. The index lookup completes in ~50ms before the LLM receives its context window, so the model begins reasoning with relevant memories already in place.
v7.5 · 1. IntroductionThe solution takes its name and its shape from the brain. The human hippocampus is not where memories are stored — long-term memories live distributed across the neocortex. The hippocampus is the brain's *indexing organ*: it knows where every memory lives and how to retrieve it. The clinical evidence is stark. Patient H.M., who had both hippocampi removed to treat epilepsy, retained his old memories intact but could no longer form or retrieve new ones — the store was fine; the index was gone [Scoville & Milner, 1957]. **Instant Recall is our attempt to build the AI equivalent of this biological indexing organ — the layer that makes the difference between *having* memories and being *able to use them*.** It draws the same structural separation: a pre-computed concept index, built offline during a nightly consolidation phase, maps anchor vocabulary terms to their nearest memory clusters in embedding space [Teyler & DiScenna, 1986]. The mechanism is pre-computed KNN over sentence embeddings — the hippocampal analogy is architectural (index vs. store), not mechanistic. The index lookup completes in ~50ms before the LLM receives its context window, so the model begins reasoning with relevant memories already in place.
··· 2 unchanged paragraphs folded ···
v7.4 · 1.1 The Three-Layer Memory System### 1.1 The Three-Layer Memory System
removed in v7.5
v7.4 · 1.1 The Three-Layer Memory SystemInstant Recall is one layer of a three-paper memory system. Each layer is independently useful; together they compound.
removed in v7.5
v7.4 · 1.1 The Three-Layer Memory System- **Storage layer (Total Recall; Serra, 2026a).** Persists every interaction as a typed, timestamped event and compacts older events into lightweight pointers — summaries that preserve the essential content while reducing storage by 80–95%. It stores without loss of meaning. - **Retrieval layer (Instant Recall; this paper).** Indexes those pointers and full events alike, making the compaction transparent to retrieval, and surfaces the right chunk in O(1) at inference time. - **Reflection layer (Sleep Consolidation; Serra, 2026e).** A nightly cycle reviews which retrievals succeeded and which failed, then adjusts the index parameters — anchor term selection, importance weights, chunk boundaries — based on observed patterns. The retrieval layer gets better without any code change.
removed in v7.5
v7.4 · 1.1 The Three-Layer Memory SystemIn one line: the storage layer stores without losing, the retrieval layer recalls in constant time, and the reflection layer refines both. The rest of this paper concerns the middle layer.
removed in v7.5
not in v7.4
v7.5 · 1.1 Where the Index Sits in a Memory Stack### 1.1 Where the Index Sits in a Memory Stack
not in v7.4
v7.5 · 1.1 Where the Index Sits in a Memory StackInstant Recall is the retrieval layer of a complete agent memory stack, and it is designed to interoperate cleanly with two neighbouring layers without depending on either one's internals.
not in v7.4
v7.5 · 1.1 Where the Index Sits in a Memory StackBelow it sits a **storage layer**: any mechanism that persists every interaction as a typed, timestamped event and compacts older events into lightweight pointers — summaries that preserve the essential content while reducing storage by 80–95%. The storage layer stores without loss of meaning; Instant Recall indexes its output, whether full events or compacted pointers, so the compaction is transparent to retrieval.
not in v7.4
v7.5 · 1.1 Where the Index Sits in a Memory StackAbove it sits a **reflection layer**: a nightly cycle that reviews which retrievals succeeded and which failed, then adjusts the index parameters — anchor term selection, importance weights, chunk boundaries — based on observed patterns. The retrieval layer thus improves without any code change.
not in v7.4
v7.5 · 1.1 Where the Index Sits in a Memory StackThe contract between them is narrow: the storage layer must expose, per chunk, a content string, a timestamp, and a source label; the reflection layer reads retrieval outcomes and writes back tuned parameters. Everything in this paper concerns the middle layer — building and serving the index in constant time at inference. The two neighbouring layers are sketched here only enough to define that contract; Instant Recall functions over any store and any reflection schedule that honours it.
v7.4 · 1.1 Where the Index Sits in a Memory Stack
v7.5 · 1.1 Where the Index Sits in a Memory Stack
··· 6 unchanged paragraphs folded ···
v7.4 · 2.2 The Storage and Reflection Layers### 2.2 The Storage and Reflection Layers
removed in v7.5
not in v7.4
v7.5 · 2.2 The Neighbouring Layers Instant Recall Assumes### 2.2 The Neighbouring Layers Instant Recall Assumes
not in v7.4
v7.5 · 2.2 The Neighbouring Layers Instant Recall AssumesTwo layers bracket the retrieval mechanism, and Instant Recall is engineered against their interfaces rather than their implementations.
v7.4 · 2.2 The Neighbouring Layers Instant Recall AssumesThe storage layer [Serra, 2026a] defines persistent agent memory as a compaction-based cache eviction system. Raw events are stored in an event log; a compaction algorithm promotes high-salience content to long-term storage while evicting low-salience content. It provides the substrate Instant Recall operates on: the nightly rebuild consumes the storage layer's event files as its primary input.
v7.5 · 2.2 The Neighbouring Layers Instant Recall AssumesA **compaction-based storage layer** defines persistent agent memory as a cache-eviction system: raw events are written to an event log, then a compaction algorithm promotes high-salience content to long-term storage while evicting low-salience content into lossy-but-meaning-preserving pointers. Such a layer supplies the substrate Instant Recall operates on — the nightly rebuild consumes its event files as primary input — but Instant Recall requires only the `(content, timestamp, source)` triple from it, not its eviction policy.
v7.4 · 2.2 The Neighbouring Layers Instant Recall AssumesThe identity layer [Serra, 2026b] addresses agent identity drift across session boundaries via a persona-state structure injected into every session's system prompt. It assumes relevant memories can be retrieved; Instant Recall makes that assumption true — supplying context chunks at every prompt, before the model begins processing.
v7.5 · 2.2 The Neighbouring Layers Instant Recall AssumesAn **identity layer** addresses agent identity drift across session boundaries by injecting a persona-state structure into every session's system prompt. That layer assumes relevant memories can be retrieved; Instant Recall makes the assumption true by supplying context chunks at every prompt, before the model begins processing.
v7.4 · 2.2 The Neighbouring Layers Instant Recall AssumesThe reflection layer [Serra, 2026e] runs a nightly cycle that audits retrieval outcomes and tunes Instant Recall's parameters (§4.10). This is the orchestration boundary: Instant Recall builds and serves the index; the reflection layer decides *how* it should be built next time.
v7.5 · 2.2 The Neighbouring Layers Instant Recall AssumesA **reflection layer** runs a nightly cycle that audits retrieval outcomes and tunes Instant Recall's parameters (§4.10). This is the orchestration boundary: Instant Recall builds and serves the index; the reflection layer decides *how* it should be built next time. Each of these layers is treated here exactly as an external dependency would be — by its contract, not its code.
··· 2 unchanged paragraphs folded ···
v7.4 · 2.3 Neuroscience BasisDuring sleep, hippocampal replay consolidates these indices: recently encoded patterns are reactivated, strengthening links between hippocampal indices and cortical storage sites [Wilson & McNaughton, 1994]. This offline consolidation is what our Sleep Consolidation phase implements.
v7.5 · 2.3 Neuroscience BasisDuring sleep, hippocampal replay consolidates these indices: recently encoded patterns are reactivated, strengthening links between hippocampal indices and cortical storage sites [Wilson & McNaughton, 1994]. This offline consolidation is what our nightly rebuild phase implements.
··· 21 unchanged paragraphs folded ···
v7.4 · 4.1 Overview- **Offline (nightly Sleep Consolidation):** Full rebuild of the concept index mapping anchor terms to pre-ranked memory chunk paths. - **Real-time (incremental updates):** O(|V|) per-write update inserting new chunks into relevant anchor clusters immediately. - **Online (inference):** Detect anchor words in incoming queries; load pre-ranked chunk lists in O(1); re-rank against current query; inject into context.
v7.5 · 4.1 Overview- **Offline (nightly consolidation):** Full rebuild of the concept index mapping anchor terms to pre-ranked memory chunk paths. - **Real-time (incremental updates):** O(|V|) per-write update inserting new chunks into relevant anchor clusters immediately. - **Online (inference):** Detect anchor words in incoming queries; load pre-ranked chunk lists in O(1); re-rank against current query; inject into context.
··· 4 unchanged paragraphs folded ···
v7.4 · 4.2 What Instant Recall IndexesInstant Recall does not require the storage layer described in §2.2; it requires only that a memory store expose, per chunk, three things: a content string, a timestamp, and a source label. Any store satisfying that contract — an event log, a flat directory of Markdown files, an email archive — can be indexed. The architecture is store-agnostic by design.
v7.5 · 4.2 What Instant Recall IndexesInstant Recall does not require any particular storage layer; it requires only that a memory store expose, per chunk, three things: a content string, a timestamp, and a source label. Any store satisfying that contract — an event log, a flat directory of Markdown files, an email archive — can be indexed. The architecture is store-agnostic by design.
··· 13 unchanged paragraphs folded ···
v7.4 · 4.6 Nightly Consolidation (Full Rebuild)### 4.6 Nightly Sleep Consolidation (Full Rebuild)
v7.5 · 4.6 Nightly Consolidation (Full Rebuild)### 4.6 Nightly Consolidation (Full Rebuild)
··· 19 unchanged paragraphs folded ···
v7.4 · 4.8 Importance ScoringThis mirrors how the underlying event store [Serra, 2026a] tags content at ingest: decisions and constraints are recorded as high-salience event types, which is exactly what feeds the elevated base salience above.
v7.5 · 4.8 Importance ScoringThis mirrors how a well-designed event store tags content at ingest: decisions and constraints are recorded as high-salience event types, which is exactly what feeds the elevated base salience above.
··· 13 unchanged paragraphs folded ···
v7.4 · 4.12 Low-Confidence Reformulation (Proposed)The pipeline above assumes one query attempt. Production showed a distinct failure: when retrieval scores are uniformly low (max cosine < 0.5 across all results), the agent accepts the best-of-bad matches as authoritative rather than recognizing that retrieval *failed*. We propose a reformulation gate to close this gap. When max(scores) falls below a confidence threshold **and** the query carries ownership signals ("our", "we", "my", "the [noun] we [verb]"), the gate would (1) extract domain-anchor nouns and re-search on those alone, (2) search explicitly for known project and paper titles, and (3) if still low, broaden to a file-path search — the knowledge may live in a file whose *name* matches even when its *text* does not. This addresses the dominant residual: a 2026-04-01 incident in which the agent searched memory-retrieval content, scored 0.47–0.49 across all results, and accepted the wrong files with no retry. The keyword channel matters here too: a hybrid store weighting vector and keyword search 70/30 can let the BM25 channel rescue a bad embedding match — but only if the indexed text contains the query terms. Papers about "compaction" do not match queries about "retrieval." A complementary proposal is a concept→keyword routing table, built during Sleep Consolidation, storing 10–20 human-search keywords per project (e.g., Total Recall → ["memory", "retrieval", "forgetting", "context", "compaction", "eviction", "recall"]) even when those words never appear in the body text. Unlike the signals of §4.9, the reformulation gate and routing table are design proposals, not yet in the live pipeline.
v7.5 · 4.12 Low-Confidence Reformulation (Proposed)The pipeline above assumes one query attempt. Production showed a distinct failure: when retrieval scores are uniformly low (max cosine < 0.5 across all results), the agent accepts the best-of-bad matches as authoritative rather than recognizing that retrieval *failed*. We propose a reformulation gate to close this gap. When max(scores) falls below a confidence threshold **and** the query carries ownership signals ("our", "we", "my", "the [noun] we [verb]"), the gate would (1) extract domain-anchor nouns and re-search on those alone, (2) search explicitly for known project and paper titles, and (3) if still low, broaden to a file-path search — the knowledge may live in a file whose *name* matches even when its *text* does not. This addresses the dominant residual: a 2026-04-01 incident in which the agent searched memory-retrieval content, scored 0.47–0.49 across all results, and accepted the wrong files with no retry. The keyword channel matters here too: a hybrid store weighting vector and keyword search 70/30 can let the BM25 channel rescue a bad embedding match — but only if the indexed text contains the query terms. Papers about "compaction" do not match queries about "retrieval." A complementary proposal is a concept→keyword routing table, built during nightly consolidation, storing 10–20 human-search keywords per project (e.g., a storage paper → ["memory", "retrieval", "forgetting", "context", "compaction", "eviction", "recall"]) even when those words never appear in the body text. Unlike the signals of §4.9, the reformulation gate and routing table are design proposals, not yet in the live pipeline.
··· 37 unchanged paragraphs folded ···
v7.4 · 7.4 Implementation StatusThe reference implementation is TypeScript (ESM, Node 22+), organized around an enhancement module (importance scoring, episodic buffer, deduplication, ~480 lines), a rebuild module (nightly orchestration, anchor extraction, incremental mtime-diff state, ~470 lines), and a co-located unit test suite. The beyond-cosine signals of §4.9 are present in the live schema and ranking path: bi-temporal validity columns and a covering index, a verification-status column with a coverage-mapping batch and a verification-aware re-rank, and a `backlinks` table with backlink hydration and a depth-capped k-hop walk on the manager. The low-confidence reformulation gate and concept→keyword routing of §4.12 are designed but not yet wired into the live pipeline. Exact line counts and test totals vary as the code evolves; the architectural claims above are the stable contract.
v7.5 · 7.4 Implementation StatusThe reference implementation is TypeScript (ESM, Node 22+), organized around an enhancement module (importance scoring, episodic buffer, deduplication, ~480 lines), a rebuild module (nightly orchestration, anchor extraction, incremental mtime-diff state, ~470 lines), and a co-located unit test suite. The beyond-cosine signals of §4.9 are present in the live schema and ranking path: bi-temporal validity columns (`validity_start`, `validity_end`, `ingestion_time`, `superseded_by`) and a covering index, with a non-lossy supersede routine that closes a prior fact's interval rather than deleting the row; a verification-status column with a coverage-mapping batch and a verification-aware re-rank applying the ×1.5/×1.2/×1.0/×0.5 multipliers; and a `backlinks` table with backlink hydration and a depth-capped k-hop walk on the manager. The low-confidence reformulation gate and concept→keyword routing of §4.12 are designed but not yet wired into the live pipeline. Exact line counts and test totals vary as the code evolves; the architectural claims above are the stable contract.
··· 23 unchanged paragraphs folded ···
v7.4 · References1. Lewis, P., et al. (2020). Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. _NeurIPS 2020_. 2. Packer, C., et al. (2023). MemGPT: Towards LLMs as Operating Systems. _arXiv:2310.08560_. 3. Sarthi, P., et al. (2024). RAPTOR: Recursive Abstractive Processing for Tree-Organized Retrieval. _ICLR 2024_. 4. Collins, A. M., & Loftus, E. F. (1975). A spreading-activation theory of semantic processing. _Psychological Review_, 82(6), 407–428. 5. Teyler, T. J., & DiScenna, P. (1986). The hippocampal memory indexing theory. _Behavioral Neuroscience_, 100(2), 147–154. 6. Squire, L. R. (1992). Memory and the hippocampus: A synthesis from findings with rats, monkeys, and humans. _Psychological Review_, 99(2), 195–231. 7. Wilson, M. A., & McNaughton, B. L. (1994). Reactivation of hippocampal ensemble memories during sleep. _Science_, 265(5172), 676–679. 8. Tulving, E. (1976). Ecphoric processes in recall and recognition. _Recall and Recognition_, 37–73. 9. Mandler, G. (1980). Recognizing: The judgment of previous occurrence. _Psychological Review_, 87(3), 252–271. 10. Yonelinas, A. P. (2002). The nature of recollection and familiarity: A review of 30 years of research. _Journal of Memory and Language_, 46(3), 441–517. 11. MemoryOS. (2024). Mem0: The Memory Layer for Personalized AI. _arXiv:2504.19413_. 12. Serra, O. (2026a). Total Recall: Compaction as Cache Eviction in Persistent AI Agent Memory. _Independent Research_. 13. Serra, O. (2026b). Identity Persistence: Persistent Agent Identity Through Structured Persona Maintenance. _Independent Research_. 14. Serra, O. (2026d). Humor Embeddings: Bisociation in Embedding Space for Humor Generation. _Independent Research_. 15. Serra, O. (2026e). Sleep Consolidation: Cross-Session Reflection and Signal Routing for Persistent AI Agents. _Independent Research_. 16. Park, J. S., et al. (2023). Generative Agents: Interactive Simulacra of Human Behavior. _UIST 2023_. 17. Zhong, W., et al. (2023). MemoryBank: Enhancing Large Language Models with Long-Term Memory. _arXiv:2305.10250_. 18. Manning, C. D., Raghavan, P., & Schütze, H. (2008). _Introduction to Information Retrieval_. Cambridge University Press. 19. Guu, K., et al. (2020). REALM: Retrieval-Augmented Language Model Pre-Training. _ICML 2020_. 20. Borgeaud, S., et al. (2022). Improving language models by retrieving from trillions of tokens. _ICML 2022_. 21. Xu, X., et al. (2025). A-MEM: Agentic Memory for LLM Agents. _arXiv:2502.12345_. 22. Wu, D., et al. (2024). LongMemEval: Benchmarking Chat Assistants on Long-Term Interactive Memory. _arXiv:2410.10813_. 23. Yan, Z., et al. (2025). Memory-R1: RL-Trained Memory Management for LLM Agents. _arXiv:2505.14075_. 24. Gama, J., et al. (2014). A survey on concept drift adaptation. _ACM Computing Surveys_, 46(4), 1–37. 25. Scoville, W. B., & Milner, B. (1957). Loss of recent memory after bilateral hippocampal lesions. _Journal of Neurology, Neurosurgery & Psychiatry_, 20(1), 11–21.
v7.5 · References1. Lewis, P., et al. (2020). Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. _NeurIPS 2020_. 2. Packer, C., et al. (2023). MemGPT: Towards LLMs as Operating Systems. _arXiv:2310.08560_. 3. Sarthi, P., et al. (2024). RAPTOR: Recursive Abstractive Processing for Tree-Organized Retrieval. _ICLR 2024_. 4. Collins, A. M., & Loftus, E. F. (1975). A spreading-activation theory of semantic processing. _Psychological Review_, 82(6), 407–428. 5. Teyler, T. J., & DiScenna, P. (1986). The hippocampal memory indexing theory. _Behavioral Neuroscience_, 100(2), 147–154. 6. Squire, L. R. (1992). Memory and the hippocampus: A synthesis from findings with rats, monkeys, and humans. _Psychological Review_, 99(2), 195–231. 7. Wilson, M. A., & McNaughton, B. L. (1994). Reactivation of hippocampal ensemble memories during sleep. _Science_, 265(5172), 676–679. 8. Tulving, E. (1976). Ecphoric processes in recall and recognition. _Recall and Recognition_, 37–73. 9. Mandler, G. (1980). Recognizing: The judgment of previous occurrence. _Psychological Review_, 87(3), 252–271. 10. Yonelinas, A. P. (2002). The nature of recollection and familiarity: A review of 30 years of research. _Journal of Memory and Language_, 46(3), 441–517. 11. MemoryOS. (2024). Mem0: The Memory Layer for Personalized AI. _arXiv:2504.19413_. 12. Park, J. S., et al. (2023). Generative Agents: Interactive Simulacra of Human Behavior. _UIST 2023_. 13. Zhong, W., et al. (2023). MemoryBank: Enhancing Large Language Models with Long-Term Memory. _arXiv:2305.10250_. 14. Manning, C. D., Raghavan, P., & Schütze, H. (2008). _Introduction to Information Retrieval_. Cambridge University Press. 15. Guu, K., et al. (2020). REALM: Retrieval-Augmented Language Model Pre-Training. _ICML 2020_. 16. Borgeaud, S., et al. (2022). Improving language models by retrieving from trillions of tokens. _ICML 2022_. 17. Xu, X., et al. (2025). A-MEM: Agentic Memory for LLM Agents. _arXiv:2502.12345_. 18. Wu, D., et al. (2024). LongMemEval: Benchmarking Chat Assistants on Long-Term Interactive Memory. _arXiv:2410.10813_. 19. Yan, Z., et al. (2025). Memory-R1: RL-Trained Memory Management for LLM Agents. _arXiv:2505.14075_. 20. Gama, J., et al. (2014). A survey on concept drift adaptation. _ACM Computing Surveys_, 46(4), 1–37. 21. Scoville, W. B., & Milner, B. (1957). Loss of recent memory after bilateral hippocampal lesions. _Journal of Neurology, Neurosurgery & Psychiatry_, 20(1), 11–21.
Changed paragraphs in the same form, for scripts: JSON
· Markdown