Skip to content

Add Loom memory-service integration for LongMemEval#2

Open
zlareb1 wants to merge 3 commits into
mainfrom
add-loom-integration
Open

Add Loom memory-service integration for LongMemEval#2
zlareb1 wants to merge 3 commits into
mainfrom
add-loom-integration

Conversation

@zlareb1

@zlareb1 zlareb1 commented Jun 5, 2026

Copy link
Copy Markdown
Member

What

Adds loom/ so a Loom memory service can be benchmarked on LongMemEval.

stage who does it
indexing + retrieval Loom (loom/run_loom.py)
reading official src/generation/run_generation.py prompt (replicated)
judging official src/evaluation/evaluate_qa.py (run unchanged)

run_loom.py ingests each question haystack into Loom (one memory.set_from_messages per session, concurrent), retrieves via memory.search, generates an answer with the official reader prompt, and writes a hypotheses JSONL to grade with the existing judge. It also reports evidence-session recall@k.

The official src/retrieval/run_retrieval.py targets in-process retrievers (BM25/Contriever/Stella/GTE) over a flat corpus and has no hook for an external memory service, which is why this adapter exists (the same pattern other memory products use to plug into LongMemEval).

Usage

python loom/run_loom.py --base-url http://127.0.0.1:7777 --out loom/loom_hyp.jsonl --limit 40
python src/evaluation/evaluate_qa.py gpt-4o loom/loom_hyp.jsonl data/longmemeval_s_cleaned.json

Validation

Smoke-tested end-to-end against a live Loom server (ingest -> retrieve -> official reader -> official judge runs clean). Details in loom/README.md.

🤖 Generated with Claude Code

zlareb1 and others added 3 commits June 5, 2026 16:23
Loom (https://github.com/ClickHouse/loom) is a ClickHouse-backed memory
service. This adds loom/run_loom.py, which plugs Loom in at the INDEXING +
RETRIEVAL stages (ingest each haystack session via memory.set_from_messages,
retrieve via memory.search) and reuses the official reader prompt + the
official src/evaluation/evaluate_qa.py judge. It writes a hypotheses JSONL to
grade with the existing judge, and reports evidence-session recall@k.

The official src/retrieval/run_retrieval.py targets in-process retrievers
(BM25/Contriever/Stella/GTE) over a flat corpus and has no hook for an
external memory service, which is why this adapter exists. Includes README
+ requirements; validated end-to-end against a live Loom server.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The dataset is category-ordered, so a bare --limit samples a single question
type. --shuffle (deterministic via --seed, default 42) gives a mixed sample
for quick partial runs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…nostics

Applied before --shuffle/--limit so a single LongMemEval category can be run
complete (e.g. all single-session-assistant) for non-noisy per-category recall.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant