v1.5 research: what the literature says we should build

Companion to v1.5.md. Three surveys were run — agent memory / consolidation / sleep-time compute; retrieval units and RAG architecture; knowledge-graph construction, entity resolution and categorization — and reconciled here. Every entry names the paper, the mechanism that matters, the concrete change it implies for the plan, and a triage:

Verification note: arXiv IDs, authors and venues were checked against arXiv listings / proceedings entries via web search; mechanism details come from the papers’ public pages, READMEs, or source code (HippoRAG config_utils.py, Graphiti README, EDC and LangExtract repos). Numbers quoted only from secondary summaries are marked (secondary).


A. Memory, consolidation, forgetting, reflection, sleep-time compute

A1. Generative Agents — Park et al., UIST 2023, arXiv:2304.03442 — ADOPT

Memory stream with retrieval score = recency + importance + relevance (equal weights); recency decays 0.995/hour from last retrieval; importance is an LLM rating 1–10. Reflection fires when Σ importance since the last reflection > 150: take the 100 most recent memories, ask for the 3 most salient high-level questions, answer each by retrieval, store answers with citations to the supporting memory ids; reflections are themselves reflectable (a tree).

→ Plan changes: the synthesize_insights pass becomes exactly this loop (trigger on accumulated importance, not a fixed cadence; 3 questions; answers stored as insight memories with evidence); recency decays from last_recalled_at, not created_at; one shared 1–10 importance prompt for facts and memories so scores are comparable.

A2. Sleep-time Compute — Lin et al. (Letta/Berkeley), 2025, arXiv:2504.13171 — ADOPT

Split context c from query q; while idle, rewrite c into a learned context c′ that pre-computes inferences and anticipates questions. ≈5× less test-time compute at equal accuracy, +13–18% accuracy when sleep-time compute is scaled, gains amortized 2.5× across queries on the same context. Gains are largest when queries are predictable from the context.

→ Plan changes: an anticipated-questions dream job (k likely questions + short cited answers per high-heat document, stored as qa memories and embedded); prioritise dreaming by predictability × importance; track sleep tokens spent per document and stop when marginal yield falls.

A3. Mem0 — Chhikara et al., 2025, arXiv:2504.19413 — ADOPT

Per candidate memory: retrieve top-S≈10 similar existing memories, have the LLM choose ADD / UPDATE / DELETE / NOOP via a structured tool call. Reported +26% LLM-judge over OpenAI memory on LoCoMo, >90% token savings vs full-context (secondary).

→ Plan changes: this is the consolidation step for facts (§2 canonical dedup) and memories (§5 consolidate_memories) — one structured-output prompt over the 10 nearest neighbours; DELETE is a soft supersede (A5). rag_remember takes the same path before insert so agent-written memories don’t drift from dream-consolidated ones.

A4. MemoryBank — Zhong et al., AAAI 2024, arXiv:2305.10250 — ADOPT

Ebbinghaus retention R = e^(−t/S), t = days since last use, strength S starts at 1 and increments on each recall. Also maintains daily event summaries and an evolving user portrait.

→ Plan changes: replace the plan’s “recency decay × recall count” with the single term retention = exp(-days_since_last_recall / (1 + recall_count)); archive when retention < 0.05 and importance is low (pure SQL). Add a dream-maintained user portrait memory and day/week digests.

A5. Zep / Graphiti — Rasmussen et al., 2025, arXiv:2501.13956 — ADOPT

Bi-temporal edges: valid_at/invalid_at (true in the world) and created_at/expired_at (known to the system). A contradicting fact invalidates the old edge rather than deleting it. README warns small local models fail its LLM-judged contradiction detection.

→ Plan changes: valid_from, valid_to, invalidated_by, invalidated_at on triples (and superseded_by already on memories); triples_dedup becomes partial on live rows; contradiction detection is a rule for functional predicates (works_at, lives_in, decided per subject+predicate), with the LLM only as tiebreaker; rag_recall/rag_related gain as_of.

A6. MemGPT / Letta — Packer et al., 2023, arXiv:2310.08560 — ADOPT

Small always-in-context core memory blocks (bounded, editable) + recall + archival tiers; the LLM pages memory with explicit functions.

