BFG evidence-coverage audit + targeted extraction fixes (q16, refiner-URL, WHO H5 HAI)#53
Open
smodee wants to merge 3 commits into
Open
Conversation
…AI scraper The Docling table-refiner was handed the *hub* URL (`filtered_doc.url`) for its allowlist check, so custom-scraper-resolved PDFs (who_cholera, mpox sitreps, and now who_h5_hai) — whose cdn.who.int paths the allowlist targets — never triggered refinement. Match on `fetch_result.final_url` instead. Guarded by `test_refiner_receives_resolved_pdf_url_not_hub`. Also add `custom_scrapers/who_h5_hai.py`: resolves the WHO "influenza at the human-animal interface" monthly-risk-assessment hub to its latest assessment PDF (mirrors who_cholera), so H5 human-case questions get records instead of 0 from the context-only index page. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
`scripts/analyze_evidence_coverage.py` traces each insight record back to its organic-vs-dashboard origin, computes a scope/count-basis-aware current-value anchor, pool-vs-survivor keyword-overlap quality (+ optional gpt-4o-mini on-topic judge), dashboard-routing coverage, and a classification + attributed cause (extraction / insight / search-recall / filter-recall / robustness). Diagnosis of all 25 BFG summer-2026 questions (live, 2026-07-05): routing 25/25 and the filter are working; the gaps are extraction (q6/q8/q9/q11/q16/q24/q25) and q17 insight-calibration. Full write-up + CSV/JSON deliverables under data/investigations/. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The CDC measles page injects its case/death figures client-side; the death table cells are empty in the statically served HTML, so q16 (US measles deaths) extracted 0 records while q14 (cases, in prose) worked. The figures are published as plain JSON at /wcms/vizdata/measles/measles_hosp.json (no browser/Akamai); `custom_scrapers/cdc_measles.py` fetches it and renders total_deaths / deaths_sentence / total_cases as clean prose. q16: 0 records -> "0 confirmed measles deaths in 2026" @ conf 0.85; the evidence forecast sharpens to 0.99 on the "0" bin (baseline 0.70). Live-only (returns None in replay to avoid leakage). Tests in test_cdc_measles_scraper.py. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jul 5, 2026
Open
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
An evidence-quality pass over all 25 BFG summer-2026 questions (per
forecast-evidence-quality-spec.md): diagnose where each forecast's evidence isunder-supported, remediate the tractable cases, and measure the forecast delta.
Base is
feat/bfg-summer-2026-readiness(#52), which carries the BFG CSVs, sourcesand off-peak scrapers this work builds on.
Diagnosis (instrument + table)
scripts/analyze_evidence_coverage.pytraces every insight record back to itsorganic-vs-dashboard origin, computes a scope/count-basis-aware current-value anchor,
pool-vs-survivor keyword-overlap quality (+ optional gpt-4o-mini on-topic judge),
dashboard-routing coverage, and a classification + attributed cause. Full run
(live, 2026-07-05) + write-up in
data/investigations/.Headline: routing (25/25 resolution sources injected) and the filter are not the
bottleneck — the on-topic judge shows the organic the filter drops is generic news.
The real gaps are extraction and, for q17, insight confidence calibration.
Code changes
extraction/pipeline.py) — the Docling table-refiner washanded the hub URL for its allowlist check, so it never fired on
custom-scraper-resolved PDFs (cholera, mpox, HAI). Now matches
fetch_result.final_url. Regression test added.custom_scrapers/who_h5_hai.py— resolves the WHO human-animal-interfacemonthly-risk-assessment hub to its latest assessment PDF (q6/q8: 0 → records).
custom_scrapers/cdc_measles.py— the CDC measles page injects its deathfigures client-side (empty table cells in static HTML); reads the open JSON feed
measles_hosp.jsoninstead. q16: 0 records → "0 measles deaths 2026" @ conf 0.85;evidence forecast sharpens to 0.99 on the "0" bin (baseline 0.70). q14/q15 unaffected.
Forecast-quality delta (Phase 3 sample)
Evidence anchors forecasts where sufficient — q1 snaps to the 1,460 bin; q16/q17/q18
diverge sensibly from the retrieval-free baseline toward the current value. The
residual risk is thin evidence → over-confidence (q6).
Not in scope here (recommended, in the write-up)
q11/q24/q25 list-enumeration (net-new); q9 APHIS (#50, deferred — needs a browser dep);
q6/q8 cumulative-H5 (separate page + window just opened); q17 insight calibration
(#26 — optional, the forecast already uses the anchor).
Tests
551 passed, 3 skipped. New:test_cdc_measles_scraper.py,test_refiner_receives_resolved_pdf_url_not_hub.Note: Docling is a required dep but was missing from the default env; validated under
.venv-docling. Docling doesn't change the PDF-question verdicts — the URL fix is thereal correctness win there.
🤖 Generated with Claude Code