SkillPedia Skills Encyclopedia
中文 EN

Skills 2026-07-28 05:52 UTC

recall

Committed by tylerlaprade. Update Category: Bug Fixes & Stability Improvements. Commit details: Fix the recency bias moving recent sessions down the page (#15). This update resolves known runtime errors and enhances system reliability.

tylerlaprade 8dd7381 arjunkmrm/recall

CommitRaw commit message

Fix the recency bias moving recent sessions down the page (#15)

bm25() returns a negative score and results are sorted ascending, so a better
match is a more negative number. The blend multiplies by (1 - 0.2*boost),
which is between 0.8 and 1.0, and multiplying a negative number by something
below 1 moves it toward zero — later in the sort.

So the boost is backwards: a session from today gets the largest demotion and
a year-old one is left untouched. The feature exists to surface recent work
and it buries it.

Measured over 15 real queries against a 197k-message index, the blend makes
the top ten older in 10 of them and newer in none. Median top-ten age for
"subagent" goes 41.6 -> 58.4 days. For two queries the single best match falls
off the first page entirely, in one case from position 1 to 24 — and in both
cases it was the most recent candidate, exactly what the boost is meant to
lift.

Adding the boost instead fixes it. A session with no timestamp gets boost 0,
which now correctly reads as "as old as it gets" rather than "as good as it
gets".

Adds tests/test_ranking.py: equally-good matches come back newest first, an
undated session ranks last, and the arithmetic never moves a rank toward zero.