→ Plan changes: a bounded core memory (≤ 4 KB, labelled blocks persona, user, current_projects) exposed as an MCP resource and rewritten by dreaming — the always-loaded tier that a retrieval-only store lacks. rag_remember(block=...) can edit a block, size-limited.

A7. MemoryOS — Kang et al., EMNLP 2025, arXiv:2506.06326 — ADOPT

Heat score H = α·N_visit + β·L_interaction + γ·R_recency, R_recency = exp(−Δt/μ), promotion threshold τ; lowest-heat segments evicted.

→ Plan changes: a heat expression over documents/memories (recall hits, linked memories, recency) drives which items get expensive dream passes first and which agent-written memories get promoted from a short-term tier into long-term recall. SQL only.

A8. A-MEM — Xu et al., NeurIPS 2025, arXiv:2502.12110 — 1.6

Zettelkasten notes with LLM-generated keywords/tags/context and links; on insert, neighbours’ descriptions may be rewritten (“memory evolution”). → Keywords/tags on memories indexed on the FTS side is cheap and adopted; neighbour rewriting is 1.6 (needs churn caps and versioning).

A9. Reflexion — Shinn et al., NeurIPS 2023, arXiv:2303.11366 — 1.6

Verbal self-reflection on failures stored in a bounded episodic buffer. → Needs a query/feedback log Garage doesn’t have; 1.6 candidate: lesson memories from reformulated searches, used for query expansion.

A10. CoALA — Sumers et al., TMLR 2024, arXiv:2309.02427 — REF

Episodic / semantic / procedural memory split. → Adopted as vocabulary: sources are episodic (immutable), facts/insights/portrait are semantic (derived, versioned, forgettable); dreaming is the episodic→semantic consolidation operator. kind=procedure memories are 1.6.

A11. Others checked


B. Retrieval units and RAG architecture

B1. Dense X Retrieval (propositions) — Chen et al., EMNLP 2024, arXiv:2312.06648 — ADOPT

Index atomic, self-contained propositions generated offline; Recall@5 +22–35% for unsupervised retrievers, +2.4–4.5% supervised, with gains from mapping the proposition back to its passage.

→ Plan changes: this is the evidence base for facts-as-chunks. Facts must be decontextualized (pronouns resolved, entities named) — add that to the profile prompt; at query time collapse a fact hit to its parent chunk/passage for the returned text; cap facts per 1000 chars rather than only per document.

B2. Contextual Retrieval — Anthropic, Sept 2024 — ADOPT

Prepend a 50–100-token LLM-written “situating context” to each chunk before embedding and BM25. Top-20 retrieval failure: 5.7% → 3.7% (contextual embeddings) → 2.9% (+contextual BM25, −49%) → 1.9% with reranking (−67%).

→ Plan changes: chunks.context text + context_source ('heuristic'|'llm'); a heuristic version (title + heading path + summary first sentence) at ingest, upgraded by a contextualize dream job; embed context || text and include context in the generated tsvector.

B3. Local cross-encoder reranking — bge-reranker-v2-m3 (BAAI 2024), mxbai-rerank-v2 (2025) — ADOPT

0.5–1.5B rerankers, CPU-feasible on Apple Silicon for ~50 pairs; the −67% figure above is with reranking on top of contextual retrieval.

→ Plan changes: optional rerank stage over RRF top-50 (rerank: bool on MCP/gRPC search, default on when the model is downloaded via ModelDownloadXPCService); rerank the parent passage, dedupe by document first; the reranker’s top score doubles as the confidence gate (B8).

B4. RAPTOR — Sarthi et al., ICLR 2024, arXiv:2401.18059 — ADOPT (level 1) / 1.6 (level 2)

Recursive cluster summaries; “collapsed tree” retrieval puts leaves and summaries in one index. +20 abs on QuALITY with GPT-4 reader. → Per-document summaries (already planned) get embedded as kind='summary' chunks in the same emb_* tables — collapsed-tree for free. Cluster-of-summaries (level 2) is 1.6, tied to emergent categories.

score = Σ 1/(k+rank), k=60. The 2025 study shows a weak engine drags fusion down. → Plan changes to hybrid.py: per-engine weights set per corpus_class (code → FTS heavier); extra engines as extra lists (facts-KNN, summary-KNN, entities, recency); drop an engine’s list when it yields < 3 hits for the query.

