Memory & Retrieval•Study date: September 28, 2026•Printable brief ↗Token Benchmark

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.

Where this shows up in MeshTen: selfmem, the memory system our own engineering agents use. Not yet a customer-facing feature.
Executive Brief

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).

Ladder Distribution

82% Rung 1

82% of questions answered from Rung 1 (events + spans, 4k budget), 10% from Rung 2 (whole sessions), and 8% fell back to full context.

Empirical Findings TableScroll table →
Telemetry MetricMeasured ValueContext & Observability
Full Context (Arm A)88 / 100 @ 113.6k tokBaseline pasting the complete ~115k-token chat history scored 88/100 at 113,600 tokens/question.
Semantic Memory (Arm S)88 / 100 @ 19.5k tokStructured 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 tokSimple 400-token chunk retrieval scored 77/100; Arm S outperformed RAG by +11 points (paired McNemar test, p = 0.027).
Ladder Distribution82% Rung 182% of questions answered from Rung 1 (events + spans, 4k budget), 10% from Rung 2 (whole sessions), and 8% fell back to full context.

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

1

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.

2

Question IDs (fresh100) 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.

3

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: one-time structured event extraction queried via a 3-tier fallback ladder), and Arm B (standard RAG with 400-token raw text chunks in a 4k token budget).

4

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.

Visual Benchmark ComparisonTokens per Question vs Accuracy on LongMemEval_S (100 Qs)
0k30k60k90k120k tokFull Context113.6k tok (88/100)Semantic Memory19.5k tok (88/100, 83% fewer)Chunk RAG5.9k tok (77/100, trails by 11 pts)
Empirical Telemetry

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).

Ladder Distribution

82% Rung 1

82% of questions answered from Rung 1 (events + spans, 4k budget), 10% from Rung 2 (whole 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 (freshC) confirmed stability: 89/100 accuracy at ~16% of full-context tokens with ~99% retrieval recall on that sample.
  • Four questions triggered L2 not-in-memory exits prior to Rung 3; all four were correct abstentions on unanswerable queries.
Interpretation & Working Hypotheses

What We Think It Suggests

  • Converting unstructured conversation transcripts into append-only semantic event stores can drastically reduce inference token expenditure on extended multi-session tasks.
  • A tiered fallback ladder resolves the majority of queries from compact representations while preserving the ability to escalate to full context when needed.
Methodology Boundaries

Limits

  • Sample size: Primary evaluation on 100 questions (fresh100) and follow-up on 100 holdout questions (freshC); 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.
Benchmark Harness

Reproduce It (Data & Benchmarks)

  • Benchmark: LongMemEval_S cleaned split (~115k tokens per conversation history).
  • Questions: 100 question IDs pre-committed to version control in fresh100/.
  • Prompts: Standard multi-session conversational evaluation prompts with LongMemEval official scoring rubric.
  • Judge: Independent Claude Sonnet automated evaluator.
  • Raw counts: Arm A 88/100 (113,600 tokens/q), Arm S 88/100 (19,500 tokens/q), Arm B 77/100 (5,900 tokens/q), paired McNemar test p = 0.027 (reproducibility package coming).

Data and prompt templates only; no proprietary code is published.

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 engineered a semantic memory architecture that converts ~115,000-token chat histories once into an append-only SQLite store of structured semantic events (recording agent, action, patient, timestamps, certainty, evidence quotes, and resolved entity IDs) backed by local vector embeddings. Questions are answered through a multi-tier fallback ladder designed to satisfy queries with minimal token expenditure.

Architecture / Evaluation ArmAccuracy (100 Qs)Mean Tokens / Query% of Full ContextLatency & Mechanism
Full Context (Arm A)88 / 100 (88.0%)113,600100.0%Default: complete chat history pasted into context
Semantic Memory (Arm S)88 / 100 (88.0%)19,50017.2%Structured events + fallback ladder (~83% fewer tokens)
Standard Chunk RAG (Arm B)77 / 100 (77.0%)5,9005.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).

The efficiency of the semantic memory system is governed by its multi-tier fallback ladder. Rather than guessing or committing to a single representation, retrieval executes sequentially: Rung 1 constructs a compact working set of structured events and cited source spans within a strict 4k-token budget. If the model determines evidence is insufficient or cannot cite a valid event ID, it escalates to Rung 2, retrieving the full source sessions of the top candidate events (<=12k tokens). Only if Rung 2 remains insufficient does execution fall back to Rung 3 (full context).

Fallback Ladder StageScope & BudgetQuestions Resolved% of Total Workload
Rung 1: Events + Cited SpansCompact events + character-offset quotes (4k budget)82 / 10082.0%
Rung 2: Whole Source SessionsFull transcripts of candidate sessions (<=12k budget)10 / 10010.0%
Rung 3: Full Context FallbackComplete ~115k conversation history8 / 1008.0%
L2 Early ExitVerified not-in-memory exit (abstention)4 / 4100% correct

In total, 82% of all questions were answered cleanly from Rung 1 alone, 10% required whole sessions at Rung 2, and only 8% required full-context fallback at Rung 3. Furthermore, 4 questions triggered an early L2 'not-in-memory' exit before Rung 3, 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 (freshC) 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 fallback ladders eliminates the economic and latency burden of pasting whole histories without compromising reasoning accuracy on these benchmarks.

Current synthesis: Semantic Memory Living Paper v1.