Skip to content

Benchmark vs competitors - #30

Open
Oneshot1123 wants to merge 4 commits into
mienetic:mainfrom
Oneshot1123:benchmark-vs-competitors
Open

Oneshot1123 wants to merge 4 commits into
mienetic:mainfrom
Oneshot1123:benchmark-vs-competitors

Conversation

@Oneshot1123

Copy link
Copy Markdown
Contributor

Summary

Adds a reproducible benchmark harness that compares Mnema against Mem0, Zep, and LangMem on the same curated dataset (30 seed memories, 24 eval queries) with recall@5, MRR, avg_score, and latency. First results show Mnema leading across the board β€” attribution is tag boosting + decay scoring, not tuning.

Related issue

Closes #16

Changes

  • benchmark/run_benchmark.py β€” Orchestrator that seeds each tool, runs every query, computes metrics, and writes results.json
  • benchmark/adapters/ β€” MemoryTool protocol + four adapters (Mnema, Mem0, Zep, LangMem) with docstrings
  • benchmark/README.md β€” Setup guide, prerequisites, configuration doc, feature comparison table
  • benchmark/requirements.txt β€” Dependencies for all four adapters
  • benchmark/results.json β€” Raw per-query results from the latest run
  • docs/benchmark.md β€” Published results with methodology, per-tool breakdowns, and known differences

Checklist

  • ruff check . is clean
  • pytest passes β€” 148/148 service-layer tests pass; 15 pre-existing test_api.py errors (Router TypeError, unrelated to this PR)
  • New public functions / classes have docstrings
  • Docs updated (README.md, SKILL.md, docs/) if user-facing behavior changed
  • N/A β€” no new backend or embedding provider added

Notes

  • Fairness: Every tool runs at default settings. No tuning on either side.
  • Mem0 API key: A dummy OPENAI_API_KEY is set at import time β€” infer=False means the LLM is never called.
  • Zep skipped: Needs Docker (CE) or a ZEP_API_KEY (Cloud). Adapter code is complete and tested.
  • Why Mnema scores higher: Hybrid scoring formula (0.7 Γ— vector + 0.2 Γ— tag_overlap + 0.1 Γ— decay) resolves ties that pure vector search can't. Mem0 and LangMem use flat vector search only.
  • No changes to Mnema source: Everything lives in benchmark/ and docs/benchmark.md.

Oneshot1123 and others added 4 commits July 30, 2026 23:21
- Reusable benchmark runner with adapter architecture
- 4 tool adapters: Mnema, Mem0, Zep, LangMem
- Uses existing 30-memory / 24-query eval dataset
- Metrics: recall@5, MRR, avg_score, latency
- First results published in docs/benchmark.md
- Full methodology documented in benchmark/README.md
- Update Zep adapter to use v2 Cloud SDK with ZEP_API_KEY
- Keep CE support via Docker + ZEP_BASE_URL
- Update requirements.txt and benchmark/docs READMEs
- Fix mem0 adapter: set OPENAI_API_KEY placeholder, 384-dim Qdrant config
- Add Mem0 results to docs/benchmark.md (100%/0.979/0.633)
- Remove stray config files from tracking
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.

Benchmark vs Mem0 / Zep / LangMem

1 participant