Skip to content

feat(reco): time-windowed taste embedding + stronger semantic signal - #79

Merged
Athenox14 merged 1 commit into
masterfrom
claude/wizardly-tesla-cD6iV
Jun 4, 2026
Merged

feat(reco): time-windowed taste embedding + stronger semantic signal#79
Athenox14 merged 1 commit into
masterfrom
claude/wizardly-tesla-cD6iV

Conversation

@Athenox14

Copy link
Copy Markdown
Owner

Summary

  • 7-day taste window: Replaces the stale lastMediaIds (max 5 IDs, no timestamps) with a live query against user_events — all distinct media_id values the user interacted with in the last 7 days. The window is controlled by TASTE_WINDOW_DAYS = 7 (easy to tune later). Taste sample expands from ~10 to up to 40 items.
  • Liked films preserved: ratedRows (rating = 1) are still included alongside the event window, so explicit likes always anchor the taste vector regardless of age.
  • Stronger semantic signal: Multiplier raised from 1018 (sim × 18 × (0.5 + 0.5 × cinephile)), giving a max of ~14.4 pts at cinephile=1 — now competitive with genre signals rather than just a tiebreaker.

Test plan

  • Trigger youMightAlsoLike for a user who has watched films in the last 7 days → confirm semantic similarity badge appears more often
  • Verify no regression for users with zero events in the window (empty recentIds → only liked films used, graceful fallback)
  • Check that TASTE_WINDOW_DAYS can be changed without other code changes

https://claude.ai/code/session_01XcJo4UywxcJC2XmiRSy1Wm


Generated by Claude Code

Replace fixed last-5 `lastMediaIds` with a 7-day event window query
against `user_events` (configurable via TASTE_WINDOW_DAYS). Expands
taste sample up to 40 items with timestamps rather than a stale profile
snapshot.

Increase semantic signal multiplier from 10 → 18, making it competitive
with genre signals for users with high cosine similarity (max ~14.4 pts
at cinephile=1 vs ~9 pts before).

https://claude.ai/code/session_01XcJo4UywxcJC2XmiRSy1Wm
@Athenox14
Athenox14 merged commit 1ac8637 into master Jun 4, 2026
1 check passed
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.

2 participants