Phase 3: two-axis scoring and routing
Scoring (news/score.py): every profile block is embedded and compared by
z-score WITHIN block, then weighted. Veto fires on absolute similarity OR a
margin over the interest signal; demotes apply a penalty instead of excluding,
because those categories sit adjacent to real interests.
Importance is deliberately NOT corroboration count -- the old system's error,
which measured the subscription list rather than the news. It combines block
similarity, corroboration, burst velocity, editorial prominence and aggregator
score, all weighted from config.
Routing (news/route.py): two lanes with separate budgets. Interest never
overrides quiet hours; importance may, within a hard nightly cap. Vetoes are
absolute on BOTH lanes -- the v0.2 bypass lane never consulted relevance, so a
blocklisted item could still fire at priority 5, and a test now asserts it
cannot. Budgets are spent strongest-first rather than first-come.
Measured on 1,318 real clusters: 2.5 notifications/day and a 14-item digest,
inside the 2-5/day target.
Three defects the real data exposed, none of which unit tests would have caught:
- velocity was computed as origins/hours with a 0.5h floor, giving every
SINGLE-source cluster a spurious velocity of 2.0. Growth rate is undefined
for a cluster that has not grown; it is now zero below two origins.
- deferred items (quiet hours, budget exhausted, immature) settled straight
into the digest and bypassed its cap, producing 198 items/day. Everything
that misses an alert lane now competes for one ranked, capped digest.
- feeds return large archives on first fetch -- 88 Strong Towns items going back
five months, and a BBC entry titled "BBC News app" dated 2025. Those belong in
the scoring population but must never notify, so routing now has a recency
requirement.
Reading the output also found two profile gaps: recurring columns and link
round-ups ("Catching Our Eye News Roundup", "Astronomy Picture of the Day")
scored as top-ranked interest items. They are on-topic but publish on a
schedule, so they are demoted rather than vetoed and still reach the digest.
This commit is contained in:
1 parent
a2c812794d
commit
23966a2d63
9 files changed
+809
-1
No files matched your search
@@ -67,3 +67,43 @@ veto_margin_over_interest = 0.3
|
||||
# their own copy. Raise pickup_weight if you add local papers running wire.
|
||||
corroboration_pickup_weight = 0.3
|
||||
corroboration_depth_weight = 0.2
|
||||
|
||||
[routing]
|
||||
# Daily budgets. Deliberately small: the point of the system is a handful of
|
||||
# well-chosen interruptions, not a feed.
|
||||
interest_per_day = 3
|
||||
important_per_day = 2
|
||||
# Hard cap on waking the reader during quiet hours, inside important_per_day.
|
||||
important_per_night = 1
|
||||
|
||||
# Thresholds are in z-score units -- "how many standard deviations above normal
|
||||
# for this block", not raw cosine. Calibrate with `news simulate`, which reports
|
||||
# the notifications-per-day these values would actually have produced.
|
||||
interest_threshold = 2.0
|
||||
important_threshold = 2.0
|
||||
digest_floor = 0.5
|
||||
# A floor alone yielded 198 items a day. The digest is capped by count and fed
|
||||
# strongest-first, so the cap is always spent on the best candidates.
|
||||
digest_max_items = 25
|
||||
# Serendipity slots are filled from items BELOW this interest score, so they are
|
||||
# genuinely outside the profile rather than near-misses.
|
||||
serendipity_max_interest = 0.5
|
||||
|
||||
# Aggregator maturation: an HN post at 3 points is noise, at 300 it is news.
|
||||
hn_min_score = 150
|
||||
|
||||
# Nothing older than this may generate a notification. Feeds return large
|
||||
# archives on first fetch -- one run pulled 88 items going back five months --
|
||||
# and those belong in the scoring corpus but not in your pocket.
|
||||
max_age_hours = 48
|
||||
|
||||
[scoring.importance_weights]
|
||||
# Importance is NOT corroboration count -- that was the old system's error.
|
||||
# Velocity is weighted as heavily as corroboration: 0 to 6 independent origins
|
||||
# in ninety minutes is what breaking news looks like, and a story sitting at 6
|
||||
# origins for three days is not.
|
||||
block = 1.0
|
||||
corroboration = 0.4
|
||||
velocity = 0.5
|
||||
prominence = 0.3
|
||||
aggregator = 0.3
|
||||
Reference in new issue
Block a user