Skip to content

BFG evidence-coverage audit + targeted extraction fixes (q16, refiner-URL, WHO H5 HAI)#53

Open
smodee wants to merge 3 commits into
feat/bfg-summer-2026-readinessfrom
feat/bfg-evidence-quality-audit
Open

BFG evidence-coverage audit + targeted extraction fixes (q16, refiner-URL, WHO H5 HAI)#53
smodee wants to merge 3 commits into
feat/bfg-summer-2026-readinessfrom
feat/bfg-evidence-quality-audit

Conversation

@smodee

@smodee smodee commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

What

An evidence-quality pass over all 25 BFG summer-2026 questions (per
forecast-evidence-quality-spec.md): diagnose where each forecast's evidence is
under-supported, remediate the tractable cases, and measure the forecast delta.

Base is feat/bfg-summer-2026-readiness (#52), which carries the BFG CSVs, sources
and off-peak scrapers this work builds on.

Diagnosis (instrument + table)

scripts/analyze_evidence_coverage.py traces every 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. 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

  1. Refiner-URL fix (extraction/pipeline.py) — the Docling table-refiner was
    handed 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.
  2. custom_scrapers/who_h5_hai.py — resolves the WHO human-animal-interface
    monthly-risk-assessment hub to its latest assessment PDF (q6/q8: 0 → records).
  3. custom_scrapers/cdc_measles.py — the CDC measles page injects its death
    figures client-side (empty table cells in static HTML); reads the open JSON feed
    measles_hosp.json instead. 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 the
real correctness win there.

🤖 Generated with Claude Code

smodee and others added 3 commits July 5, 2026 13:22
…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>
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