feat(lab): find recovery - measured fold + H16' closest-excerpt on zero-hit

↗ view on GitHub · Eli Ziff · 2026-08-06 · 018342ff

find_in_document on the served-markdown plane missed 89.4% of
defined-term queries (9,095-query replay over the five no-fit corpora;
92.7% of misses were emphasis asterisks inside the phrase - the corpus
pattern is **"Affiliate"** means, so the model's natural query breaks
on the adjacent bold). MIKE_FIND_QUERY_NORM=1 adds a literal-first
folded pass (emphasis asterisks + pandoc escape backslashes + smart
quotes - the three measured classes and nothing else; dash/invisible
folds recovered zero on 4.46M chars) with hits re-anchored to raw
offsets so at stays composable with read_document windows, labeled
match_mode folded. A residual zero-hit carries the H16' closest-excerpt
suggestion (quoteRepairSuggestion over bounded overlapping body chunks,
per Eli's pointer to the existing did-you-mean) plus retry guidance -
a miss becomes retryable instead of a silent 'term not in document'.
Probe on real apex-msa queries: 8/8 literal misses, 8/8 folded
recoveries, 8/8 raw offsets slice-verified, literal hits byte-identical,
suggestion fires on a garbled query. Receipt find_query_norm asserted
true on the treatment arm, false across the frozen family. 42/42 suites,
tsc clean, preflight sha stable.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011pfUVhNFTRvhYGXBwoKNj6
Repository eliziff/Beaver
Author Eli Ziff <eliasziff@gmail.com>
Authored
Parents c709ba6b
Stats 4 files changed , +151 , -8
Part of Evaluation harness: Beaver-CAN and LegalBench-RAG adapters

Capture this commit into my fork

Download a Markdown prompt that tells Claude how to port this exact commit into your working tree. Run it via claude -p < capture-commit-018342ff.md from inside the repo you want the change in.

⬇ Download capture-commit-018342ff.md