Repository navigation
fix(eval): locate split chunks without jumping to repeated passages - #5548
Conversation
SEC filings repeat whole passages. When a chunk followed the short tail of a chunk split for the embedder, the locator took the first copy of its text after the tail, often a repeat hundreds of pages later, and every chunk after it in that filing then counted as unlocated. Four FinanceBench filings lost 644 chunks this way, which stopped the release retrieval eval. The copy that runs back through the tail now wins; chunks in other filings are placed exactly where they were.
|
Verdict: Approve with suggestions This fixes the retrieval benchmark's chunk locator so that when a chunk's overlap runs back through the short tail of a split chunk, the nearby copy wins over an identical passage repeated much later in the filing. That jump is what left 644 FinanceBench chunks unlocated and pushed the release eval over its 1% limit. The change is small, sensible and covered by a test that fails on the old locator. Nothing blocks the merge. One thing to know: the backward match now wins every time it exists, not only when the in-order search fails. In highly repetitive text, such as filler rows in a financial table, a chunk can now land a few characters earlier than before. That's harmless for page-level scoring, and the author's six-filing old-vs-new diff found no such moves. It's worth keeping in mind if placements ever look slightly off in table-heavy documents. Real-world evidenceThe evidence stage ran the CLI, but this lane has no Lemonade, so it stopped at the embedder before reaching the changed code. The end-to-end check is pending strix-halo lane. This verdict rests on static review plus the author's reported before/after numbers (644 → 0 unlocated on the four failing filings). Spot regression: 🔍 Technical detailsIssues 🟢 Stale comment above the in-order search ( 🟢 Backward match now has priority over a valid in-order match ( Strengths
|
|
Fixed the stale comment. Leaving the backward-match rule as it is: comparing old and new placements across six filings found no small backward moves, and the old code already moved the cursor backward for split tails, so a later |
The release retrieval eval still stops on FinanceBench after #5490. SEC filings repeat whole passages. When a chunk followed the short tail of a chunk split for the embedder, the benchmark's locator matched a repeat hundreds of pages later, and every chunk after it in that filing counted as unlocated (644 chunks across four filings, over the 1% limit). The nearby copy now wins. Placements in every other filing are unchanged. This follows #5490, which merged before this commit landed on its branch. Benchmark code only; no user-facing behavior changes.
Test plan
pytest tests/unit/eval/test_retrieval_bench.py tests/unit/rag/test_retrieval_bench_harness.py(87 passed),python util/lint.py --all