Skip to content

fix(extraction): smooth heading-density score term with sqrt#86

Merged
dongwhee merged 1 commit into
developfrom
fix/selector-heading-smoothing
Jul 5, 2026
Merged

fix(extraction): smooth heading-density score term with sqrt#86
dongwhee merged 1 commit into
developfrom
fix/selector-heading-smoothing

Conversation

@dongwhee

@dongwhee dongwhee commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

One-line rescoring change in _score_candidate: the heading-density term's linear ramp with a 0.25 cap created an all-or-nothing cliff that the 2026-07-06 oracle-gap diagnostic identified as the dominant cause (57.7%) of wrong candidate picks among selectable candidates. Replaced with sqrt dampening (cap 0.35, weight 40) — the winning variant (V1) of a 4-variant offline matrix re-scored over all 1,497 WCXB dev pages. Combining with length-score dampening (V3) measured strictly worse than V1 alone; a nav/link-density penalty (V4) was inert.

Gates

Gate Result
WCXB combined F1, end-to-end 0.809 → 0.814 (matches offline prediction exactly; threshold >= 0.813)
Page-type regression check all 7 types net-positive in the offline matrix (largest: product +0.053, collection +0.043 on the affected bucket)
Parity 14/14 develop-passing cases (incl. record pages aladin_bestsellers, wanted_jobs); hada_news fails identically on develop — live front-page drift, pre-existing
agent_patterns coding shard 24/24

Diagnostic + variant matrix details: notes/selector-oracle-gap-diagnostic.md (local). Remaining oracle gap (~53% of the original 0.068) is the records-sentinel forfeit gate — separate follow-up (Fix A), not touched here.

🤖 Generated with Claude Code

The 2026-07-06 oracle-gap diagnostic (notes/selector-oracle-gap-
diagnostic.md) showed heading_score's linear density term with a 0.25
cap creates an all-or-nothing cliff that drives 57.7% of wrong
candidate picks among selectable candidates. sqrt dampening (cap 0.35,
weight 40) was the winning variant (V1) of a 4-variant offline matrix
re-scored over all 1,497 WCXB pages: +0.005 full-set F1, +0.024 on the
487-page scoring-failure bucket, all 7 page types net-positive, only
43 cheap regressions (F1 -5.3 vs +12.9 gained). Combining with
length-score dampening (V3) measured strictly worse than V1 alone.

Gates: WCXB end-to-end 0.809 -> 0.814 (matches offline prediction);
parity 14/14 develop-passing cases (hada_news fails identically on
develop - live front-page drift); coding shard 24/24.
@dongwhee dongwhee merged commit ddcde71 into develop Jul 5, 2026
4 checks passed
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