Aletheia

Aletheia benchmarks: how to reproduce every published number

Aletheia (aletheia-mem) publishes retrieval numbers only. They show whether the evidence for a question is among the top five search results. They are not answer accuracy, and answer accuracy is not measured. This page lists the command behind each published number, what the command does, the results with dates, and the experiments that did not work.

What is and is not measured

Measured, retrieval only:

Not measured:

Every number below is measured-by-us, with the command. None is a vendor claim.

The five commands

CommandWhat it measuresNeeds
bun bench/locomo-retrieval.mjsRecall@1 to 15, MRR and time per query on LoCoMo, for several search strategiesThe dataset file. The optional embeddings package for vector rows
bun bench/claude-mem-baseline.mjsThe same questions against a running claude-mem workerAn isolated claude-mem worker
bun bench/scale.mjs 50000 20000 --index tuned --queries 200 --seed 1Insert rate, keyword search latency, synthetic Recall@5 and database size at 50,000 rowsNothing
bun bench/gate.mjsSynthetic Recall@5 and p95 latency, checked against bench/baseline.jsonNothing
bun scripts/compare-bench.mjsPrints the LoCoMo table from the committed result filesNothing, no network

Quick check that needs no setup:

bun scripts/compare-bench.mjs

It reads bench/results/2026-10-26/*.json and prints one row per strategy, then compares each earlier claim with the measured value. On 2026-10-29 every row of the claim table read REPRODUCED, which means within 0.5 points of the earlier claim.

Reproduce the LoCoMo numbers

LoCoMo is a dataset of ten long conversations with questions and gold evidence. The script header names the source, https://github.com/snap-research/locomo. The download URL below answered HTTP 200 to a HEAD request on 2026-10-29. This page did not download it again. Check your copy against the SHA-256 that every result file records.

  1. Download the dataset into bench/data/. The folder is ignored by git.
   mkdir -p bench/data
   curl -o bench/data/locomo10.json https://raw.githubusercontent.com/snap-research/locomo/main/data/locomo10.json
   sha256sum bench/data/locomo10.json
   # 79fa87e90f04081343b8c8debecb80a9a6842b76a7aa537dc9fdf651ea698ff4

On 2026-10-29 the author's local copy had that SHA-256.

  1. Install the optional embeddings package in a folder of its own. Vector and rerank rows need it. Keyword rows do not. The first run downloads the models once.
   mkdir -p bench/runtime && cd bench/runtime
   bun add @huggingface/transformers    # the 2026-10-26 runs used 4.3.1
   cd ../..
   export ALETHEIA_TRANSFORMERS_FROM=$PWD/bench/runtime

The embedding model is Xenova/bge-small-en-v1.5 (384 dimensions, quantised). The reranker is Xenova/ms-marco-MiniLM-L-6-v2.

  1. Run one row. These are the exact commands recorded for the 2026-10-26 results:
   bun bench/locomo-retrieval.mjs --data bench/data/locomo10.json --facts none --out bench/results/2026-10-26/raw-turns.json
   bun bench/locomo-retrieval.mjs --data bench/data/locomo10.json --facts dataset --out bench/results/2026-10-26/dataset-facts.json
   bun bench/locomo-retrieval.mjs --data bench/data/locomo10.json --facts dataset --rerank --out bench/results/2026-10-26/dataset-facts-rerank.json
   bun bench/locomo-retrieval.mjs --data bench/data/locomo10.json --limit 3 --facts dataset --rerank --out bench/results/2026-10-26/dataset-facts-3-rerank.json
   bun bench/locomo-retrieval.mjs --data bench/data/locomo10.json --facts rules --out bench/results/2026-10-26/our-facts-rules.json

Use a new output folder for your own run, then pass it to bun scripts/compare-bench.mjs <folder>.

How the LoCoMo benchmark works

The method is in [bench/locomo-retrieval.mjs](https://github.com/mohamed-ashraf-elsaed/aletheia-mem/blob/main/bench/locomo-retrieval.mjs).

Results

All rows are from bench/results/2026-10-26/, generated on 2026-10-26. The result files do not record the machine, the Bun version or the operating system, so latency columns cannot be compared across machines.

RunQuestionsRecall@5MRRms/query
claude-mem 15.2.0 (as shipped), raw turns1,53636.0%0.285p50 1,699 ms, p95 2,824 ms (idle, 40 queries)
Raw turns, keyword (BM25)1,53655.3%0.4822.00
Raw turns, hybrid1,53657.4%0.4973.72
Dataset facts, all 101,53664.8%0.5915.53
Dataset facts, 3 conversations38367.4%0.6205.80
Dataset facts, 3 conversations, + rerank38373.9%0.686251.16
Dataset facts, all 10, + rerank1,53672.3%0.680646.19
Rule-extracted facts, all 101,53657.7%0.4924.94

Notes on the table:

Compare the claude-mem row with the raw-turns rows only. They are the only rows where both systems store the same raw text. The speed columns are not like for like: one is an in-process call and the other is an HTTP request to a worker.

Known gap in the evidence

The local raw-turns.log in the results folder, which git ignores, shows hybrid Recall@5 of 44.7%. The committed raw-turns.json, which the README and compare-bench.mjs use, shows 57.4%. The other four logs match their JSON files. The cause is unknown and the run has not been repeated. The 57.4% figure is the published one until it is.

Scale: 50,000 rows

bun bench/scale.mjs 50000 20000 --index tuned --queries 200 --seed 1

The script builds a synthetic store with Zipf-like word frequencies and random unit vectors, from a seeded random generator. It measures insert rate, keyword search latency for all projects, one project and one project plus host, a synthetic Recall@5, database size, and vector search over 20,000 vectors. The script is [bench/scale.mjs](https://github.com/mohamed-ashraf-elsaed/aletheia-mem/blob/main/bench/scale.mjs).

The README records, for this command on Linux: keyword search p95 of 32.7 ms for one project and 58.6 ms across all projects. It states a target of 50 ms and says the target is met for project-scoped search. The CHANGELOG for 0.1.4 says the project-scoped p95 fell from 67.5 ms to 32.7 ms. This page did not re-run the command, because it takes long. Synthetic text is not real memory, so treat the figures as a check on the index, not a promise for your data.

The regression gate

bun bench/gate.mjs

The gate builds a fixed synthetic corpus of 50,000 rows with seed 1, runs 100 queries and takes the median p95 of 5 passes. Each query has several near-duplicate distractors, so Recall@5 sits near 0.9 and has room to drop. It compares the result with [bench/baseline.json](https://github.com/mohamed-ashraf-elsaed/aletheia-mem/blob/main/bench/baseline.json):

The committed baseline was written on 2026-10-28 on linux x64 bun 1.3.10 at commit 343bb19, with Recall@5 0.9 and p95 7.759 ms. CI runs the gate on Linux only (workflow).

A run on 2026-10-29, on Linux 7.0.0-38-generic x86_64 with Bun 1.3.10, took 9.8 seconds:

gate: recall@5 0.9000 (baseline 0.9000, delta +0.0000)
gate: p95 latency 8.688 ms (baseline 7.759 ms, +12.0%)
gate: PASS

Latency was 12% above the baseline and the gate still passed. Latency is noisy, so the gate guards against large regressions, not small ones.

Other scripts in bench/

Negative results

These are the experiments that did not give the hoped-for result.

Next steps