InternalsBenchmarks

Benchmarks

⚠️

There is no published benchmark of Mnemosyne against other memory systems, and no LongMemEval run in the repository. The comparison tables and latency figures that used to be on this page could not be reproduced from the repository and were removed.

What exists is a set of local gates that catch regressions. All of them live in packages/core/src/benchmark. There is no top-level benchmarks/ directory.

What the repository measures

WhatFilesHow it runs
Micro-benchmarksbench.ts, check-regression.ts, packages/core/bench-baseline.jsonpnpm --filter @mnemo-ai/core bench, then bench:check
Recall relevancerelevance/harness.ts, relevance/corpus.json, relevance/vectors.jsonA test in pnpm --filter @mnemo-ai/core test
Quality gatemetrics.ts, quality-gates.ts, synthetic-corpus.ts, run-quality-gate.tspnpm --filter @mnemo-ai/core bench:quality
Load smokeload/k6, scripts/load-smoke-local.shPart of the full sweep

Micro-benchmarks

bench.ts runs five tinybench tasks against the in-memory storage adapter, with a stub embedder. No database and no network are involved:

  • wilsonLowerBound(alpha=3, beta=2)
  • lshBands(1536-dim vector)
  • vector.search(k=10, n=100)
  • storage.queryFacts(workspace)
  • storage.createFact (write)

These numbers describe the cost of the in-process code paths. They say nothing about a real deployment with Postgres, Redis and an embedding provider.

The regression gate

check-regression.ts compares a fresh run with bench-baseline.json and exits with an error when a task got slower:

  • throughput (hz) dropped by more than 25%, or
  • p99 more than doubled and grew by more than 0.05 ms.

A task that is not in the baseline is reported and does not fail the gate. The limits can be changed with BENCH_TOLERANCE, BENCH_P99_TOLERANCE and BENCH_P99_FLOOR_MS.

git clone https://github.com/lucasmailland/mnemosyne
cd mnemosyne
pnpm install
pnpm --filter @mnemo-ai/core build
pnpm --filter @mnemo-ai/core bench:json
pnpm --filter @mnemo-ai/core bench:check

bench:json writes packages/core/bench-results.json, which bench:check reads.

Recall relevance

relevance/harness.ts runs the real recall cascade (hot, pointer, cold) over two labelled corpora, using in-memory storage and frozen bge-m3 vectors from vectors.json. It needs no model, no network and no Docker, and it is deterministic. The test __tests__/recall-relevance.test.ts fails when ranking gets worse. Set MNEMO_BENCH_REPORT=1 to print the measured numbers.

Its own header states the limits: it shows what the pipeline does with good vectors. It cannot show what another embedding model would score, and its lexical arm is a substring match, not Postgres full-text search.

Quality gate

metrics.ts computes Recall@K, Precision@K, F1@K, MRR and answer coverage, the metrics the LongMemEval paper uses. run-quality-gate.ts applies them to a generated synthetic corpus with an oracle retriever that returns the correct facts, so it checks the metric and threshold code, not recall quality. The LongMemEval dataset itself is not in the repository.

The release gate

GitHub Actions is off, so there is no CI. A release passes a local sweep:

FULL=1 bash scripts/full-sweep.sh

With FULL=1 the sweep adds the integration suites, the micro-benchmarks with the regression gate, and a k6 load smoke test (scripts/load-smoke-local.sh). It needs Docker.

What is not measured

  • Comparisons with other memory systems.
  • LongMemEval scores.
  • Recall latency percentiles, write throughput or memory footprint of a deployed server. The k6 scripts in load/k6 let you measure these on your own hardware.