memory-arena 0.1.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- memory_arena-0.1.8/.gitignore +82 -0
- memory_arena-0.1.8/CHANGELOG.md +410 -0
- memory_arena-0.1.8/LICENSE +21 -0
- memory_arena-0.1.8/PKG-INFO +746 -0
- memory_arena-0.1.8/README.md +667 -0
- memory_arena-0.1.8/SECURITY.md +60 -0
- memory_arena-0.1.8/docs/hero.png +0 -0
- memory_arena-0.1.8/docs/showcase.png +0 -0
- memory_arena-0.1.8/memory_arena/__init__.py +19 -0
- memory_arena-0.1.8/memory_arena/arena/__init__.py +0 -0
- memory_arena-0.1.8/memory_arena/arena/engine.py +252 -0
- memory_arena-0.1.8/memory_arena/benchmark/__init__.py +15 -0
- memory_arena-0.1.8/memory_arena/benchmark/evaluator.py +315 -0
- memory_arena-0.1.8/memory_arena/benchmark/questions.py +150 -0
- memory_arena-0.1.8/memory_arena/benchmark/recall_lab.py +120 -0
- memory_arena-0.1.8/memory_arena/benchmark/recall_metrics.py +119 -0
- memory_arena-0.1.8/memory_arena/benchmark/runner.py +694 -0
- memory_arena-0.1.8/memory_arena/chatbot/__init__.py +0 -0
- memory_arena-0.1.8/memory_arena/chatbot/api.py +268 -0
- memory_arena-0.1.8/memory_arena/chatbot/router.py +12 -0
- memory_arena-0.1.8/memory_arena/chatbot/session.py +73 -0
- memory_arena-0.1.8/memory_arena/cli.py +439 -0
- memory_arena-0.1.8/memory_arena/data/longmemeval-s/processed/questions.jsonl +16 -0
- memory_arena-0.1.8/memory_arena/data/longmemeval-s/processed/sessions.jsonl +82 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_bm25_seed0.json +1559 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_bm25_seed1.json +1559 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_bm25_seed2.json +1559 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_bm25_summary.json +90 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_cognee_seed0.json +1386 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_cognee_summary.json +86 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_full_context_seed0.json +2098 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_full_context_summary.json +81 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_graphiti_seed0.json +1444 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_graphiti_summary.json +86 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_hybrid_rrf_seed0.json +1546 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_hybrid_rrf_seed1.json +1546 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_hybrid_rrf_seed2.json +1546 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_hybrid_rrf_summary.json +90 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_hyde_seed0.json +1540 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_hyde_seed1.json +1540 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_hyde_seed2.json +1537 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_hyde_summary.json +90 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_karpathy_llm_wiki_seed0.json +1496 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_karpathy_llm_wiki_summary.json +86 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_langmem_seed0.json +1386 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_langmem_seed1.json +1386 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_langmem_seed2.json +1386 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_langmem_summary.json +90 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_mem0_seed0.json +1453 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_mem0_seed1.json +1455 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_mem0_seed2.json +1453 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_mem0_summary.json +90 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_mem0g_seed0.json +1457 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_mem0g_summary.json +86 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_memori_seed0.json +1386 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_memori_summary.json +86 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_naive_vector_seed0.json +1540 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_naive_vector_seed1.json +1540 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_naive_vector_seed2.json +1538 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_naive_vector_summary.json +90 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_persona_profile_seed0.json +1537 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_persona_profile_seed1.json +1538 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_persona_profile_seed2.json +1540 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_persona_profile_summary.json +90 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_raptor_seed0.json +1521 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_raptor_seed1.json +1521 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_raptor_seed2.json +1521 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_raptor_summary.json +90 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_recency_window_seed0.json +1786 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_recency_window_seed1.json +1786 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_recency_window_seed2.json +1786 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_recency_window_summary.json +90 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_reflection_seed0.json +1539 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_reflection_seed1.json +1539 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_reflection_seed2.json +1541 -0
- memory_arena-0.1.8/memory_arena/data/results_snapshot/longmemeval-s_reflection_summary.json +90 -0
- memory_arena-0.1.8/memory_arena/exceptions.py +33 -0
- memory_arena-0.1.8/memory_arena/graph/__init__.py +0 -0
- memory_arena-0.1.8/memory_arena/graph/analyzer.py +143 -0
- memory_arena-0.1.8/memory_arena/graph/cypher_generator.py +115 -0
- memory_arena-0.1.8/memory_arena/graph/cypher_templates.py +106 -0
- memory_arena-0.1.8/memory_arena/graph/extractor.py +338 -0
- memory_arena-0.1.8/memory_arena/graph/neo4j_store.py +152 -0
- memory_arena-0.1.8/memory_arena/graph/resolver.py +77 -0
- memory_arena-0.1.8/memory_arena/graph/schema.py +55 -0
- memory_arena-0.1.8/memory_arena/llm/__init__.py +0 -0
- memory_arena-0.1.8/memory_arena/llm/client.py +327 -0
- memory_arena-0.1.8/memory_arena/llm/openrouter.py +122 -0
- memory_arena-0.1.8/memory_arena/llm/providers.py +252 -0
- memory_arena-0.1.8/memory_arena/models/__init__.py +1 -0
- memory_arena-0.1.8/memory_arena/models/api.py +61 -0
- memory_arena-0.1.8/memory_arena/models/benchmark.py +172 -0
- memory_arena-0.1.8/memory_arena/models/document.py +66 -0
- memory_arena-0.1.8/memory_arena/models/graph.py +51 -0
- memory_arena-0.1.8/memory_arena/models/retrieval.py +33 -0
- memory_arena-0.1.8/memory_arena/paths.py +90 -0
- memory_arena-0.1.8/memory_arena/py.typed +0 -0
- memory_arena-0.1.8/memory_arena/sessions/__init__.py +23 -0
- memory_arena-0.1.8/memory_arena/sessions/loaders.py +210 -0
- memory_arena-0.1.8/memory_arena/sessions/schema.py +110 -0
- memory_arena-0.1.8/memory_arena/settings.py +246 -0
- memory_arena-0.1.8/memory_arena/static/404/index.html +1 -0
- memory_arena-0.1.8/memory_arena/static/404.html +1 -0
- memory_arena-0.1.8/memory_arena/static/_next/static/chunks/117-020b9cef866aefe5.js +2 -0
- memory_arena-0.1.8/memory_arena/static/_next/static/chunks/648-77f86c7bea515da8.js +1 -0
- memory_arena-0.1.8/memory_arena/static/_next/static/chunks/app/_not-found/page-c59625541a56b4fe.js +1 -0
- memory_arena-0.1.8/memory_arena/static/_next/static/chunks/app/arena/page-410e2e6b1ec69f52.js +1 -0
- memory_arena-0.1.8/memory_arena/static/_next/static/chunks/app/benchmark/page-76db067e901c05a6.js +1 -0
- memory_arena-0.1.8/memory_arena/static/_next/static/chunks/app/layout-82e84594976f899d.js +1 -0
- memory_arena-0.1.8/memory_arena/static/_next/static/chunks/app/page-e07ee36911d8bec3.js +1 -0
- memory_arena-0.1.8/memory_arena/static/_next/static/chunks/app/recall-lab/page-5e983cc6e76fcbab.js +1 -0
- memory_arena-0.1.8/memory_arena/static/_next/static/chunks/fd9d1056-40eb70ab657cb18b.js +1 -0
- memory_arena-0.1.8/memory_arena/static/_next/static/chunks/framework-f66176bb897dc684.js +1 -0
- memory_arena-0.1.8/memory_arena/static/_next/static/chunks/main-app-ce09194c2205bef4.js +1 -0
- memory_arena-0.1.8/memory_arena/static/_next/static/chunks/main-f93c663012e61193.js +1 -0
- memory_arena-0.1.8/memory_arena/static/_next/static/chunks/pages/_app-72b849fbd24ac258.js +1 -0
- memory_arena-0.1.8/memory_arena/static/_next/static/chunks/pages/_error-7ba65e1336b92748.js +1 -0
- memory_arena-0.1.8/memory_arena/static/_next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- memory_arena-0.1.8/memory_arena/static/_next/static/chunks/webpack-03f7c6bc932ce1e3.js +1 -0
- memory_arena-0.1.8/memory_arena/static/_next/static/css/7f0f5d6971a0dc74.css +3 -0
- memory_arena-0.1.8/memory_arena/static/_next/static/wwMdP-USmLrBi4wuoZSsd/_buildManifest.js +1 -0
- memory_arena-0.1.8/memory_arena/static/_next/static/wwMdP-USmLrBi4wuoZSsd/_ssgManifest.js +1 -0
- memory_arena-0.1.8/memory_arena/static/arena/index.html +1 -0
- memory_arena-0.1.8/memory_arena/static/arena/index.txt +8 -0
- memory_arena-0.1.8/memory_arena/static/benchmark/index.html +1 -0
- memory_arena-0.1.8/memory_arena/static/benchmark/index.txt +9 -0
- memory_arena-0.1.8/memory_arena/static/favicon.ico +0 -0
- memory_arena-0.1.8/memory_arena/static/index.html +1 -0
- memory_arena-0.1.8/memory_arena/static/index.txt +9 -0
- memory_arena-0.1.8/memory_arena/static/recall-lab/index.html +1 -0
- memory_arena-0.1.8/memory_arena/static/recall-lab/index.txt +9 -0
- memory_arena-0.1.8/memory_arena/strategies/__init__.py +190 -0
- memory_arena-0.1.8/memory_arena/strategies/amem.py +511 -0
- memory_arena-0.1.8/memory_arena/strategies/base.py +151 -0
- memory_arena-0.1.8/memory_arena/strategies/bm25.py +125 -0
- memory_arena-0.1.8/memory_arena/strategies/cognee.py +242 -0
- memory_arena-0.1.8/memory_arena/strategies/embeddings.py +62 -0
- memory_arena-0.1.8/memory_arena/strategies/full_context.py +87 -0
- memory_arena-0.1.8/memory_arena/strategies/graphiti.py +317 -0
- memory_arena-0.1.8/memory_arena/strategies/graphiti_falkor.py +131 -0
- memory_arena-0.1.8/memory_arena/strategies/hipporag2.py +539 -0
- memory_arena-0.1.8/memory_arena/strategies/hybrid_rrf.py +132 -0
- memory_arena-0.1.8/memory_arena/strategies/hyde.py +85 -0
- memory_arena-0.1.8/memory_arena/strategies/karpathy_llm_wiki.py +423 -0
- memory_arena-0.1.8/memory_arena/strategies/langmem.py +176 -0
- memory_arena-0.1.8/memory_arena/strategies/mem0.py +255 -0
- memory_arena-0.1.8/memory_arena/strategies/mem0g.py +240 -0
- memory_arena-0.1.8/memory_arena/strategies/memori.py +237 -0
- memory_arena-0.1.8/memory_arena/strategies/naive_vector.py +164 -0
- memory_arena-0.1.8/memory_arena/strategies/persona_profile.py +139 -0
- memory_arena-0.1.8/memory_arena/strategies/quantum/__init__.py +24 -0
- memory_arena-0.1.8/memory_arena/strategies/quantum/circuits.py +111 -0
- memory_arena-0.1.8/memory_arena/strategies/quantum/qiss.py +299 -0
- memory_arena-0.1.8/memory_arena/strategies/quantum/sqr.py +188 -0
- memory_arena-0.1.8/memory_arena/strategies/quantum/utils.py +106 -0
- memory_arena-0.1.8/memory_arena/strategies/raptor.py +254 -0
- memory_arena-0.1.8/memory_arena/strategies/recency_window.py +80 -0
- memory_arena-0.1.8/memory_arena/strategies/reflection.py +152 -0
- memory_arena-0.1.8/memory_arena/tokenizer.py +22 -0
- memory_arena-0.1.8/memory_arena/viz/__init__.py +0 -0
- memory_arena-0.1.8/pypi-placeholders/memarena/README.md +9 -0
- memory_arena-0.1.8/pypi-placeholders/memarena/pyproject.toml +19 -0
- memory_arena-0.1.8/pypi-placeholders/memory_arena/README.md +9 -0
- memory_arena-0.1.8/pypi-placeholders/memory_arena/pyproject.toml +19 -0
- memory_arena-0.1.8/pypi-placeholders/memoryarena/README.md +9 -0
- memory_arena-0.1.8/pypi-placeholders/memoryarena/pyproject.toml +19 -0
- memory_arena-0.1.8/pyproject.toml +162 -0
- memory_arena-0.1.8/web/README.md +34 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Codebase intelligence (auto-generated)
|
|
2
|
+
.planning/
|
|
3
|
+
|
|
4
|
+
# Python
|
|
5
|
+
__pycache__/
|
|
6
|
+
*.py[cod]
|
|
7
|
+
*.egg-info/
|
|
8
|
+
dist/
|
|
9
|
+
build/
|
|
10
|
+
.eggs/
|
|
11
|
+
*.egg
|
|
12
|
+
|
|
13
|
+
# Virtual environments
|
|
14
|
+
.venv/
|
|
15
|
+
venv/
|
|
16
|
+
env/
|
|
17
|
+
|
|
18
|
+
# IDE
|
|
19
|
+
.vscode/
|
|
20
|
+
.idea/
|
|
21
|
+
*.swp
|
|
22
|
+
*.swo
|
|
23
|
+
|
|
24
|
+
# Environment
|
|
25
|
+
.env
|
|
26
|
+
|
|
27
|
+
# Data stores
|
|
28
|
+
neo4j_data/
|
|
29
|
+
chroma_data/
|
|
30
|
+
|
|
31
|
+
# Node / Frontend
|
|
32
|
+
node_modules/
|
|
33
|
+
.next/
|
|
34
|
+
web/.next/
|
|
35
|
+
web/node_modules/
|
|
36
|
+
|
|
37
|
+
# OS
|
|
38
|
+
.DS_Store
|
|
39
|
+
Thumbs.db
|
|
40
|
+
|
|
41
|
+
# Test / Coverage
|
|
42
|
+
.pytest_cache/
|
|
43
|
+
htmlcov/
|
|
44
|
+
.coverage
|
|
45
|
+
|
|
46
|
+
# Ruff
|
|
47
|
+
.ruff_cache/
|
|
48
|
+
|
|
49
|
+
# Raw datasets (downloaded, not committed)
|
|
50
|
+
datasets/*/raw/*.html
|
|
51
|
+
datasets/*/raw/*.rst
|
|
52
|
+
datasets/*/raw/*.json
|
|
53
|
+
datasets/*/raw/*.txt
|
|
54
|
+
datasets/*/raw/*.bak
|
|
55
|
+
!datasets/*/raw/.gitkeep
|
|
56
|
+
|
|
57
|
+
# Processed data (generated, not committed)
|
|
58
|
+
datasets/*/processed/*.jsonl
|
|
59
|
+
!datasets/*/processed/.gitkeep
|
|
60
|
+
|
|
61
|
+
# Generated Q&A pairs
|
|
62
|
+
datasets/*/qa-pairs/
|
|
63
|
+
|
|
64
|
+
# Benchmark results (user-generated results are not committed)
|
|
65
|
+
results/*.json
|
|
66
|
+
!results/longmemeval-s_*.json
|
|
67
|
+
!results/cross_judge_report.json
|
|
68
|
+
!results/.gitkeep
|
|
69
|
+
results/run_*
|
|
70
|
+
|
|
71
|
+
# Build archive (kb-arena originals kept for reference)
|
|
72
|
+
.build_archive/
|
|
73
|
+
|
|
74
|
+
# Internal project files
|
|
75
|
+
CLAUDE.md
|
|
76
|
+
.internal/
|
|
77
|
+
|
|
78
|
+
# Claude Code
|
|
79
|
+
.claude/
|
|
80
|
+
|
|
81
|
+
# Playwright/ffmpeg temp output (recorder leftovers)
|
|
82
|
+
tmp/
|
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to Memory Arena.
|
|
4
|
+
|
|
5
|
+
## [Unreleased]
|
|
6
|
+
|
|
7
|
+
## [0.1.8] - 2026-06-28 - Level the field: vendor SDKs on the same model, mem0g dropped, full cross-judge
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- **Leveled the vendor SDKs to the harness model where possible.** `mem0`
|
|
12
|
+
(now mem0ai 2.0.2, v2) and `langmem` run their internal fact-extraction on
|
|
13
|
+
Claude Sonnet, the same model as the pure-Python baselines, so the
|
|
14
|
+
leaderboard isolates the memory architecture rather than the model. The
|
|
15
|
+
generator confound the README used to call its "biggest asterisk" is ~3pp
|
|
16
|
+
(mem0), measured directly; the bigger mem0 mover was the v1->v2 OSS
|
|
17
|
+
regression (~16pp). `langmem` *rose* +6pp on Sonnet (26.9% -> 33.0%), so its
|
|
18
|
+
default model was selling it short. `graphiti` (no Anthropic client on
|
|
19
|
+
graphiti-core 0.13) and `cognee` (starlette pin conflict) can't be cleanly
|
|
20
|
+
leveled in one env and stay vendor-default, documented.
|
|
21
|
+
- **Dropped `mem0g` from the leaderboard.** mem0 v2.0.0 removed the OSS graph
|
|
22
|
+
store, so mem0g only runs on the deprecated v1 + gpt-4o-mini. Graph memory is
|
|
23
|
+
covered by `graphiti`; the strategy stays in the repo. The board is now 20.
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
|
|
27
|
+
- **`amem` (A-MEM, NeurIPS 2025) and `hipporag2` (HippoRAG 2, ICML 2025)
|
|
28
|
+
benchmarked** on 3 seeds. `hipporag2` (54.5%) posts the top point estimate on
|
|
29
|
+
the board, a from-scratch pure-Python graph method ahead of every vendor SDK.
|
|
30
|
+
- **19-way cross-judge.** Re-grading 19 of the 20 strategies with GPT-4o yields
|
|
31
|
+
Spearman rho = +0.967 on the ranks (`results/cross_judge_report.json`);
|
|
32
|
+
GPT-4o is more lenient in absolute terms but agrees on order, and also ranks
|
|
33
|
+
every vendor below the pure-Python tier.
|
|
34
|
+
- **Per-strategy wall-clock timeout** in the runner so one hung strategy can't
|
|
35
|
+
block the batch, and a **live cost ticker** in the benchmark progress.
|
|
36
|
+
|
|
37
|
+
### Fixed
|
|
38
|
+
|
|
39
|
+
- **Recall Lab worked only in local dev.** The dashboard's recall-records
|
|
40
|
+
endpoint read a bare `{corpus}_{strategy}.json` the wheel snapshot doesn't
|
|
41
|
+
ship; it now falls back to the seed-0 file. Plus a reconciliation pass that
|
|
42
|
+
corrected every drifted count and number across the README and docs.
|
|
43
|
+
|
|
44
|
+
## [0.1.7] - 2026-06-22 - Quantum rerankers (QISS + SQR) and Graphiti-on-FalkorDB
|
|
45
|
+
|
|
46
|
+
### Added
|
|
47
|
+
|
|
48
|
+
- **`qiss` strategy (Quantum-Inspired Semantic Similarity).** Pure-NumPy
|
|
49
|
+
reranker over `naive_vector`'s Chroma index, zero new dependencies. Reranks
|
|
50
|
+
candidates by quantum-state fidelity `Tr(rho_q rho_d) = |<q|d>|^2 = cos^2`
|
|
51
|
+
over the same OpenAI embeddings, so its single-query ordering equals
|
|
52
|
+
`naive_vector`'s by construction (the unit-tested invariant). On
|
|
53
|
+
LongMemEval-S smoke (16 questions, top_k=5, 3-seed bootstrap): 50.5% accuracy
|
|
54
|
+
(95% CI overlapping the whole top tier, tied with naive_vector's 49.2%),
|
|
55
|
+
recall@5 ~0.85 (matches naive_vector within retrieval noise), ~$0.09. An
|
|
56
|
+
optional multi-query
|
|
57
|
+
superposition mode (off by default) fuses sub-query states into
|
|
58
|
+
`|Q> = a1|q1> + a2|q2> + ...` and scores with interference cross-terms that
|
|
59
|
+
classical rank fusion cannot express.
|
|
60
|
+
- **`sqr` strategy (Simulated Quantum Reranker).** Runs a real SWAP-test
|
|
61
|
+
circuit on the Qiskit Aer simulator (exact statevector by default; shots is
|
|
62
|
+
a config knob). Embeddings are PCA-reduced to `2^n_qubits` dims (16 at the
|
|
63
|
+
default 4 qubits), amplitude-encoded, and compared via the ancilla
|
|
64
|
+
probability `|<q|d>|^2 = 2*P(0) - 1`. On LongMemEval-S smoke: 40.4% accuracy,
|
|
65
|
+
66.7% recall@5, $0.067, 3714ms. The accuracy drop vs `naive_vector` is the
|
|
66
|
+
honest cost of amplitude encoding: squeezing 3072-d embeddings into 16 dims
|
|
67
|
+
keeps only 36% of the variance (see
|
|
68
|
+
`results/longmemeval-s_quantum_diagnostics.json`). Simulated quantum
|
|
69
|
+
machinery buys nothing over the closed-form cosine on this task; the finding
|
|
70
|
+
is the dimensionality-reduction tax, not a quantum advantage. Needs
|
|
71
|
+
`pip install 'memory-arena[quantum]'` (qiskit + qiskit-aer).
|
|
72
|
+
- **Quantum diagnostics** at `results/longmemeval-s_quantum_diagnostics.json`
|
|
73
|
+
via `scripts/quantum_diagnostics.py`: PCA variance-explained vs n_qubits
|
|
74
|
+
(15.3% at 4 dims up to 88.4% at 128 dims) and SWAP-test error vs shots
|
|
75
|
+
(mean abs error 0.0645 at 64 shots down to 0.0057 at 16384). Computed, not
|
|
76
|
+
narrated.
|
|
77
|
+
- **`graphiti_falkor` strategy.** Zep's Graphiti temporal knowledge graph
|
|
78
|
+
running on FalkorDB (a Redis-based, GraphBLAS graph engine) instead of
|
|
79
|
+
Neo4j. It subclasses `graphiti` and swaps only the graph driver, so ingest
|
|
80
|
+
and recall are identical and the engine is the single variable. On
|
|
81
|
+
LongMemEval-S smoke (16 questions, seed 0, top_k=5): 22.5% accuracy, 63.0%
|
|
82
|
+
recall@5, 3223ms recall latency, $0.034 measurable cost. Under the same
|
|
83
|
+
library version (graphiti-core 0.17), Neo4j scores 26.7% / 66.1% recall@5 /
|
|
84
|
+
3054ms vs FalkorDB's 22.5% / 63.0% / 3223ms: statistically tied (16
|
|
85
|
+
questions, single seed, ~14pp CI), with Neo4j marginally ahead on every axis
|
|
86
|
+
and zero ingest failures (FalkorDB's driver hits ~1.2%). FalkorDB's headline
|
|
87
|
+
graph-query latency advantage does not surface end-to-end because the
|
|
88
|
+
answer-generation LLM call dominates recall latency. The published `graphiti`
|
|
89
|
+
row stays on 0.13 for baseline reproducibility, so the table's
|
|
90
|
+
graphiti-vs-falkor delta is version-confounded (0.17 alone lifts Neo4j ~3pp).
|
|
91
|
+
- `amem` and `hipporag2` are now listed in the README strategy tables
|
|
92
|
+
(registered; their benchmarks land in v0.1.8).
|
|
93
|
+
|
|
94
|
+
### Changed
|
|
95
|
+
|
|
96
|
+
- Strategy count is now 21 registered, 19 benchmarked (`amem` and `hipporag2`
|
|
97
|
+
pending). Badges, headline, taxonomy figure (19 of 21 plotted), strategy
|
|
98
|
+
tables, and the dashboard updated.
|
|
99
|
+
|
|
100
|
+
### Findings (retrieval experiments)
|
|
101
|
+
|
|
102
|
+
- `scripts/quantum_experiments.py` runs deterministic, retrieval-level sweeps
|
|
103
|
+
(statevector reranking has no LLM/sampling, so Recall@5 is exact and noise
|
|
104
|
+
free). Two definitive results, written to
|
|
105
|
+
`results/longmemeval-s_quantum_experiments.json` and visualized in
|
|
106
|
+
`docs/quantum_experiments.png` (`scripts/build_quantum_chart.py`):
|
|
107
|
+
- **Quantum interference is inert here.** Coherent superposition fusion equals
|
|
108
|
+
the incoherent mixture in every cell (0.938 == 0.938 overall, 0.812 == 0.812
|
|
109
|
+
on multi-session reasoning) and both stay below single-query cosine (0.953).
|
|
110
|
+
The cross-terms are nonzero but too small to reorder the top-5; dense text
|
|
111
|
+
sub-query embeddings are near-collinear. The qiss multi-query mode stays off
|
|
112
|
+
by default.
|
|
113
|
+
- **sqr's loss is purely the PCA encoding.** Recall@5 climbs 0.75 to 0.90 as
|
|
114
|
+
n_qubits goes 4 to 7 (variance 37% to 84%), approaching cosine's 0.95, so the
|
|
115
|
+
SWAP test is faithful. End-to-end accuracy stays flat (sqr@4 40.4% to sqr@7
|
|
116
|
+
40.9%): more qubits buy bigger circuits for retrieval still at or below
|
|
117
|
+
cosine. No operating point beats the closed-form cosine.
|
|
118
|
+
- **Root cause (`scripts/quantum_headroom.py`, `results/longmemeval-s_quantum_headroom.json`):
|
|
119
|
+
there is no reranker-side fix, quantum or classical.** Quantum fidelity is
|
|
120
|
+
`|<q|d>|^2 = cos^2`, a monotone of cosine, so quantum reranking reproduces
|
|
121
|
+
cosine's exact order by construction. Headroom does exist (multi-session
|
|
122
|
+
reasoning: cosine 0.812 vs pool ceiling 0.938, +12.5pp), but the gold sessions
|
|
123
|
+
cosine ranks low sit low because they phrase the same concept in different
|
|
124
|
+
words, and every embedding-similarity score (cosine, density matrix
|
|
125
|
+
`<q|rho|q>`, centroid) ranks them equally low: all tie at 0.812 there. The
|
|
126
|
+
bottleneck is the embedding's semantic coverage, not the scoring math, so the
|
|
127
|
+
only levers are upstream of similarity (query rewriting, cross-session
|
|
128
|
+
aggregation, graph propagation), none of which is what the quantum methods do.
|
|
129
|
+
- **Compression cost frontier (`scripts/compression_frontier.py`,
|
|
130
|
+
`results/longmemeval-s_compression_frontier.json`, `docs/compression_frontier.png`):
|
|
131
|
+
the quantum encoding is dominated on the one cost axis it theoretically
|
|
132
|
+
claimed.** In a RAG pipeline the similarity computation quantum touches is
|
|
133
|
+
negligible next to LLM tokens and embedding storage / memory bandwidth, so the
|
|
134
|
+
real lever is compression. Ranking turns in the compressed representation
|
|
135
|
+
(store compressed, search compressed): binary quantization holds full Recall@5
|
|
136
|
+
(0.938) at 384 bytes (32x) and 128 bytes (96x, Matryoshka+binary), and 0.922
|
|
137
|
+
at 64 bytes; Matryoshka truncation holds to about 256 dims. The quantum
|
|
138
|
+
encoding (PCA-16 amplitude state, verified rank-identical to the real SWAP
|
|
139
|
+
test) gets 0.766 at 64 bytes, beaten by classical binary_512 (0.922 at the
|
|
140
|
+
same 64 bytes) and even binary_256 (0.849 at half the bytes). Verified that
|
|
141
|
+
Matryoshka truncate+renormalize equals the text-embedding-3-large API
|
|
142
|
+
`dimensions` output (cosine 1.0000).
|
|
143
|
+
- Fixed a latent bug in `qiss._decompose_query`: the cheap classify path made
|
|
144
|
+
the model refuse first-person questions and emit advice instead of search
|
|
145
|
+
queries. Now uses a strict rewriter prompt on the generate model plus a
|
|
146
|
+
refusal filter.
|
|
147
|
+
|
|
148
|
+
### Notes
|
|
149
|
+
|
|
150
|
+
- `qiss` is always available (pure NumPy). `sqr` is gated behind the optional
|
|
151
|
+
`[quantum]` extra and dropped cleanly from the registry when qiskit is
|
|
152
|
+
absent, so the core install and CI stay light.
|
|
153
|
+
- `graphiti_falkor` needs `graphiti-core>=0.17` (first release with the
|
|
154
|
+
FalkorDB driver), which requires `pydantic>=2.11.5` and so cannot coexist
|
|
155
|
+
with the core `pydantic==2.10.4` pin. Install it in its own environment:
|
|
156
|
+
`pip install 'memory-arena[falkordb]'`, then `docker compose up -d falkordb`
|
|
157
|
+
(host port 6381). Intermittent `Failed to parse query parameter 'nodes'`
|
|
158
|
+
warnings from the FalkorDB driver cause a ~1.2% ingest-failure rate.
|
|
159
|
+
|
|
160
|
+
## [0.1.6] - 2026-05-02 - Arena framing, sortable dashboard, live recall lab
|
|
161
|
+
|
|
162
|
+
### Added
|
|
163
|
+
|
|
164
|
+
- **Sortable benchmark dashboard.** Click any column on `/benchmark` to
|
|
165
|
+
re-rank by accuracy, recall@5, cost, or latency. Default sort is
|
|
166
|
+
accuracy descending. Column headers carry hover tooltips defining
|
|
167
|
+
every metric.
|
|
168
|
+
- **Live Recall Lab** at `/recall-lab`: per-question HIT/MISS for every
|
|
169
|
+
strategy, real `supporting_session_ids` against expected, drill-down
|
|
170
|
+
into judge rationale and answer text. Backed by
|
|
171
|
+
`/api/recall-records/{corpus}/{strategy}`.
|
|
172
|
+
- **Hero chart** at `docs/hero.png`, accuracy vs log-cost Pareto with
|
|
173
|
+
95% CI bars, navy/coral/grey palette, inline strategy labels.
|
|
174
|
+
Generated by `scripts/build_hero_chart.py`.
|
|
175
|
+
- **Taxonomy chart** at `docs/taxonomy.png` placing 16 strategies in
|
|
176
|
+
one design space (write-time × representation; tier emphasis via
|
|
177
|
+
shape, color, size, saturation). Shared style module at
|
|
178
|
+
`scripts/_chart_style.py`.
|
|
179
|
+
- **Pairwise significance heatmap** at `docs/pairwise.png` showing
|
|
180
|
+
which strategy gaps clear the 95% bootstrap CI threshold.
|
|
181
|
+
- **3-seed bootstrap CIs** on every metric the README displays (`--seed
|
|
182
|
+
0,1,2`). Aggregated by `scripts/aggregate_bootstrap.py` into
|
|
183
|
+
per-strategy `_summary.json` with mean ± 95% CI half-widths.
|
|
184
|
+
- **Reproducibility metadata** stamped into every result JSON: commit
|
|
185
|
+
SHA, installed package versions for all 16 strategy SDKs + core deps,
|
|
186
|
+
model IDs (Sonnet 4.6 / Haiku 4.5 / Opus 4.7 / text-embedding-3-large),
|
|
187
|
+
host, timestamp, seed.
|
|
188
|
+
- **Ingest-health badge**, any strategy with >50% ingest failure at
|
|
189
|
+
default config gets `status: "config-failed-at-default"`. Headline
|
|
190
|
+
table shows the badge; vendors invited to PR a working default.
|
|
191
|
+
- **`--version` flag** on the CLI.
|
|
192
|
+
- **`--port 0`** auto-picks a free port for `serve` and `demo`.
|
|
193
|
+
- **`--host` flag** opt-in for LAN exposure (with explicit warning).
|
|
194
|
+
- **`memory-arena demo`** opens `/` (the dashboard) directly.
|
|
195
|
+
- **Cross-judge sweep tooling** at `scripts/cross_judge.py` (used to
|
|
196
|
+
produce the v0.1.7 GPT-4o vs Opus 4.7 stability report).
|
|
197
|
+
- **`results/.costs.jsonl`**, append-only ledger so the orchestrator
|
|
198
|
+
can sum cumulative spend across runs.
|
|
199
|
+
- **PyPI placeholders** `memoryarena` and `memarena` claimed as
|
|
200
|
+
redirects to `memory-arena`.
|
|
201
|
+
|
|
202
|
+
### Changed
|
|
203
|
+
|
|
204
|
+
- **Tagline** to the Arena framing: "The vendor-neutral arena for
|
|
205
|
+
agent memory. 16 strategies, one evaluator, full reproducibility."
|
|
206
|
+
- **README** opens with the one-liner, hero chart, three "what
|
|
207
|
+
surprised me" bullets, then "Try it in 10 seconds." Vendor caveat
|
|
208
|
+
follows the chart with a v0.2 invitation framing.
|
|
209
|
+
- **CLI default bind** is `127.0.0.1` for `serve` and `demo`. Override
|
|
210
|
+
via `--host 0.0.0.0` for LAN exposure.
|
|
211
|
+
- **`docker-compose.yml`** ports bound to `127.0.0.1` only.
|
|
212
|
+
- **Mem0 default LLM** is `openai/gpt-4o-mini` (Mem0's documented
|
|
213
|
+
default).
|
|
214
|
+
- **Top_k=5** held constant across all 16 strategies.
|
|
215
|
+
- **Recall@k semantics**, vendors whose data model doesn't carry
|
|
216
|
+
chat-session pointers (LangMem, Cognee, Memori) declare
|
|
217
|
+
`recall_at_k_measurable = False` at the class level; the aggregator
|
|
218
|
+
emits null and the dashboard renders "-".
|
|
219
|
+
- **Embedder** read from `settings.embedding_model` across vendor
|
|
220
|
+
strategies that accept an embedder kwarg, so vendor and pure-Python
|
|
221
|
+
strategies use the same embedding model.
|
|
222
|
+
- **Tenacity** wired into `memory_arena/llm/client.py` retries
|
|
223
|
+
(3 attempts, exponential 1s/2s, per-attempt 60 s timeout, WARNING
|
|
224
|
+
log via `before_sleep`).
|
|
225
|
+
- **`update_precision`** returns `None` when fact_versions is empty;
|
|
226
|
+
the bootstrap aggregator propagates `None` through to the dashboard.
|
|
227
|
+
- **Smoke-loader path** points at `datasets/longmemeval-s/questions/smoke_synthetic/`
|
|
228
|
+
where the synthetic abstention YAML files actually live, so the
|
|
229
|
+
abstention F1 axis loads on smoke runs that ship with the synthetic
|
|
230
|
+
file.
|
|
231
|
+
- **`scripts/robustness.py`** rewritten to call
|
|
232
|
+
`run_memory_benchmark` with the current signature.
|
|
233
|
+
- **Strategy + test counts** reconciled to **16 strategies**, **274
|
|
234
|
+
tests** (`pytest --collect-only -q`) across README, CLAUDE.md,
|
|
235
|
+
STATUS.md.
|
|
236
|
+
- **`SECURITY.md`** dependency-pinning claim refined: most direct deps
|
|
237
|
+
are exact-pinned; vendor SDKs (cognee, langmem, memori) and a few
|
|
238
|
+
large libs (numpy, scikit-learn) use bounded ranges to track
|
|
239
|
+
fast-moving releases.
|
|
240
|
+
- **`SECURITY.md`** rate-limiting claim sharpened; AI prompt-injection
|
|
241
|
+
caveat added for untrusted corpora.
|
|
242
|
+
- **`scripts/ship.sh`** reads version from `pyproject.toml` via
|
|
243
|
+
`tomllib` with `pip show` fallback.
|
|
244
|
+
- **`pyproject.toml`** uses `dynamic = ["version"]` from
|
|
245
|
+
`memory_arena/__init__.py` (single source of truth).
|
|
246
|
+
- **`.github/workflows/publish.yml`** OIDC Trusted Publishing on tag
|
|
247
|
+
push with API-token fallback wired through workflow-level
|
|
248
|
+
`env.PYPI_API_TOKEN`.
|
|
249
|
+
- **`MEM_ARENA_NEO4J_PASSWORD`** is required (no default fallback).
|
|
250
|
+
- **`memori.py`** raises `ImportError` with an install hint instead of
|
|
251
|
+
subprocess-pip-installing `psycopg` at runtime.
|
|
252
|
+
- **Cognee extras** pin `s3fs>=2024.0.0` and `fsspec>=2024.0.0`.
|
|
253
|
+
|
|
254
|
+
### Removed
|
|
255
|
+
|
|
256
|
+
- **Letta** strategy deferred to vendor-pins; the slow per-step
|
|
257
|
+
context loop made benchmark runs costly without a way to budget
|
|
258
|
+
them.
|
|
259
|
+
- **ELO Arena** route hidden from the nav and redirected to
|
|
260
|
+
`/benchmark` until the real implementation lands in v0.2.
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
## [0.1.4] - 2026-04-30 - Karpathy's LLM Wiki (17th strategy)
|
|
264
|
+
|
|
265
|
+
### Added
|
|
266
|
+
- **karpathy_llm_wiki** strategy implementing [Karpathy's three-layer pattern](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f). Raw chat sessions stay immutable; the LLM maintains a separate wiki of markdown entity pages cross-linked via `[[wikilinks]]` and citing sources via `[session=<id>]` markers. Three workflows are all implemented:
|
|
267
|
+
- **Ingest**, one LLM call per session emits a JSON array of `create` / `append` page ops.
|
|
268
|
+
- **Query**, two-stage recall: Haiku selects pages from `index.md` + recent log, Sonnet synthesizes the answer using only the loaded pages.
|
|
269
|
+
- **Lint**, every 10 ingested sessions, scan the 30 largest pages and emit `rewrite` / `merge` ops to dedupe entities and resolve contradictions when the user changes their mind.
|
|
270
|
+
- New `KarpathyLlmWikiStrategy` registered as the 17th strategy. Always-available (no vendor SDK).
|
|
271
|
+
|
|
272
|
+
### Real benchmark number
|
|
273
|
+
|
|
274
|
+
| Strategy | Accuracy | Recall@k | Latency | Cost | What it does, in plain English |
|
|
275
|
+
| ------------------- | -------- | -------- | -------- | -------- | --------------------------------------------------------------------------------------------- |
|
|
276
|
+
| karpathy_llm_wiki | 26.13% | 57.81% | 3953ms | $1.270 | LLM maintains a wiki of entity pages with cross-links and citations. Periodic lint pass merges duplicates and resolves contradictions. |
|
|
277
|
+
|
|
278
|
+
Lands 8th of 17 between bm25 (27.13%) and full_context (25.50%). Strong on multi_session_reasoning (51%) where cross-linked pages help; weaker on information_extraction (21%) where naive_vector still wins. v0.2 ingest-prompt tuning should close that gap.
|
|
279
|
+
|
|
280
|
+
### Frontend
|
|
281
|
+
|
|
282
|
+
- `web/lib/api.ts` STRATEGIES extended to 17 (added karpathy_llm_wiki with its label, color, and description).
|
|
283
|
+
- Home page heading now reads "The 17 strategies"; hero copy and "How it works" rewritten to mention Karpathy's wiki.
|
|
284
|
+
- Layout meta description and arena leaderboard updated to 17.
|
|
285
|
+
|
|
286
|
+
## [0.1.3] - 2026-04-30 - 16 strategies, redesigned benchmark dashboard
|
|
287
|
+
|
|
288
|
+
### Added
|
|
289
|
+
- Nine new strategies, all real-benchmarked end-to-end on LongMemEval-S:
|
|
290
|
+
- `bm25`, pure-Python lexical baseline using rank-bm25.
|
|
291
|
+
- `hybrid_rrf`, Reciprocal Rank Fusion of vector + BM25 rankings (k=60).
|
|
292
|
+
- `hyde`, Hypothetical Document Embeddings: LLM writes a plausible answer first, embeds that for retrieval.
|
|
293
|
+
- `persona_profile`, builds a JSON profile of the user via Haiku once, then stuffs it as system context for every recall.
|
|
294
|
+
- `reflection`, generative-agents pattern: writes synthetic LLM-authored summaries every N sessions and indexes them alongside raw turns.
|
|
295
|
+
- `raptor`, hierarchical k-means clustering with LLM cluster summaries (Sarthi et al. 2024).
|
|
296
|
+
- `cognee`, open-source knowledge-graph memory with `add` / `cognify` / `search(GRAPH_COMPLETION)`.
|
|
297
|
+
- `langmem`, LangGraph InMemoryStore with `create_memory_store_manager`.
|
|
298
|
+
- `memori`, SQL-native agent memory using Memori 3.x's `enqueue` / `wait` augmentation pipeline.
|
|
299
|
+
- Benchmark dashboard is now sortable by accuracy / recall / latency / cost / name. Default sort is accuracy descending. Adds a Latency column.
|
|
300
|
+
- "Memory-specific axes" section shows update precision / temporal correctness / abstention F1 with the per-category question count in parentheses, so a strategy that did 0 abstention questions renders "-" rather than a misleading default.
|
|
301
|
+
|
|
302
|
+
### Changed
|
|
303
|
+
- Per-category metrics (`update_precision`, `temporal_correctness`, `abstention_f1`) now return `null` from the benchmark runner when no question of that category was evaluated, instead of defaulting to 1.0. The dashboard renders "-" for null. Also adds `update_n` / `temporal_n` / `abstention_n` counts and an `accuracy_by_category` breakdown to every result JSON.
|
|
304
|
+
- Cognee strategy force-sets `LLM_API_KEY` via `cognee.config.set_llm_api_key(...)` plus pins embedding dimensions to 1536 (the max for `text-embedding-3-small`; cognee defaults to 3072).
|
|
305
|
+
- Memori strategy uses Memori 3.x's `Memori.augmentation.enqueue(AugmentationInput(...))` and `recall(query, limit=k)` (the 2.x `process_user_message` / `top_k=` APIs were removed).
|
|
306
|
+
- Reflection / persona_profile / hyde each prefix their inner ChromaDB collection with the strategy name to avoid collection collisions when running concurrently with `naive_vector`.
|
|
307
|
+
- Runner's end-of-run print line tolerates `None` for `abstention_f1` (renders "-") so strategies with zero abstention questions don't crash the runner.
|
|
308
|
+
|
|
309
|
+
### Real benchmark numbers (all 16 strategies, LongMemEval-S smoke subset)
|
|
310
|
+
|
|
311
|
+
| Strategy | Accuracy | Recall@k | Latency | Cost | What it does, in plain English |
|
|
312
|
+
| --------------- | -------- | -------- | -------- | -------- | --------------------------------------------------------------------------------------------- |
|
|
313
|
+
| reflection | 44.12% | 87.50% | 7579ms | $0.488 | Periodically writes journal-style summaries of recent chats, searches both summaries and raw turns. |
|
|
314
|
+
| persona_profile | 43.38% | 89.06% | 6841ms | $0.200 | Builds a one-page bio of the user up front, pastes it into every answer. |
|
|
315
|
+
| naive_vector | 39.63% | 89.06% | 3548ms | $0.087 | Stores every message as a meaning fingerprint, pulls the closest matches by similarity. |
|
|
316
|
+
| raptor | 36.40% | 88.33% | 3461ms | $0.107 | Clusters similar messages into a hierarchy and summarizes each level, like a table of contents. |
|
|
317
|
+
| hybrid_rrf | 35.13% | 80.73% | 16737ms | $0.711 | Runs meaning-search and keyword-search side by side, blends the rankings. |
|
|
318
|
+
| hyde | 31.44% | 76.88% | 11815ms | $0.182 | Guesses an answer first, then searches for messages that look like that guess. |
|
|
319
|
+
| bm25 | 27.13% | 79.17% | 10499ms | $0.090 | Old-school keyword search, what Google did before vectors. |
|
|
320
|
+
| full_context | 25.50% | 8.33% | 8551ms | $5.263 | Pastes the entire chat history into every prompt. Expensive; forgets nothing until overflow. |
|
|
321
|
+
| letta | 19.00% | 6.25% | 13049ms | $0.000 | Agent that edits its own scratchpad of facts after every user message. |
|
|
322
|
+
| langmem | 18.13% | 0.00% | 2950ms | $0.044 | LangChain's memory store: extracts facts as they happen, recalls by similarity. |
|
|
323
|
+
| graphiti | 15.75% | 0.00% | 3745ms | $0.032 | Time-aware knowledge graph: who said what, about whom, and when. |
|
|
324
|
+
| recency_window | 5.75% | 6.25% | 5284ms | $0.318 | Only remembers the last 20 messages, the "chatbot with no memory" baseline. |
|
|
325
|
+
| mem0g | 2.13% | 0.00% | 3177ms | $0.011 | Mem0 plus a Neo4j graph linking facts to entities and to each other. |
|
|
326
|
+
| mem0 | 1.38% | 0.00% | 2558ms | $0.010 | Extracts standalone facts ("user lives in Tokyo") from chats and stores them. |
|
|
327
|
+
| cognee | 1.00% | 0.00% | 2736ms | $0.014 | Builds a knowledge graph from the chat, answers via the graph as context. |
|
|
328
|
+
| memori | 0.88% | 0.00% | 2214ms | $0.013 | Stores extracted facts in Postgres for SQL-native recall. |
|
|
329
|
+
|
|
330
|
+
### Caveats
|
|
331
|
+
- `memori` runs but Memori 3.x routes its augmentation runtime through a cloud quota service that 429s anonymous IPs after a few requests. Set `MEMORI_API_KEY` for full throughput. Without it the benchmark completes but augmentation is disabled and accuracy drops near zero.
|
|
332
|
+
- `full_context` hit the cost cap mid-run (12/16 questions evaluated).
|
|
333
|
+
|
|
334
|
+
## [0.1.2] - 2026-04-29 - All 7 strategies real-benchmarked end-to-end
|
|
335
|
+
|
|
336
|
+
### Added
|
|
337
|
+
- Mem0g, Letta, and Graphiti now run end-to-end on the LongMemEval-S subset and have real result JSON in `results/`. The dashboard renders all 7 rows.
|
|
338
|
+
- `docker/postgres-init.sql` enables the pgvector extension on first DB initialization so Letta migrates cleanly.
|
|
339
|
+
- `MEM_ARENA_POSTGRES_HOST_PORT` (default 5433) and `MEM_ARENA_LETTA_HOST_PORT` (default 8283) env knobs let Memory Arena coexist with other local services.
|
|
340
|
+
|
|
341
|
+
### Changed
|
|
342
|
+
- Graphiti strategy now chunks each session into 2-turn episodes and instantiates the underlying OpenAIClient with `model=gpt-4o, max_tokens=16384` so entity extraction does not hit the default 8192-token output cap.
|
|
343
|
+
- Letta strategy uses the `api_key=` keyword (the SDK dropped `token=`) and the `openai/gpt-4o-mini` model with `openai/text-embedding-3-small` embedding (the cloud-only `letta/letta-free` placeholder returns HTTP 401 on OSS deployments).
|
|
344
|
+
- Postgres host port moved from 5432 to 5433 to avoid the common host-Postgres collision; the docker network still uses `postgres:5432` internally so Letta connects without changes.
|
|
345
|
+
- Benchmark runner is robust to partial failures: strategies that crash in setup write a result JSON with default-zero metrics so the dashboard renders all 7 rows uniformly.
|
|
346
|
+
|
|
347
|
+
### Real benchmark numbers (all 7 strategies, vendor defaults)
|
|
348
|
+
|
|
349
|
+
| Strategy | Accuracy | Recall@k | Cost |
|
|
350
|
+
| --------------- | -------- | -------- | -------- |
|
|
351
|
+
| naive_vector | 39.63% | 89.06% | $0.087 |
|
|
352
|
+
| full_context | 25.50% | 8.33% | $5.263 |
|
|
353
|
+
| letta | 19.00% | 6.25% | $0.000 |
|
|
354
|
+
| graphiti | 15.75% | 0.00% | $0.032 |
|
|
355
|
+
| recency_window | 5.75% | 6.25% | $0.318 |
|
|
356
|
+
| mem0g | 2.13% | 0.00% | $0.011 |
|
|
357
|
+
| mem0 | 1.38% | 0.00% | $0.010 |
|
|
358
|
+
|
|
359
|
+
### Documented
|
|
360
|
+
- `docs/vendor-pins.md` updated with: graphiti chunked-episode + 16K cap, Letta SDK `token` -> `api_key` rename, `letta/letta-free` is cloud-only, `mem0g` needs `langchain-neo4j`, pgvector init script, host Postgres collision workaround.
|
|
361
|
+
|
|
362
|
+
## [0.1.1] - 2026-04-29 - Real benchmark + demo assets
|
|
363
|
+
|
|
364
|
+
### Added
|
|
365
|
+
- Real benchmark execution against LongMemEval-S subset (16 questions, 82 sessions). Per-strategy result JSON committed in `results/longmemeval-s_*.json`.
|
|
366
|
+
- Real screenshots in `docs/screenshot-{home,benchmark,recall-lab,arena}.png` captured via agent-browser against the live FastAPI dashboard.
|
|
367
|
+
- Real terminal demo GIF in `docs/demo.gif` (212KB, 29s) recorded with vhs. Shows actual `memory-arena health`, ingested-corpus stats, and per-strategy summary numbers from the result JSON.
|
|
368
|
+
- New `/api/recall-records/{corpus}/{strategy}` endpoint for the Recall Lab dashboard page.
|
|
369
|
+
- `docs/demo_summary.py` helper that prints headline numbers from a strategy's result JSON.
|
|
370
|
+
|
|
371
|
+
### Changed
|
|
372
|
+
- `LongMemEvalLoader` coerces upstream integer answers to strings (Pydantic v2 strictness).
|
|
373
|
+
- Anthropic provider auto-omits `temperature` for claude-4-6+ models. Newer Anthropic models reject the parameter.
|
|
374
|
+
- `/api/benchmark/{corpus}` returns a flat row projection the dashboard expects (strategy, accuracy, recall@k, costs, latency).
|
|
375
|
+
- The synthetic smoke YAML corpus moved to `datasets/longmemeval-s/questions/smoke_synthetic/` so the runner can fall through to the real `processed/questions.jsonl` produced by `ingest-sessions`.
|
|
376
|
+
|
|
377
|
+
### Documented
|
|
378
|
+
- `docs/vendor-pins.md` records two known issues:
|
|
379
|
+
- graphiti-core 0.13.0 hits OpenAI's 8192-token output cap during entity extraction on full LongMemEval haystack episodes (each ~6-8 long turns).
|
|
380
|
+
- claude-sonnet-4-6 / opus-4-7 reject the temperature parameter; the provider now skips it for these IDs.
|
|
381
|
+
|
|
382
|
+
### Real benchmark numbers (run_id 39f530f5 / 8fe157a7)
|
|
383
|
+
|
|
384
|
+
| Strategy | Accuracy | Recall@k | Cost | Notes |
|
|
385
|
+
| --------------- | -------- | -------- | ------- | -------------------------------------------------- |
|
|
386
|
+
| naive_vector | 39.63% | 89.06% | $0.087 | Best baseline. ChromaDB + text-embedding-3-large. |
|
|
387
|
+
| full_context | 25.50% | 8.33% | $5.263 | Hit cost cap mid-run (12/16 questions evaluated). |
|
|
388
|
+
| recency_window | 5.75% | 6.25% | $0.318 | Last 20 turns. Limited recall as expected. |
|
|
389
|
+
| mem0 | 1.38% | 0.00% | $0.010 | Vendor default config. v0.2 will add tuned mode. |
|
|
390
|
+
|
|
391
|
+
Tests: 267 pass. Ruff: clean. Format: clean.
|
|
392
|
+
|
|
393
|
+
## [0.1.0] - 2026-04-29 - Initial scaffold
|
|
394
|
+
|
|
395
|
+
### Added
|
|
396
|
+
- Memory Arena scaffolded from the kb-arena codebase as a structural template.
|
|
397
|
+
- 7 memory strategies subclassing a fresh `MemoryStrategy` ABC with `setup / ingest_session / recall / teardown` lifecycle:
|
|
398
|
+
- `full_context`, `recency_window`, `naive_vector` (no extra dependencies)
|
|
399
|
+
- `mem0`, `mem0g`, `letta`, `graphiti` (vendor SDKs in optional-extras; degrade gracefully when missing)
|
|
400
|
+
- 7-axis evaluator: structural, sources, judge, memo, plus three memory-specific axes (temporal correctness, update precision, abstention F1).
|
|
401
|
+
- `LongMemEvalLoader` for the upstream JSON corpus from HuggingFace.
|
|
402
|
+
- Session-level and turn-level recall metrics: `Recall@k`, `Hit@k`, `Precision@k`, `MRR`, `nDCG@k`.
|
|
403
|
+
- Benchmark runner with run-id namespace isolation, sequential per-strategy ingest, parallel across strategies, cost cap.
|
|
404
|
+
- Recall Lab - retrieval-only loop, ~10x cheaper than the full benchmark.
|
|
405
|
+
- Typer CLI: `init-corpus`, `download-longmemeval`, `ingest-sessions`, `build-memory`, `benchmark`, `recall-lab`, `report`, `serve`, `arena`, `demo`, `health`.
|
|
406
|
+
- FastAPI dashboard server mounting the bundled Next.js static export.
|
|
407
|
+
- Next.js 14 + Tailwind dashboard with Home, Benchmark, Recall Lab, ELO Arena pages.
|
|
408
|
+
- Docker compose with Neo4j (always-on), Postgres-pgvector (always-on), Letta (profile=letta), api+web (profile=full).
|
|
409
|
+
- `cypher/memory_schema.cypher` - universal memory graph schema (User / Session / Turn / Fact / Entity + temporal edges).
|
|
410
|
+
- 267 tests covering schema, loaders, strategies, evaluator, recall metrics, runner, recall_lab, chatbot API, CLI, settings, exceptions, and the synthetic smoke YAML files.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Xavier Puspus
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|