Files
news/profile/config.toml
T
connor a2c812794d Tiered corroboration: origins, pickups and depth scored separately
Connor's point: "several outlets carried this" covers situations that carry
different amounts of information, and origin_count() flattened them all to one
number. Splitting on same/different newsroom and same/different text gives four
cases:

  same newsroom, same text  -> pure duplicate (BBC World + BBC top). Zero
                               signal; the front-page placement it does carry is
                               already captured by sources.prominence.
  same newsroom, diff text  -> DEPTH. A newsroom filing four pieces on one story
                               is a real editorial judgement, previously
                               discarded entirely.
  diff newsroom, same text  -> PICKUPS. Syndicated copy; each carrier chose to
                               run it. Weak but non-zero.
  diff newsroom, diff text  -> ORIGINS. Independent judgement and independent
                               newsgathering. Strongest.

score = origins + 0.3*log1p(pickups) + 0.2*log1p(depth), weights in config.
Origins stay dominant; the others break ties among the many two- and
three-origin clusters, and log damping stops a high-volume feed inflating depth.

Measuring first changed the design. Depth outnumbers pickups 78 to 11 across 91
real clusters, because these sources are mostly national outlets writing their
own copy rather than local papers running wire -- so the more valuable half was
the one not originally proposed. UK settlements scores 10.55 from 10 origins
plus 15 same-newsroom pieces; AfD scores 5.55 from 5 origins plus 15.

Tests assert the four-case ordering directly, and that twenty pieces from one
newsroom still rank below two independent ones. Both needed a helper generating
vectors with exact pairwise cosine: the band between the 0.82 clustering
threshold and the 0.97 syndication threshold is narrow, and two earlier drafts
of these tests used ad-hoc vectors that fell outside it and asserted nothing.
2026-09-08 16:00:09 -04:00

70 lines
3.1 KiB
TOML

# Runtime configuration and tuning knobs.
#
# Three-file split, so a new user knows what to touch:
# config.toml this file -- machinery. Sane defaults; rarely edited.
# profile.toml who you are: interests, vetoes, importance, delivery.
# sources.toml what to read.
#
# Nothing here is specific to any person. Everything personal lives in the
# other two files.
[http]
# Sent on every outbound request. Feed operators use it to identify traffic and
# some will block a generic or absent agent, so put a real contact here.
# CHANGE THIS if you are not Connor -- it is the contact address feed operators
# see, and pointing them at someone else's domain is rude and unhelpful.
user_agent = "news/0.1 (+https://news.rcjohnstone.com; personal feed reader; one user)"
timeout_secs = 30
connect_timeout_secs = 10
concurrency = 8
max_body_bytes = 10485760
[embedding]
# Any model fastembed can serve. `dim` must match the model.
#
# The default is English-only. For native-language sources use a multilingual
# model -- "intfloat/multilingual-e5-small" (384 dim) is the usual choice.
# Be aware that changing the model INVALIDATES the calibrated constants below
# and in [scoring]: they are cosine thresholds, and a different model puts
# similarity on a different scale. Re-run the calibration before trusting them.
model = "BAAI/bge-small-en-v1.5"
dim = 384
[clustering]
# Calibrated by inspection on a 3,885-item corpus; see CALIBRATION.md.
# 0.70 merged "Solheim Cup capsules" with "FIBA Women's World Cup Glance";
# 0.86 under-merged. Over-merging is the worse failure because it inflates the
# corroboration signal that feeds importance.
#
# Re-tune if your sources differ substantially in style or language.
threshold = 0.82
window_hours = 48
# Above this cosine, two items from DIFFERENT newsrooms are treated as the same
# syndicated copy rather than independent corroboration. Deliberately high:
# eight outlets each writing their own Renoir-heist headline stayed separate,
# while a local station reprinting a wire dispatch collapsed correctly.
syndication_threshold = 0.97
[scoring]
# Compare blocks by z-score WITHIN each block, never by raw cosine: cosine
# magnitude is not comparable across blocks, and a plain max let one block win
# 78% of all items. See CALIBRATION.md.
normalize = "zscore-per-block"
# Veto is not a plain similarity threshold. A story can be genuinely adjacent to
# a vetoed topic and still be wanted, so an item is vetoed on unambiguous
# similarity OR when the veto signal beats the best interest signal by a margin.
veto_absolute = 0.60
veto_margin_over_interest = 0.3
# Corroboration = origins + pickup_weight*log1p(pickups) + depth_weight*log1p(depth).
# "Several outlets carried this" covers four different situations; see
# news/cluster.py:Corroboration. Origins (independent newsrooms doing their own
# reporting) dominate; the other two break ties among the many two- and
# three-origin clusters. Measured on a real corpus: 163 origins, 90 depth,
# 11 pickups -- depth matters far more here because these sources mostly write
# their own copy. Raise pickup_weight if you add local papers running wire.
corroboration_pickup_weight = 0.3
corroboration_depth_weight = 0.2