algo-rec-session

Solid

"Implement session-based recommendation from short-term user behavior sequences without long-term profiles. Use this skill when the user needs to recommend in anonymous sessions, predict next click from browsing sequence, or build recommendations for non-logged-in users — even if they say 'what should they click next', 'anonymous user recommendations', or 'browsing sequence prediction'.".

AI & Automation 22 stars 8 forks Updated 6 days ago MIT

Install

View on GitHub

Quality Score: 84/100

Stars 20%
45
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Session-Based Recommendation ## Overview Session-based recommendation predicts the next item a user will interact with based on their current session's click/view sequence, without relying on long-term user profiles. Uses Markov chains, association rules, or neural approaches (GRU4Rec). Operates in real-time with O(sequence_length) inference. ## When to Use **Trigger conditions:** - Anonymous users (no login, no long-term profile) - Short browsing sessions where recency matters most - Real-time "next item" prediction during active sessions **When NOT to use:** - When rich user history is available (use CF or content-based for better personalization) - When sessions are extremely short (1-2 clicks) — insufficient signal ## Algorithm ``` IRON LAW: First Few Clicks Are Disproportionately Important Session-based methods operate WITHOUT long-term profiles. Intent must be inferred from SHORT sequences. The first 2-3 clicks establish the session's intent — misreading early signals derails the entire session. ``` ### Phase 1: Input Validation Parse clickstream into sessions (by session ID or timeout-based splitting, typically 30min inactivity). Filter sessions below minimum length (3+ events). **Gate:** Sessions parsed, minimum length threshold applied. ### Phase 2: Core Algorithm **Markov Chain approach:** 1. Build transition matrix from item-to-item sequences across all sessions 2. For current session [A, B, C], predict next item from P(next | C) or higher-order P(next |...

Details

Author
charlieviettq
Repository
charlieviettq/awesome-agent-skill
Created
2 months ago
Last Updated
6 days ago
Language
Python
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

algo-rec-content

"Implement content-based recommendation by matching item features to user preference profiles. Use this skill when the user needs to recommend items based on attributes, solve the cold start problem for new items, or build recommendations without collaborative data — even if they say 'recommend similar products', 'items like this', or 'feature-based matching'.".

22 Updated 6 days ago
charlieviettq
AI & Automation Solid

algo-rec-cf

"Implement collaborative filtering for recommendations based on user behavior patterns. Use this skill when the user needs to build a recommendation engine from user-item interaction data, find similar users or items, or predict ratings — even if they say 'users who bought this also bought', 'similar users', or 'recommend based on behavior'.".

22 Updated 6 days ago
charlieviettq
AI & Automation Listed

session-retro

Runs a per-session self-retrospective at a session boundary — reflects on the session that just ended and emits SESSION-grained learnings as signal-only rows in the pipeline event log. Captures the class the decision-moment path structurally cannot: operator feedback arriving with NO recommendation on the table (an unprompted correction, a stated preference, a redirection, expressed friction), plus recurring session friction. Records an EXPLICIT no-learning row when a session produced nothing, so "ran and found nothing" is never confused with "never ran". Sensor, never actuator — a run makes zero toolkit changes, a cross-session cluster promotes to an improvement CANDIDATE through the governance gate, and the operator memory store is never written. Sampled, not fire-always. Triggers: "run the session retro", "retro this session", "session-retro", "what did this session teach us", "capture learnings from this session".

0 Updated today
cody-hutson