Skip to content

feat(daemon): usefulness tiebreaker in priming rank#23

Merged
nickroci merged 4 commits into
mainfrom
feat/usefulness-tiebreaker
Jun 5, 2026
Merged

feat(daemon): usefulness tiebreaker in priming rank#23
nickroci merged 4 commits into
mainfrom
feat/usefulness-tiebreaker

Conversation

@nickroci

@nickroci nickroci commented Jun 5, 2026

Copy link
Copy Markdown
Owner

What

Folds the fired-helpful / fired ratio into priming's ranking as a small, prior-centered tiebreaker — usefulness only reorders candidates the cross-encoder reranker already considers comparable; it can never override a real relevance gap.

Why a tiebreaker, not a weight

The decay/LTD design warns that ranking by usefulness creates a self-reinforcing surfacing loop (surface → accrue helpful → rank higher → surface more). Keeping it gentle prevents runaway; the reranker stays in charge of applicability.

Behaviour

  • Beta-smoothed, prior-centered estimate: a zero-data entry contributes exactly 0 (clean cold-start); proven entries float up a hair, chronically-surfaced-but-ignored entries sink a hair.
  • Bounded swing (~+0.08 / −0.02 logits): bigger than the scope bonus, far smaller than one reinforcement or a real rerank gap.
  • Weight is deliberately small and uncalibratedfired-helpful is ~0 library-wide until the 2026-06 capture accrues data. An in-code TODO lists the growth path (evidence-gating, ignored-penalty→decay, RIF, common-scale normalisation, telemetry).

Also

  • decay.py TODO: bare surfacing currently resists decay as much as helpful surfacing — captures the "reset half-life on useful surface" direction (plus "sum, don't max, counters on merge").
  • README status: pre-alpha → beta.

Tests

643 passed, ruff clean, pyright 0 errors, coverage 90.39%. New: tiebreaker breaks ties and cannot override a clear rerank gap; _usefulness_score cold-start / garbage / sign coverage.

🤖 Generated with Claude Code

nickroci and others added 4 commits June 4, 2026 17:56
Fold the fired-helpful/fired ratio into priming's ranking as a small,
prior-centered TIEBREAKER (_boost_with_reinforcement). It's a Beta-smoothed,
centered estimate so a zero-data entry contributes exactly 0 (clean
cold-start) and the swing is bounded (~+0.08 / -0.02 logits): it only
reorders candidates the cross-encoder reranker already considers comparable,
never overriding a real relevance gap. The weight is deliberately small and
uncalibrated until fired-helpful accrues data; an in-code TODO lists the
growth path (evidence-gating, ignored-penalty-into-decay, RIF, common-scale
normalisation, telemetry).

Also adds a decay.py TODO: bare surfacing currently resists decay as much as
helpful surfacing, so chronically-ignored entries never fade — captures the
"reset half-life on useful surface" direction and the "sum, don't max,
counters on merge" caution.

Bumps the project status from pre-alpha to beta.

Tests: usefulness tiebreaker breaks ties and cannot override a clear rerank
gap; _usefulness_score cold-start / garbage / sign coverage; conftest gains
optional fired / fired_helpful fields.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Tier-1 ranking now consumes fired-helpful/fired as a gentle usefulness
  tiebreaker (was "nothing yet consumes the counter"); updated the Tier-1
  table, the graph section, the roadmap signal list, and the
  prefrontal-inhibition mechanism row (retrieval-ranking half shipped,
  fired wired; decay-resistance + negative half still TODO).
- Status counts: daemon 623->643, hooks 68->259 (stale), total ->1076.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The ultan-search skill / fetch_entry RPC appended `.md` to every path and
stripped trailing slashes, so a folder path like `projects/research` (or
`projects/research/`) resolved to the non-existent `projects/research.md`
and 404'd instead of browsing the folder. An agent that passed a folder
path to drill into a topic hit "entry not found: projects/research.md".

Now a bare folder path (with or without a trailing slash) resolves to that
folder's README.md: try `<raw>.md` first, then `<raw>/README.md`. An
explicit `.md` suffix is still always an entry. The not-found error lists
what was tried and suggests a free-text query.

Tests: folder path (no slash) and trailing-slash form both resolve to the
folder README with the folder's entries as siblings.

(README status count bumped 643->645 for the two new tests.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nickroci nickroci merged commit 551f17d into main Jun 5, 2026
4 checks passed
@nickroci nickroci deleted the feat/usefulness-tiebreaker branch June 5, 2026 10:57
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