Skip to content

bench(eval): LongMemEval-S + V2 harness — recall@5 0.970, MRR 0.894 on full public S - #71

Merged
mustafa-bharmal-shipveho merged 1 commit into
mainfrom
phase-1/benchmark-harness
Sep 24, 2026
Merged

mustafa-bharmal-shipveho merged 1 commit into
mainfrom
phase-1/benchmark-harness

Conversation

@mustafa-bharmal-shipveho

Copy link
Copy Markdown
Owner

Phase 1 — LongMemEval benchmark harness + first full public-benchmark numbers

What

Phase 1 of the benchmark roadmap: the auto-recall A/B harness now runs the real public benchmarks end-to-end, and this PR ships the first full-run numbers.

  • LongMemEval-S loader (eval/longmemeval_convert.py): official v1 JSON → native {corpus, questions}; per-question docs restrict retrieval to that question's own haystack (no cross-contamination).
  • LongMemEval-V2 loader: directory-root format (questions.jsonl / trajectories.jsonl / haystacks) with _trajectory_body flattening goal/outcome/actions/thoughts/accessibility-trees.
  • eval/bench_recall_ab.py: --shard i/n for resumable runs, pure compute_rank_row/aggregate_metrics, --write-results, HaluMem-style stale-ahead metrics for contradiction-labeled sets.
  • tests/test_bench_harness.py: 12 regression tests, including the isolation bug class (a question's ranking must never see another question's docs).
  • eval/bench_dataset_contradictions.json: 14-question contradiction-labeled set (Phase 2's stale-metric validation input).

Results (full runs, this machine, shipped config)

dataset recall@1 recall@3 recall@5 MRR answer-cov@5
LongMemEval-S (500q / 23,854 sessions) 0.836 0.954 0.970 0.894 0.466 (0.896 groundable)
LongMemEval-V2 small (451q, coverage-only) — — — — 0.421

The raw coverage number carries a documented caveat: LongMemEval answers are often abstractions ("February 14th") appearing verbatim in no session body (260/500 groundable). Among groundable questions, top-5 context contains the answer 89.6% of the time. Condition A (empty brain) is 0.000 by construction.

Runtime: ~4 h for the S run on an M4 Pro (embedding 23.8k sessions dominates).

Test plan

  • pytest tests/ -q -m "not embeddings and not machine" — 2359 passed, 2 skipped on this branch (12 new)
  • Full S + V2 runs produce the numbers above (JSON results in eval/data/, not committed — regenerable)

Out of scope (later phases)

Phase 2 (temporal validity + supersession) builds on the contradiction dataset here and is already developed on phase-2/temporal-supersession — merge this first.

…94; groundable-coverage 0.896

- Full public LongMemEval-S (500q / 23.8k sessions) through the shipped hybrid
  retriever: recall@1 0.836, recall@5 0.970, MRR 0.894. Raw answer-coverage@5
  0.466 with the abstraction caveat documented (0.896 among the 260 questions
  whose answer text exists verbatim in the corpus).
- LongMemEval-V2 small: coverage-only floor 0.421 (no supports labels shipped).
- V2 loader (convert_v2), per-question haystack isolation regression tests,
  contradiction-labeled dataset for Phase 2 stale-metric validation.
@mustafa-bharmal-shipveho
mustafa-bharmal-shipveho merged commit 6342ed8 into main Sep 24, 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.

1 participant