Skip to content

fix(benchmark): disable score threshold in LongMemEval harness (#995) - #996

Merged
ajianaz merged 1 commit into
developfrom
fix/995-threshold-benchmark
Aug 11, 2026
Merged

ajianaz merged 1 commit into
developfrom
fix/995-threshold-benchmark

Conversation

@ajianaz

@ajianaz ajianaz commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

What

Fix 8/500 false negatives in LongMemEval Oracle benchmark caused by CLI default score threshold filtering relevant results.

Why

The LongMemEval harness calls uteke recall without --min, which falls back to the CLI default min_score = 0.3 (from [recall] config). Relevant evidence sessions scoring between 0.30–0.40 were silently filtered out, causing Recall@5 = 0.0 for 8 questions that should have had hits.

Root cause: threshold defaults differ across interfaces — CLI defaults to 0.3 (UX feature for production), but HTTP API and MCP both default to 0.0. The benchmark harness uses the CLI, so it inherited the stricter threshold.

Impact: 8 misses → Recall@5 should improve from 98.4% → ~100% for Oracle subset.

Changes

  1. benchmarks/longmemeval/run_eval.py — Add --min 0.0 to recall command. Benchmarks need to evaluate raw retrieval ranking quality without UX threshold filtering. Every other benchmark system (Mem0, Zep, paper baselines) evaluates raw ranking.

  2. docs/configuration.md — Added callout box documenting the threshold chain inconsistency across CLI (0.3) / API (0.0) / MCP (0.0). Marked min_score settings as "CLI only" in the table.

  3. docs/api-reference.md — Clarified min_score default for HTTP API (0.0, no filtering) and relationship with strict flag.

Testing

  • cargo fmt --all — ✅ clean (no Rust changes)
  • cargo clippy --workspace --all-targets -- -D warnings — ✅ N/A (docs + Python only)
  • cargo test --workspace — ✅ N/A (docs + Python only)
  • Cora pre-commit review ✅ (no issues found)
  • Manual verification: recall --min 0.0 returns score 0.40 results that default threshold filters ✅

Checklist

  • Branch from develop
  • Conventional commit format
  • No secrets committed
  • One logical change per PR (benchmark fix + threshold documentation)

@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

Add --min 0.0 to recall command to evaluate raw retrieval ranking
without CLI default threshold (0.3) filtering relevant results.

Also document threshold chain inconsistency:
- CLI default: 0.3 (from config [recall] min_score)
- HTTP API default: 0.0 (DEFAULT_MIN_SCORE constant)
- MCP default: 0.0

This caused 8/500 false negatives in Oracle benchmark because
relevant sessions scoring 0.30-0.40 were silently filtered.
@ajianaz
ajianaz force-pushed the fix/995-threshold-benchmark branch from e99aa73 to f7e7d28 Compare August 11, 2026 07:21
@ajianaz
ajianaz merged commit c87a73b into develop Aug 11, 2026
13 checks passed
ajianaz added a commit that referenced this pull request Aug 11, 2026
Version bump 0.13.1 → 0.13.2 + CHANGELOG.

Changes since v0.13.1:
- feat: update check (CLI, MCP, HTTP) (#990)
- fix: NULL embeddings crash vector index (#992, #993)
- fix: absolute URL in update check redirect (#994)
- fix: LongMemEval benchmark threshold false negatives (#995, #996)
- chore: branding refresh (#991)

Co-authored-by: ajianaz <[email protected]>
ajianaz added a commit that referenced this pull request Aug 13, 2026
…#996)

Add --min 0.0 to recall command to evaluate raw retrieval ranking
without CLI default threshold (0.3) filtering relevant results.

Also document threshold chain inconsistency:
- CLI default: 0.3 (from config [recall] min_score)
- HTTP API default: 0.0 (DEFAULT_MIN_SCORE constant)
- MCP default: 0.0

This caused 8/500 false negatives in Oracle benchmark because
relevant sessions scoring 0.30-0.40 were silently filtered.

Co-authored-by: ajianaz <[email protected]>
ajianaz added a commit that referenced this pull request Aug 13, 2026
Version bump 0.13.1 → 0.13.2 + CHANGELOG.

Changes since v0.13.1:
- feat: update check (CLI, MCP, HTTP) (#990)
- fix: NULL embeddings crash vector index (#992, #993)
- fix: absolute URL in update check redirect (#994)
- fix: LongMemEval benchmark threshold false negatives (#995, #996)
- chore: branding refresh (#991)

Co-authored-by: ajianaz <[email protected]>
@ajianaz
ajianaz deleted the fix/995-threshold-benchmark branch August 13, 2026 01:52
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