Skip to content

feat: rank recommendations by a weighted score - #1209

Open
skjnldsv wants to merge 4 commits into
masterfrom
feature/weighted-score
Open

skjnldsv wants to merge 4 commits into
masterfrom
feature/weighted-score

Conversation

@skjnldsv

@skjnldsv skjnldsv commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Recommendations were sorted by date only, so whatever changed last won. Now each reason adds its weight, halved for every week it's old, and how often you opened a file adds to it, fading over a month since you last opened it. A file recommended for several reasons ranks higher. A "frequently opened" source brings in files you open often but not lately.

Relates to #888. Stacked on #1208.

Weights follow the RFC: opened 0.3, frequently opened 0.2, favorite 0.2, edited, shared and commented 0.1. Any of them can be tuned per instance without a release, for example occ config:app:set recommendations weight_favorite --value 0.3 --type float. These are a first guess, tuning them on real usage is the next step.

👾 This pull request was assisted by Claude Code, commits carry an Assisted-by trailer.

@skjnldsv skjnldsv added enhancement New feature or request 2. developing labels Oct 29, 2026
@skjnldsv skjnldsv self-assigned this Oct 29, 2026
@skjnldsv
skjnldsv added this pull request to stack #1210 October 29, 2026 07:03
@skjnldsv
skjnldsv force-pushed the feature/weighted-score branch from 7878d19 to f3fb3f2 Compare October 29, 2026 07:33
@skjnldsv
skjnldsv marked this pull request as ready for review October 29, 2026 19:33
Base automatically changed from feature/favorite-files to master October 29, 2026 20:04
@skjnldsv
skjnldsv force-pushed the feature/weighted-score branch from bf9d02f to f72dfaf Compare October 29, 2026 20:13
Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
Sorting by date alone put whatever changed last on top. Each reason a
file is recommended for now adds its weight, halved for every week it
is old, so a file recommended for several reasons ranks higher. How
often the user opened a file adds to it too, and a new "frequently
opened" source brings in files opened often but not lately.

The weights follow the RFC and can be tuned per instance with the app
config keys weight_<reason>, e.g. weight_recently_opened.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
@skjnldsv
skjnldsv force-pushed the feature/weighted-score branch from f72dfaf to 5d5b995 Compare October 29, 2026 20:16
@skjnldsv
skjnldsv requested a review from susnux October 29, 2026 20:17
@skjnldsv

skjnldsv commented Oct 29, 2026 •

Copy link
Copy Markdown
Member Author

Ah damn, I merged #1211 here. I thought I created the stack properly 🤦

EDIT/ adjusted

skjnldsv and others added 2 commits October 29, 2026 21:24
The frequency part of the score never decayed, so a file opened 4 times
weeks ago still ranked above a file shared today. It is now halved for
every 30 days since the file was last opened, the time opens are kept.

Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PzGjc7EoXAFppizM3nwWEz
Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
Signed-off-by: John Molakvoæ <14975046+skjnldsv@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant