Published by Sean Carr
83% Fewer Tokens, Matched Accuracy on 100 Questions: Semantic Memory vs Pasting the Whole History
On LongMemEval_S (~115k-token chat histories), structured event memory matched full-context accuracy (88/100) using 19.5k tokens, an 82.8% token reduction. A follow-up holdout scored 89/100 at ~16% tokens.
At a Glance
Full Context (Arm A)
88 / 100 @ 113.6k tok
Baseline pasting the complete ~115k-token chat history scored 88/100 at 113,600 tokens/question.
Semantic Memory (Arm S)
88 / 100 @ 19.5k tok
Structured event memory matched full-context accuracy on this 100-question set (88/100) consuming 19,500 tokens (17.2% of Arm A, an 82.8% reduction).
Standard Chunk RAG (Arm B)
77 / 100 @ 5.9k tok
Simple 400-token chunk retrieval scored 77/100; Arm S outperformed RAG by +11 points (paired McNemar test, p = 0.027).
Resolution Tier Split
82% Tier 1
82% of questions answered at the compact retrieval tier (4k budget), 10% from expanded source sessions, and 8% fell back to full context.
| Telemetry Metric | Measured Value | Context & Observability |
|---|---|---|
| Full Context (Arm A) | 88 / 100 @ 113.6k tok | Baseline pasting the complete ~115k-token chat history scored 88/100 at 113,600 tokens/question. |
| Semantic Memory (Arm S) | 88 / 100 @ 19.5k tok | Structured event memory matched full-context accuracy on this 100-question set (88/100) consuming 19,500 tokens (17.2% of Arm A, an 82.8% reduction). |
| Standard Chunk RAG (Arm B) | 77 / 100 @ 5.9k tok | Simple 400-token chunk retrieval scored 77/100; Arm S outperformed RAG by +11 points (paired McNemar test, p = 0.027). |
| Resolution Tier Split | 82% Tier 1 | 82% of questions answered at the compact retrieval tier (4k budget), 10% from expanded source sessions, and 8% fell back to full context. |
Published by Sean Carr
View & print executive brief version →Executive Summary & Core Finding
When evaluating conversational agents over ~115,000-token chat histories on the public LongMemEval_S benchmark, pasting full conversation history into the context window scored 88/100 while consuming 113.6k tokens per question. Our semantic memory architecture matched that exact 88/100 score on this 100-question set using only 19.5k tokens per question, an 82.8% token reduction (~83% fewer tokens). Standard RAG chunks trailed at 77/100 (paired McNemar test, p = 0.027). A follow-up holdout on 100 fresh questions confirmed stability at 89/100 accuracy and ~16% tokens.
Method
We evaluated retrieval architectures on the public LongMemEval_S cleaned benchmark comprising ~115,000-token multi-session chat histories and 100 never-seen evaluation questions.
Question IDs were committed to version control prior to the run to prevent cherry-picking; answering used Gemini 3.8 Flash and scoring was evaluated independently by Claude Sonnet using LongMemEval's official rubric.
We evaluated three distinct retrieval arms: Arm A (full context, pasting the entire conversation history into the context window for every question), Arm S (semantic memory: structured event indexing queried with hierarchical context escalation), and Arm B (standard RAG with 400-token raw text chunks in a 4k token budget).
Predictions were formally locked in version control prior to scoring: predicting that Arm S accuracy would be within 2 points of full context (S >= A - 2), Arm S token consumption would be <= 15% of Arm A, and Arm S would outperform chunk RAG by >= 10 points.
What We Measured
Comparative accuracy, token expenditure, and fallback ladder breakdown on LongMemEval_S (100 Qs)
Full Context (Arm A)
88 / 100 @ 113.6k tok
Baseline pasting the complete ~115k-token chat history scored 88/100 at 113,600 tokens/question.
Semantic Memory (Arm S)
88 / 100 @ 19.5k tok
Structured event memory matched full-context accuracy on this 100-question set (88/100) consuming 19,500 tokens (17.2% of Arm A, an 82.8% reduction).
Standard Chunk RAG (Arm B)
77 / 100 @ 5.9k tok
Simple 400-token chunk retrieval scored 77/100; Arm S outperformed RAG by +11 points (paired McNemar test, p = 0.027).
Resolution Tier Split
82% Tier 1
82% of questions answered at the compact retrieval tier (4k budget), 10% from expanded source sessions, and 8% fell back to full context.
Experimental Notes & Observability Details
- Locked prediction results: Clause 1 (Arm S accuracy within 2 points of full context) was CONFIRMED (88 vs 88). Clause 2 (Arm S tokens <= 15% of full context) was REFUTED at 17.2%. Clause 3 (Arm S beats RAG by >= 10 points) was CONFIRMED (+11 points, paired McNemar test, p = 0.027).
- A follow-up holdout evaluation on 100 fresh unseen questions confirmed stability: 89/100 accuracy at ~16% of full-context tokens with ~99% retrieval recall on that sample.
- Four questions triggered verified early abstention exits prior to full-context fallback; all four were correct abstentions on unanswerable queries.
What We Think It Suggests
- Converting unstructured conversation transcripts into structured semantic memory indexes can drastically reduce inference token expenditure on extended multi-session tasks.
- Hierarchical context escalation resolves the majority of queries from compact representations while preserving the ability to expand scope only when needed.
Limits
- Sample size: Primary evaluation on 100 questions and follow-up on 100 holdout questions; larger evaluation sets could reveal edge-case degradation.
- Ingestion compute trade-off: Structured event extraction requires upfront compute during ingestion; it is uneconomical for conversations queried only once or twice.
- Single benchmark: Evaluated on LongMemEval_S; tasks requiring subtle linguistic tone analysis rather than factual event tracking may require full transcripts.
Detailed Analysis & Field Observations
In modern conversational AI and agent engineering, the prevailing default for handling extended interactions is brute-force context stuffing: as long as a model supports a 1M+ token context window, applications simply paste the entire historical chat transcript into the prompt on every turn. While technically straightforward, this approach imposes severe operational costs: sending 100,000+ tokens on every turn causes linear cost explosion, multi-second latency inflation, and degradation where reasoning models struggle to attend reliably across massive context spans.
The standard alternative has been naive chunk-based Retrieval-Augmented Generation (RAG): chunking text into 400-token blocks and retrieving top-k chunks via dense vector similarity. However, on complex multi-session reasoning, such as tracking state progression over time, resolving user preferences, or synthesizing temporal sequences, naive chunk RAG consistently fails because chunk boundaries fracture discourse structure.
To resolve this trade-off, we built a semantic memory pipeline that indexes ~115,000-token chat histories into structured factual records and linked source spans, backed by dense embeddings. Queries retrieve compact evidence first and escalate context scope only when verification indicates insufficient support.
| Architecture / Evaluation Arm | Accuracy (100 Qs) | Mean Tokens / Query | % of Full Context | Latency & Mechanism |
|---|---|---|---|---|
| Full Context (Arm A) | 88 / 100 (88.0%) | 113,600 | 100.0% | Default: complete chat history pasted into context |
| Semantic Memory (Arm S) | 88 / 100 (88.0%) | 19,500 | 17.2% | Structured event index + tiered escalation (~83% fewer tokens) |
| Standard Chunk RAG (Arm B) | 77 / 100 (77.0%) | 5,900 | 5.2% | Top-k 400-token text chunks (4k token budget) |
On the public LongMemEval_S cleaned benchmark, evaluating 100 never-seen questions over ~115k-token chat histories with an independent Claude Sonnet judge, our semantic memory architecture (Arm S) achieved 88/100 accuracy, matching the full-context baseline (Arm A, 88/100) on this 100-question set while consuming only 19,500 tokens per question (17.2% of Arm A's 113,600 tokens). This represents an 82.8% (~83%) reduction in token consumption with zero loss in task accuracy on this sample. Meanwhile, standard chunk RAG (Arm B) collapsed to 77/100, trailing semantic memory by 11 points (a statistically significant margin under paired McNemar testing, p = 0.027).
Rather than guessing or committing to a single context width, retrieval expands progressively only when prior evidence fails grounding checks: compact records and cited spans handle the first tier within a 4k-token budget, expanding to candidate source sessions (<=12k tokens) and finally full context only when needed.
| Retrieval Tier | Scope & Budget | Questions Resolved | % of Total Workload |
|---|---|---|---|
| Compact Tier | Indexed records + cited evidence spans (4k budget) | 82 / 100 | 82.0% |
| Expanded Session Tier | Full transcripts of candidate sessions (<=12k budget) | 10 / 100 | 10.0% |
| Full Context Fallback | Complete ~115k conversation history | 8 / 100 | 8.0% |
| Verified Abstention | Early exit confirming missing evidence | 4 / 4 | 100% correct |
In total, 82% of all questions were answered cleanly at the compact tier alone, 10% required expanded session transcripts, and only 8% required full-context fallback. Furthermore, 4 questions triggered an early abstention exit prior to full fallback, and independent audit confirmed that all 4 were correct abstentions on unanswerable questions.
In adherence to our Empirical Verification Standard, all quantitative hypotheses were pre-registered and committed to version control prior to scoring. Clause 1 (Arm S accuracy within 2 points of full context) was CONFIRMED (88 vs 88). Clause 3 (Arm S outperforming chunk RAG by >= 10 points) was CONFIRMED (+11 points, paired McNemar test, p = 0.027). However, Clause 2, which predicted that Arm S tokens would be <= 15% of full context, was explicitly REFUTED by the empirical data at 17.2%. Transparently publishing refuted prediction clauses is essential to maintaining scientific integrity across AI systems benchmarks.
To test whether these findings were stable beyond a single test split, we conducted a follow-up holdout evaluation across an additional 100 fresh, never-seen questions with Sonnet judging. The merged pipeline reproduced the same performance characteristics on this second sample, achieving 89/100 accuracy at approximately 16% of full-context tokens with an estimated retrieval recall of ~99%. For long-running conversational systems, semantic event memory with tiered escalation eliminates the economic and latency burden of pasting whole histories without compromising reasoning accuracy on these benchmarks.
Current synthesis: Semantic Memory Living Paper v1.