Why Calibrated BM25 Filtering Barely Reduced Context on LongMemEval
Organizations: Department of Electrical and Computer Engineering Texas A&M University, College Station, TX 77843-3128, USA · College of Science and Engineering Hamad Bin Khalifa University, Doha, Qatar
Abstract
An assistant that summarizes old conversations may later need a detail from the original exchange. It can score archived passages against the question, but only passages that fit in the prompt reach the answering model. We tested whether a BM25 filter saves input tokens once that limit is taken into account. We calibrated the filter on passages that individually corrected an answer the model got wrong from the summaries alone. Across 75 LongMemEval questions, filtering changed one prompt and saved 0.096% of input tokens. With and without the filter, the model answered the same questions correctly under a second automated grading. On a random sample, two human graders' settled judgments agreed with the automated grades in 92.9% of definite comparisons (Cohen's kappa = 0.805). Building on earlier work that distinguishes retrieved evidence from delivered evidence, we give an exact test for packers that try whole passages in a fixed order and skip any that do not fit. Run the packer without the filter. The prompt changes exactly when an admitted passage scores below the cutoff. Code and data: https://github.com/KurbanIntelligenceLab/Certfold
Figures & tables
| Policy | Selected | Delivered | Correct | Recovery | Damage | Input |
|---|---|---|---|---|---|---|
| Folded only | 0 | 0 | 23 | 0 | 0 | 5,397 |
| Top-two | 150 | 150 | 47–48 | 27–28 | 3 | 19,090 |
| Recall gate | 1,096 | 291 | 50 | 30 | 3 | 30,423 |
| All-that-fits | 1,192 | 292 | 50 | 30 | 3 | 30,452 |
| Stage or policy | Misses | Negatives kept | Total |
|---|---|---|---|
| Gate: selected | 1 | 177–178 | 189 |
| Gate: delivered | 4 | 39–40 | 48 |
| Top-two: delivered | 6 | 16–17 | 23 |
| All-that-fits: delivered | 4 | 40–41 | 49 |
| BM25 cutoff | BGE cutoff | |||||
|---|---|---|---|---|---|---|
| Window (tokens) | Changed | Delivered | Saved | Changed | Delivered | Saved |
| 16,384 | 4 | 98 | 1.193% | 10 | 95 | 1.237% |
| 32,768 | 1 | 291 | 0.096% | 20 | 285 | 1.266% |
| 65,536 | 5 | 645 | 0.545% | 37 | 621 | 3.684% |
| 98,304 | 17 | 976 | 2.415% | 46 | 880 | 11.325% |
| 131,072 and above | 51 | 1,082 | 8.407% | 50 | 966 | 17.662% |
| Policy | Selected | Changed | Delivered | Saved | Correct |
|---|---|---|---|---|---|
| All-that-fits | 1,192 | 0 | 292 | 0% | 50 |
| Recall gate, BM25, | 1,082 | 1 | 291 | 0.10% | 50 |
| Recall gate, BGE, | 966 | 20 | 285 | 1.27% | 49 |
| Top-3 | 225 | 65 | 224 | 15.65% | 49 |
| Budget, BM25, | 271 | 58 | 191 | 25.66% | 52 |
| Top-two | 150 | 75 | 150 | 37.31% | 47–48 |
| Source presence | Sampled benefit, re-graded | |||
|---|---|---|---|---|
| Score | AUROC | Selected | AUROC | Selected |
| 0.8382 | 78.0% | 0.8360–0.8556 | 48.7% | |
| BM25 | 0.9109 | 61.3% | 0.7822–0.8042 | 61.3–68.7% |
| BGE | 0.9340 | 59.3% | 0.8049–0.8269 | 69.3–70.0% |
| Need judge | 0.7751 | 100% | 0.6875–0.7131 | 100% |
| 0.9376 | 58.7% | 0.9060–0.9228 | 39.3–48.7% | |
| AUROC | ||||||||
|---|---|---|---|---|---|---|---|---|
| Score | Labels | Calibration | Audit | Selected | Changed | Delivered | Saved | Correct |
| BM25 | original | 0.5604 | 0.8197 | 1,096 (91.95%) | 1 | 291 | 0.096% | 50 |
| BM25 | re-graded | 0.5840–0.6026 | 0.7793–0.7988 | 1,082 (90.77%) | 1 | 291 | 0.096% | 50 |
| BGE | original | 0.5806 | 0.6835 | 1,125 (94.38%) | 8 | 289 | 0.350% | 49–50 |
| BGE | re-graded | 0.6675–0.6824 | 0.7385–0.7606 | 966 (81.04%) | 20 | 285 | 1.27% | 49 |
| Comparison | Definite | Agree | Rate | |
| Random sample of 100 requests | ||||
| First grader and automated | 98 | 91 | 92.9% | 0.805 |
| Second grader and automated | 96 | 87 | 90.6% | 0.747 |
| First grader and second grader | 96 | 89 | 92.7% | 0.790 |
| Settled grades and automated | 99 | 92 | 92.9% | 0.805 |
| Whole packet of 125 requests | ||||
Appendix figures & tables14 assets
Supplementary material from the paper’s appendix.
Appendix
| Left | Right | Both correct | Both wrong | Left only | Right only |
|---|---|---|---|---|---|
| Re-graded labels | |||||
| Folded | Top-two | 20 | 24–25 | 3 | 27–28 |
| Folded | Gate | 20 | 22 | 3 | 30 |
| Folded | All-that-fits | 20 | 22 | 3 | 30 |
| Top-two | Gate | 42–43 | 20 | 5 | 7–8 |
| Top-two | All-that-fits | 42–43 | 20 | 5 | 7–8 |
| Question | Chunk | BM25 score | Candidate input tokens |
|---|---|---|---|
| 001be529 | c0008 | 2.954351 | 37,545 |
| a82c026e | c0002 | 3.501492 | 32,938 |
| Policy | Correct | Recovery | Damage |
|---|---|---|---|
| Folded only | 14 | 0 | 0 |
| Top-two | 42 | 30 | 2 |
| Recall gate | 47 | 35 | 2 |
| All-that-fits | 48 | 36 | 2 |
| Rank | Cutoff | Selected | Fraction | Same / 75 | |
| BM25 | |||||
| 0.10 | 3 | 1.735797 | 1,082 | 90.77% | 74 |
| 0.20 | 7 | 3.124366–3.290916 | 841–866 | 70.55–72.65% | 72–73 |
| 0.30 | 10–11 | 3.426394–3.844625 | 739–816 | 62.00–68.46% | 63–71 |
| 0.40 | 14 | 4.813261–5.200567 | 514–580 | 43.12–48.66% | 49–55 |
| 0.50 | 17–18 | 5.332758–5.478331 | 478–498 | 40.10–41.78% | 43–45 |
| Score | Changed | Folds | Input | Saved | Saved (%) | |
| BM25 | 8,192 | 1 | 9 | 419,451 | 2,186 | 0.518 |
| BM25 | 12,288 | 0 | 77 | 816,063 | 0 | 0.000 |
| BM25 | 16,384 | 4 | 98 | 990,428 | 11,955 | 1.193 |
| BM25 | 24,576 | 3 | 197 | 1,648,271 | 10,049 | 0.606 |
| BM25 | 32,768 | 1 | 291 | 2,281,727 | 2,186 | 0.096 |
| BM25 | 49,152 | 2 | 465 | 3,489,625 | 7,833 | 0.224 |
| Rank 3 | Rank 10 | Rank 20 | |||||
|---|---|---|---|---|---|---|---|
| Score | Changed | Saved | Changed | Saved | Changed | Saved | |
| BM25 | 2 | 11–20 | 4.97–9.97 | 34–49 | 21.06–29.79 | 60–68 | 41.84–52.68 |
| BM25 | 4 | 11–21 | 3.51–8.64 | 41–52 | 19.21–28.97 | 63–71 | 45.74–55.06 |
| BM25 | 6 | 4–8 | 1.14–1.94 | 23–37 | 7.42–17.65 | 59–65 | 37.95–44.10 |
| BM25 | 8 | 5–6 | 0.92–1.37 | 13–28 | 3.26–10.23 | 52–60 | 29.09–36.37 |
| BM25 | 12 | 1–7 | 0.24–1.39 | 9–19 | 1.72–4.93 | 44–51 | 18.57–24.34 |
| Rule | Accuracy | Precision | Recall | False positives | False negatives |
|---|---|---|---|---|---|
| Exact admitted-fold test | 100.00% | 100.00% | 100.00% | 0 | 0 |
| Candidate ratio , | 84.76% | 100.00% | 71.20% | 0 | 714,322 |
| Retained ratio , | 91.37% | 94.17% | 89.21% | 136,875 | 267,625 |
| Candidate fitted threshold | 71.15% | 68.43% | 84.44% | 966,294 | 385,842 |
| Retained fitted threshold | 77.57% | 74.47% | 87.67% | 745,528 | 305,876 |
| Candidate fitted threshold, | 89.76% | 93.82% | 86.34% | 141,021 | 338,857 |
| Source | Benefit, re-graded | |||
|---|---|---|---|---|
| Score | AUROC | AP | AUROC | AP |
| 0.8382 | 0.8665 | 0.8360–0.8556 | 0.5925–0.6498 | |
| BM25 | 0.9109 | 0.9288 | 0.7822–0.8042 | 0.6332–0.6559 |
| BGE similarity | 0.9340 | 0.9428 | 0.8049–0.8269 | 0.6793–0.7045 |
| Need judge | 0.7751 | 0.7637 | 0.6875–0.7131 | 0.4440–0.4483 |
| 0.9285 | 0.9449 | 0.8942–0.9160 | 0.6642–0.7312 | |
| Work | Setting | Signal / intervention | Outcome target | Relation to this paper |
|---|---|---|---|---|
| Principled Context Engineering ( Chakraborty et al., 2026 ) | retrieved snippets | positive-class conformal threshold | relevance retention | same rank-control principle; different benefit label |
| TierMem ( Zhu et al., 2026 ) | summaries and linked raw logs | learned query-level escalation | summary failure / raw recovery | recovery-label concept precedes individual-fold calibration |
| Recall Is Not Enough ( Bala, 2026 ) | budgeted multi-hop RAG | compare retrieved candidates and packed context | answer presence and quality | selection/delivery distinction already explicit |
| FOCUS ( Dixit et al., 2026 ) | agent-history compression | future-distribution objective; draft plans and verification | retained decision information | different estimator; shared sensitivity motivation |
| SePer ( Dai et al., 2025 ) | retrieval and generators | reference-based semantic perplexity reduction | receiver-dependent utility | different reference/sampling requirements |
| WhenLoss; Sufficient Context ( Yu et al., 2026 ; Joren et al., 2025 ) | memory and RAG diagnostics | evidence-condition and reader comparisons | preservation, retrieval, sufficiency | stage/reader diagnosis is established |
| Question | 14B folded | 27B folded | 14B top-two | 27B top-two | 27B cap hits |
|---|---|---|---|---|---|
| 1d4da289 | 1 | 0 | 1 | 1 | folded |
| 2a1811e2 | 0 | 0 | 1 | 1 | None |
| fca70973 | 1 | 0 | 1 | 1 | folded, top-two |
| 32260d93 | 1 | 0 | 1 | ? | folded, top-two |
| 852ce960 | 1 | 1 | 1 | 1 | None |
| 65240037 | 1 | 1 | 1 | 1 | None |
| Policy | Setting | Selected | Changed | Delivered | Input tokens | Saved | Correct |
| Recall gate | rank 0 (all-that-fits) | 1,192 | 0 | 292 | 2,283,913 | 0.00% | 50 |
| Recall gate | rank 1 | 1,178 | 0 | 292 | 2,283,913 | 0.00% | 50 |
| Recall gate | rank 2 | 1,147 | 0 | 292 | 2,283,913 | 0.00% | 50 |
| Recall gate | rank 3 ( ) | 1,082 | 1 | 291 | 2,281,727 | 0.10% | 50 |
| Recall gate | rank 4 | 1,071 | 2 | 290 | 2,276,070 | 0.34% | 50 |
| Recall gate | rank 5 | 1,031 | 2 | 290 | 2,276,070 | 0.34% | 50 |
| Policy | Setting | Selected | Changed | Delivered | Input tokens | Saved | Correct |
|---|---|---|---|---|---|---|---|
| Recall gate | rank 1 | 1,087 | 14 | 287 | 2,264,996 | 0.83% | 50–51 |
| Recall gate | rank 2 | 992 | 19 | 285 | 2,255,966 | 1.22% | 48–49 |
| Recall gate | rank 3 ( ) | 966 | 20 | 285 | 2,255,005 | 1.27% | 49 |
| Recall gate | rank 4 | 926 | 24 | 283 | 2,245,935 | 1.66% | 48 |
| Recall gate | rank 5 | 839 | 32 | 278 | 2,219,035 | 2.84% | 45–46 |
| Recall gate | rank 5–6 | 766 | 41 | 272 | 2,190,347 | 4.10% | 47–48 |
Information Retrieval
Information Retrieval studies how to find, rank, and organize relevant information in large collections of data.
See all 511 papers