feat(retrieval): LongMemEval lever ablation foundation#284
Merged
Conversation
- add eval/longmemeval/levers.ts: fixed LEVER_ORDER, resolveEnabledLevers flag resolution, and createCostReport per-lever cost accumulator - thread optional levers + CostReport through runEval; surface enabled levers and per-lever embed/llm/latency on EvalSummary and formatSummary - resolve LONGMEMEVAL_* flags in the run CLI and print active levers - baseline preserved byte-for-byte when no flags are set
KIvanow
approved these changes
Jul 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the LongMemEval recall→QA epic (project board item 205255004). Stack 1/4 — base
master.Foundation the per-lever phases plug into:
eval/longmemeval/levers.ts: fixedLEVER_ORDER,resolveEnabledLeversflag resolution,createCostReportper-lever embed/llm/latency accumulatorlevers+CostReportthroughrunEval; surface them onEvalSummary/formatSummaryLONGMEMEVAL_*flags in the run CLIBaseline preserved byte-for-byte when no flags set. 6 tests; retrieval suite green.
Merge bottom-up; PRs 2–4 stack on this.
Note
Low Risk
Eval-only harness scaffolding; no production retrieval logic is altered and default runs remain baseline.
Overview
Adds LongMemEval ablation plumbing so later PRs can toggle retrieval levers via env flags without changing baseline behavior when none are set.
New
eval/longmemeval/levers.tsdefines canonicalLEVER_ORDER, maps each lever toLONGMEMEVAL_*env flags (resolveEnabledLevers), and providescreateCostReportto accumulate per-lever embed/LLM/latency totals. The eval CLI resolves flags, logs the enabled lever chain, and passesleverspluscostReportintorunEval.EvalSummaryandformatSummarynow include enabled levers and cost rows when any levers are on.runEvalaccepts the new config and echoes levers/costs on the summary; retrieval behavior is unchanged until follow-up stacks wire levers into the query path. Six vitest cases cover flag ordering, cost aggregation, default inertness, and summary formatting.Reviewed by Cursor Bugbot for commit d69774e. Bugbot is set up for automated code reviews on this repo. Configure here.