Skip to content

feat(eval): openmem-eval offline + live benchmarking kit (004)#2

Merged
Ketankhunti merged 1 commit into
mainfrom
004-eval-kit
May 1, 2026
Merged

feat(eval): openmem-eval offline + live benchmarking kit (004)#2
Ketankhunti merged 1 commit into
mainfrom
004-eval-kit

Conversation

@Ketankhunti

Copy link
Copy Markdown
Owner

Implements spec 004-eval-kit.

What

Stdlib-only openmem-eval CLI that benchmarks any OMP provider (postgres,
mem0, supermemory, letta, passthrough) against a bundled 50-fact / 20-query
dataset. Outputs a Markdown report and JSONL trace.

Highlights

  • Recall@k, MRR, latency p50/p95/p99 per provider
  • Cost estimation with confirmation gate above --cost-threshold
    (default $1.00); refuses to run in CI
  • Privacy-by-default trace — payloads SHA-256 hashed (12-hex prefix)
  • Post-run cleanup via --cleanup (lists by eval-{run_id} user_id)
  • Dual-stamped facts (R11) — [fact_id=…] content prefix + fact:… tag
  • Env-aware factory — reads OMP_POSTGRES_URL, MEM0_API_KEY,
    SUPERMEMORY_API_KEY, LETTA_API_KEY

Validation

Metric Result
Tests 365 passed, 21 skipped
Coverage 89.41% (gate ≥85%)
Live postgres run recall@5 = 0.80, MRR = 0.78, search p95 = 6.4 ms, $0.00

Sample artifacts committed under docs/eval/ so
reviewers can see the output without running it.

Files

  • New: sdk-python/openmem/eval/ (runner, scorer, trace, report, cost,
    cleanup, dataset, cli, types, confirm + bundled dataset)
  • New: sdk-python/tests/eval/ (10 test modules)
  • New: specs/004-eval-kit/ (spec, plan, tasks, contracts, quickstart)
  • New: docs/eval/ (sample report + trace + README)
  • Modified: sdk-python/openmem/memory.py (wait_for_ingest pass-through)
  • Modified: sdk-python/pyproject.toml (openmem-eval script entry)
  • Modified: root + sdk-python READMEs

… under docs/eval

The --trace flag was previously a no-op (TraceWriter defined but never called from runner.run). Hook it in with payload-hashed entries for every add/search/init verb. Add docs/eval/README.md with a committed sample-report.md and sample-trace.jsonl from a real local postgres run so users can see the eval kit's output without running it. Link from root and sdk-python READMEs. 365 tests passing, 89.41% coverage.
@Ketankhunti
Ketankhunti merged commit 80ffde7 into main May 1, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants