bench: add benchmark runners, results docs, and test suite

Benchmarks: LongMemEval, LoCoMo, ConvoMem, MemBench runners with
methodology docs and hybrid retrieval analysis.

Tests: config, miner, convo_miner, normalize — 9 tests, all passing.
This commit is contained in:
bensig
2026-04-04 18:33:42 -07:00
parent 068dbd9a7b
commit 0f8fa8c7d5
11 changed files with 6815 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
import os
import tempfile
import shutil
import chromadb
from mempalace.convo_miner import mine_convos
def test_convo_mining():
tmpdir = tempfile.mkdtemp()
with open(os.path.join(tmpdir, "chat.txt"), "w") as f:
f.write(
"> What is memory?\nMemory is persistence.\n\n> Why does it matter?\nIt enables continuity.\n\n> How do we build it?\nWith structured storage.\n"
)
palace_path = os.path.join(tmpdir, "palace")
mine_convos(tmpdir, palace_path, wing="test_convos")
client = chromadb.PersistentClient(path=palace_path)
col = client.get_collection("mempalace_drawers")
assert col.count() >= 2
# Verify search works
results = col.query(query_texts=["memory persistence"], n_results=1)
assert len(results["documents"][0]) > 0
shutil.rmtree(tmpdir)