B6. HippoRAG / HippoRAG 2 — Gutiérrez et al., NeurIPS 2024 / ICML 2025, arXiv:2405.14831, 2502.14802 — ADOPT (bounded)

OpenIE triples → phrase + passage nodes, synonymy edges at cosine ≥ 0.8, query entities seed Personalized PageRank (damping 0.5, passage weight 0.05, linking top-k 5), node specificity (inverse document frequency) weights seeds. +7 F1 on associative tasks; the LLM “recognition” filter adds only +0.7. → Plan changes: replace the 1-hop expand_related with PPR over triples (entities + documents) computed in igraph from a cached adjacency, seeds from entity hits, results as one more RRF list; entities.specificity column; similar_to soft edges at ≥ 0.80 distinct from the ≥ 0.92 merge. Skip the LLM filter.

B7. LightRAG — Guo et al., 2024, arXiv:2410.05779 — 1.6

Dual-level keys (entity names vs relation themes), incremental graph merge. → Embedding (subject, predicate) keys so theme queries seed expansion; 1.6 after B6 lands.

B8. Self-Route / Adaptive-RAG / CRAG — arXiv:2407.16833, 2403.14403, 2401.15884 — ADOPT (cheap parts)

Route by query complexity; evaluate retrieval confidence; escalate to full document when chunks don’t suffice. → Plan changes: rag_search returns document_length_tokens and a low_confidence flag (from reranker score / fused-score threshold); a rag_read_document(id, range) tool for self-routing; heuristic decomposition into 2–3 sub-queries fused by RRF for multi-entity “how/why” questions (RAG-Fusion, arXiv:2402.03367). No trained classifier.

B9. Lost in the Middle — Liu et al., TACL 2024, arXiv:2307.03172 — ADOPT (trivial)

U-shaped accuracy by position. → Any Garage-side composition orders passages best-first-and-last; MCP results carry rank and score so clients can too.

B10. Others checked


C. Knowledge-graph construction, entity resolution, categorization

C1. GraphRAG extraction details — Edge et al., arXiv:2404.16130 — ADOPT

Gleaning: after a pass, ask whether entities were missed; re-prompt up to N times. Hierarchical Leiden communities with LLM reports. → Plan changes: gleanings in the distillation profile (default 1) mapped onto LangExtract’s extraction_passes; a summarize_communities dream job (Leiden via igraph over entity–entity edges, one summary per community stored as a synthetic document) — cheap topic discovery and an input to insights.

C2. EDC — Zhang & Soh, 2024, arXiv:2404.03868 — ADOPT

Extract → Define (LLM writes a one-sentence definition per relation) → Canonicalize (embed definitions, match to the schema’s relation definitions). → Plan changes: a predicate_definitions table (the 14 builtin predicates with descriptions, embedded once); an open predicate is normalized by embedding its definition against them, below a threshold it stays open with normalized=false; users extend predicates like categories. Profiles put only the category’s predicates + definitions into the extraction prompt.

C3. CESI — Vashishth et al., WWW 2018, arXiv:1902.00172 — ADOPT

Canonicalization needs side information (exact identifiers, token-set equality, morphology), not embeddings alone. → Plan changes: resolver ladder becomes side-info-first: author_id/email → norm_name token-set equality (“Mark, Rick” = “Rick Mark”) → alias → KNN ≥ 0.92 → create; record which rule fired in entity_aliases.source; a must-not-link table consulted before any merge.

C4. KGGen — Mo et al., NeurIPS 2025, arXiv:2502.09956 — ADOPT

Explicit clustering of near-duplicate entities and relations (LLM-judged, batched) to fix graph sparsity; MINE benchmark checks the KG retains the source’s information. → Plan changes: a canonicalize_entities dream job for the [0.80, 0.92) band — batched yes/no merge judgments, merges become aliases and repoint triples; a MINE-style self-check as a prompt regression test.

C5. ATOM — Lairgi et al., arXiv:2510.22590 (2025/26) — ADOPT

Atomic-fact decomposition then 5-tuples (s, p, o, t_start, t_end); relative times resolved against the document’s observation time; run-to-run variance reduced by atomic decomposition. → Plan changes: relationship facts carry optional valid_from/valid_to, prompt receives the document date (mail Date, mtime, commit date) as observation_time; pairs with A5.

