Seed the rewrite: profile, calibration, and repo scaffolding

Ground-up replacement for news_triage, whose signal quality failed because it
had no representation of what its user likes -- three keywords fed to BM25 plus
a two-term substring blocklist.

profile/ holds the taste model as prose and TOML: 11 interest blocks, 3 veto
blocks, 5 importance blocks, each a set of probe sentences to be embedded.

The [scoring] constants are fitted, not guessed. CALIBRATION.md records the
measurements against all 3,885 items in the v0.2 database and 40 real feedback
labels, including two findings that changed the design:

- compare blocks by z-score within block, never raw cosine; raw cosine let
  geopolitics win 78% of items and buried known-liked items at median rank 1246
  of 3885 (293 after normalizing)
- veto needs a margin over the interest signal, not a threshold; a plain 0.55
  cutoff falsely killed "Belgian mayor blocks club from hosting Israeli opponent
  in Europa League", which the old substring blocklist also killed
This commit is contained in:
connor committed 2026-09-08 14:34:56 -04:00
commit c89a723603
6 files changed
+551

No files matched your search

+224
View File
@@ -0,0 +1,224 @@
# Machine-readable form of profile.md. Every `probes` string is embedded into a
# vector; an item's score for a block is the MAX cosine over that block's probes,
# never the mean. Probes are written as prose resembling article text, because
# that is what they are compared against.
#
# Weights multiply the similarity. Feedback moves these vectors over time; the
# text here is the cold-start seed.
schema_version = 1
# ---------------------------------------------------------------- interests --
[[interest]]
id = "geopolitics"
weight = 1.0
probes = [
"Escalation in the Middle East as strikes continue and diplomatic efforts stall.",
"China expands its influence abroad through investment, diplomacy and security agreements.",
"US foreign policy shifts as the administration reconsiders its posture toward an ally.",
"The United Nations Security Council debates sanctions and an arms embargo.",
"Ceasefire negotiations falter amid disputes over withdrawal and prisoner exchange.",
]
[[interest]]
id = "tech-science-policy"
weight = 0.9
probes = [
"Regulators propose new rules governing artificial intelligence development and deployment.",
"A court ruling reshapes platform liability and online speech regulation.",
"Government surveillance powers and encryption policy face legal challenge.",
"Public research funding is cut, reshaping the scientific workforce.",
"Antitrust enforcement targets dominant technology firms.",
]
[[interest]]
id = "labor-inequality"
weight = 0.9
probes = [
"Workers vote to unionize after a long organizing campaign; the employer contests the result.",
"A strike over wages and staffing shuts down operations across the sector.",
"New research documents widening wealth inequality and stagnant real wages.",
"Lawmakers debate expanding public healthcare, childcare and paid leave.",
"Tenants organize against rising rents as an eviction wave builds.",
]
[[interest]]
id = "software-systems"
weight = 0.9
push_eligible = true
probes = [
"A new release of the systems programming language brings major changes to the compiler and toolchain.",
"Running large language models locally on consumer hardware: quantization, throughput and memory bandwidth.",
"Self-hosting a service stack with containers, reverse proxies and automated deployment.",
"A widely used open source project announces a breaking change, a license change, or a governance dispute.",
"WebAssembly gains new capabilities for running compiled code in the browser.",
"A serious vulnerability is disclosed in widely deployed infrastructure software.",
]
[[interest]]
id = "urbanism"
weight = 0.8
probes = [
"The city council votes to reform zoning rules and allow denser housing near transit.",
"A new bus rapid transit and light rail line reshapes how residents move through the city.",
"Planners redesign streets to reduce traffic deaths and reclaim space from cars.",
"A downtown redevelopment project raises questions about displacement and public space.",
]
[[interest]]
id = "energy-climate"
weight = 0.6
probes = [
"Grid operators struggle to connect new renewable generation as storage capacity lags demand.",
"A national climate policy sets emissions targets and restructures energy subsidies.",
"Conservation rules protecting endangered species and public land are rolled back.",
]
# Confirmed by Connor 2026-09-08: wanted, at a level that keeps him up to date
# rather than saturating the feed. Also supported by three of eighteen starred
# items (Uber exiting Nigeria and Uganda, India's grid crunch, the Bolivian base
# explosions).
[[interest]]
id = "global-south"
weight = 0.7
probes = [
"An international company withdraws from several African markets amid regulatory pressure.",
"Elections and political upheaval reshape governments across Latin America.",
"Infrastructure and economic development across South Asia strains under rapid growth.",
]
# ---------------------------------------------------------------- geography --
[[interest]]
id = "cincinnati"
weight = 0.9
local = true
probes = [
"Cincinnati city council debates a development, budget or policing decision affecting neighborhoods.",
"Local news from Cincinnati and Hamilton County, Ohio.",
]
[[interest]]
id = "kentucky-louisville"
weight = 0.6
local = true
probes = [
"Louisville and Kentucky state politics, legislation and local government decisions.",
]
[[interest]]
id = "us-national"
weight = 0.8
probes = [
"Congress advances major legislation after a contested floor fight.",
"The Supreme Court issues a ruling with sweeping consequences for federal policy.",
"Federal agencies are restructured by executive order, prompting legal challenges.",
]
[[interest]]
id = "italy-mexico"
weight = 0.7
probes = [
"Italian politics, government coalitions and social policy in Italy.",
"Mexican politics, security policy and the relationship with the United States.",
]
# ------------------------------------------------------------------- vetoes --
[[veto]]
id = "us-big-three-sports"
threshold = 0.55
probes = [
"The team beat their rivals in a game recap with final scores, statistics and player performances.",
"A player is traded, drafted or signs a contract; the league fines a franchise over salary cap rules.",
"Playoff standings, betting lines and a schedule of games on television this week.",
"Morales homers and drives in four as the Nationals top the Braves 9-5; Snell throws six shutout innings.",
"Box score summary: hits, runs, errors, pitching line and inning-by-inning scoring.",
]
[[veto]]
id = "royal-celebrity-gossip"
threshold = 0.55
probes = [
"The royal family attends an event; speculation continues about the couple's status and future.",
"Celebrity red carpet appearances, box office returns and influencer controversy.",
]
[[veto]]
id = "listicle-filler"
threshold = 0.60
probes = [
"Horoscopes, quizzes, and a roundup of the best products to buy this week.",
]
# ------------------------------------------------------- the importance lane --
# Independent of interest. Vetoes still apply here -- v0.2's bypass lane ignored
# relevance entirely (gate.rs:302), which let blocklisted items fire at priority 5.
[[importance]]
id = "war-escalation"
weight = 1.0
probes = [
"One state launches military strikes on another, marking a major escalation of the conflict.",
"Nuclear facilities are targeted or a state signals willingness to use weapons of mass destruction.",
]
[[importance]]
id = "mass-casualty"
weight = 1.0
probes = [
"A powerful earthquake kills hundreds and leaves many missing under collapsed buildings.",
"A bombing, shooting or industrial disaster causes mass casualties.",
"A passenger aircraft or train crash kills dozens.",
]
[[importance]]
id = "us-federal-shock"
weight = 0.9
probes = [
"A constitutional crisis unfolds as the administration defies a court order.",
"The federal government shuts down after Congress fails to pass funding.",
"The Supreme Court overturns long-standing precedent.",
]
[[importance]]
id = "economic-break"
weight = 0.9
probes = [
"Stock markets plunge in the steepest single-day fall in years as a major bank fails.",
"A currency collapses and the central bank intervenes with an emergency rate decision.",
]
[[importance]]
id = "us-political-event"
weight = 0.9
probes = [
"A major election is called, delivering a decisive result and a shift in power.",
"A prominent political figure dies or resigns unexpectedly.",
]
# ------------------------------------------------------- calibrated scoring --
# These constants are not guesses. They were fitted on 2026-09-08 against all
# 3,885 items in the v0.2 database and Connor's 40 real feedback labels.
# See profile/CALIBRATION.md for the measurements.
[scoring]
# Compare blocks by z-score WITHIN each block, never by raw cosine. Raw cosine
# is not comparable across blocks -- "geopolitics" averages 0.501 similarity to
# world-news text while "kentucky-louisville" averages 0.441 -- so a plain max
# let geopolitics win 78% of all items. Per-block z-scoring drops that to 19%
# and moves the median rank of a known-liked item from 1246 to 293 of 3885.
normalize = "zscore-per-block"
# Veto is deliberately NOT a plain similarity threshold. A story can be
# genuinely sports-adjacent and still be wanted: "Belgian mayor blocks club from
# hosting Israeli opponent in Europa League" is Middle East politics, and both a
# substring blocklist AND a 0.55 cosine threshold falsely killed it.
#
# So: veto on unambiguous similarity, OR when the veto signal beats the best
# interest signal by a margin. Measured at these values: 17/22 of Connor's real
# rejections caught, 0/18 of his likes lost, ~21% of the corpus vetoed, and all
# four sports-adjacent news canaries survive.
veto_absolute = 0.60
veto_margin_over_interest = 0.3