Skip to content

feat(benchmark): LongMemEval end-to-end answer grading and facts corpus - #93

Open
corespeed-agent-ensemble[bot] wants to merge 1 commit into
mainfrom
feat/longmemeval-e2e-benchmark
Open

feat(benchmark): LongMemEval end-to-end answer grading and facts corpus#93
corespeed-agent-ensemble[bot] wants to merge 1 commit into
mainfrom
feat/longmemeval-e2e-benchmark

Conversation

@corespeed-agent-ensemble

Copy link
Copy Markdown
Contributor

What

Two new benchmark-only runners over the existing indexed LongMemEval corpus, plus their bun run entries and AGENTS.md documentation:

  • benchmark:longmemeval:e2e — end-to-end answer accuracy: hybrid retrieval under RLS → configured reader over retrieved session Memories → the official upstream QA judge prompts reproduced verbatim (pinned xiaowu0162/LongMemEval@d6dc8b50, temperature 0, 'yes' in lower() labeling, _abs abstention template). Never re-embeds documents; corpus identity validated by workspace/key/owner/scope counts plus active-embedding-space completeness. Reader transports: google/openai/vllm/ollama + a benchmark-only claude-cli print-mode transport (same pattern as benchmark:retrieval-policy --runner claude). Flags: --type-instructions, --evidence-order chronological, --evidence-source passage, --corpus-suffix, --resume (retries provider-failed cases rather than freezing them into the score).
  • benchmark:longmemeval:extract-facts — builds the benchmark-only {questionId}#facts corpus: one compact fact-sheet Memory per indexed session (same benchmarkKey, Bob tripwires replicated, embeddings drained through leased maintenance), original-content passthrough tagged extractorFallback on provider content-policy blocks. Evaluator-side profile in the MemoryAgentBench structured-assembly tradition — not product consolidation.

Measured (LongMemEval-S, 500 questions, gemini-embedding-2 @1536)

  • 94.2 overall (flash-class reader, top-10 full sessions, type-aware reader instructions; judge official)
  • 87.8 at ~2.8k reader tokens/question on the facts corpus (~11× cheaper; loss concentrates in assistant-side detail and cross-session enumeration)
  • Retrieval R@10 0.9898; isolation 0/500 tripwire leaks

Gotchas encoded in AGENTS.md

  • Gemini interactions-API thinking exhausts small output budgets (readers need LORE_BENCHMARK_READER_MAX_OUTPUT_TOKENS=8192)
  • Pro-tier Gemini models reject thinkingBudget: 0; the judge falls back to thinking mode (also on empty grades)

Checks

design:check ✅ · lint ✅ · typecheck ✅ · test ✅ (XDG_CONFIG_HOME=/tmp/empty for the documented code-index global-gitignore gotcha; failure reproduces on main) · build ✅ · packages:smoke ✅

🤖 Generated with Claude Code

Add benchmark:longmemeval:e2e, an answer-accuracy runner over an
already-indexed LongMemEval corpus: hybrid retrieval under RLS, a
configured reader over retrieved session Memories, and the official
upstream QA judge prompts reproduced verbatim (pinned to
xiaowu0162/LongMemEval@d6dc8b50, temperature 0, yes/no labeling,
abstention template for _abs questions). Corpus identity is validated
by workspace/key/owner/scope counts plus active-embedding-space
completeness; documents are never re-embedded. Readers cover
google/openai/vllm/ollama plus a benchmark-only claude-cli transport;
the Google judge falls back to thinking mode when a model rejects
thinkingBudget: 0 or returns an empty grade. Flags: --type-instructions
(type-aware reader system prompts; judge stays official),
--evidence-order chronological, --evidence-source passage,
--corpus-suffix, and --resume that retries provider-failed cases
instead of freezing them into the score.

Add benchmark:longmemeval:extract-facts, the benchmark-only
{questionId}#facts corpus builder: an extractor distills each indexed
session Memory into one compact fact-sheet Memory (same benchmarkKey,
tripwires replicated, embeddings drained through leased maintenance),
with original-content passthrough tagged extractorFallback on provider
content-policy blocks. Evaluator-side profile in the MemoryAgentBench
structured-assembly tradition; Lore v1 still excludes automatic
consolidation.

Measured on LongMemEval-S (500 questions, gemini-embedding-2 @1536):
94.2 overall with a flash-class reader at top-10 full sessions, 87.8 at
~2.8k reader tokens per question on the facts corpus, retrieval R@10
0.9898, isolation 0/500 leaks.

Co-Authored-By: Claude Fable 5 <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.

0 participants