Type-specific prompt cache of already-seen entities fed into each subsequent chunk’s prompt; −45% duplicate nodes (paper’s figure). → Plan changes: thread a per-document “known entities so far” list into each chunk’s extraction prompt, pre-seeded from document_authors, mail participants and same_thread siblings.

C7. LangExtract — Google, 2025 (library) — ADOPT

Few-shot ExampleData-driven extraction with char_interval grounding; ungrounded extractions are filterable; extraction_passes for recall; Ollama-capable. → Plan changes: profiles carry their examples as LangExtract ExampleData (steer by demonstration, which small models follow better than instructions); the provider registry needs a LangExtract adapter per provider kind; the egress test must assert LangExtract’s Gemini path is never selectable.

C8. TnT-LLM — Wan et al., KDD 2024, arXiv:2403.12173 — ADOPT (tier) / 1.6 (taxonomy generation)

LLM labels a sample; a lightweight classifier over embeddings does bulk assignment; LLM only for uncertain cases. Taxonomy generation loop: generate → assign → critique → refine. → Plan changes: categorize becomes LLM zero-shot on a seed set + per-category logistic regression over existing emb_* vectors (assigned_by='classifier'), LLM fallback on low margin; refreshed when the taxonomy changes. The generate→refine loop is the 1.6 emergent-taxonomy design.

C9. iText2KG — Lairgi et al., WISE 2024, arXiv:2409.03284 — REF

Same resolver ladder as the plan; relations need resolution too. → Extend dedup with predicate equivalence (C2); keep extracting from full text, not the summary (their distiller loses long-tail facts).

C10. Personal Knowledge Graph — Skjæveland et al., AI Open 2024, arXiv:2304.09572 — ADOPT

A PKG is about the owner’s world; explicit owner entity, per-statement provenance, user ownership. → An owner entity linked to the is_self author; first-person facts in authored documents resolve to it; rag_assert(subject, predicate, object) for user-stated triples, never overwritten.

C11. Others checked


D. What changes in the plan (summary of ADOPT items)

Plan section Change From
§1 queue New job kinds contextualize, anticipate_questions, canonicalize_entities, summarize_communities; heat score orders the queue; NREM (SQL) vs REM (LLM) phases A2, A7, SCM, C1, C4, B2
§2 facts Decontextualized propositions; collapse fact hits to parent passage; per-kchar cap; gleanings/extraction_passes; known-entity prompt cache; Mem0-style ADD/UPDATE/DELETE/NOOP for canonical dedup; shared 1–10 importance prompt B1, C1, C6, A3, A1
§3 memory Retention exp(-days/(1+recall_count)) replaces two factors; decay from last recall; core memory blocks as MCP resource; user portrait + digests; short-term → long-term promotion by heat; keywords/tags on FTS side; low-confidence rejection in rag_recall; as_of A4, A1, A6, A7, A8, MemX, A5
§4 categories Classifier tier over embeddings with LLM fallback; profiles carry LangExtract examples and predicate definitions C8, C7, C2
§4b triples Bi-temporal columns + rule-based invalidation for functional predicates; predicate_definitions + embedding canonicalization; side-info-first resolver with must-not-link; specificity; similar_to soft edges; owner entity + rag_assert; valid_from from document dates A5, C2, C3, B6, C10, C5
§5 dreaming Reflection trigger Σ importance > threshold, 3 questions, cited answers; anticipated questions; community summaries; active-bank-size metric A1, A2, C1, Auto-Dreamer
search (hybrid.py) chunks.context (heuristic → LLM) in embedding and tsvector; summaries as chunks; weighted multi-list RRF with weakest-link guard; optional local cross-encoder rerank over top-50; PPR expansion as an RRF list; low_confidence, rank, document_length_tokens on results; rag_read_document B2, B4, B5, B3, B6, B8, B9

Deferred to 1.6 (in rough priority): A-MEM neighbour evolution; late chunking via llama_xpc; LightRAG theme keys; RAPTOR level-2 / TnT-LLM taxonomy generation / BERTopic emergent categories; quantized two-stage KNN; Reflexion lessons from search logs; hierarchical digests; conformal category thresholds; OpenIE6 fallback; MemoRAG clues.