algo-rec-content

Solid

"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'.".

AI & Automation 22 stars 8 forks Updated 1 weeks ago MIT

Install

View on GitHub

Quality Score: 82/100

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

Skill Content

# Content-Based Recommendation ## Overview Content-based filtering recommends items whose features match the user's preference profile, built from their interaction history. Computes in O(I × F) per user where I=items, F=features. Solves new-item cold start since items only need features, not interaction history. ## When to Use **Trigger conditions:** - Recommending based on item attributes (genre, category, keywords, price range) - New item cold start: items have features but no interaction data yet - When user privacy requires no cross-user data sharing **When NOT to use:** - When serendipity matters (content-based creates filter bubbles) - When item features are unavailable or uninformative (use CF instead) ## Algorithm ``` IRON LAW: Content-Based Can Only Recommend SIMILAR Items It cannot discover unexpected interests (filter bubble problem). Users who only interact with action movies will only get action movie recommendations — even if they'd love a documentary. ``` ### Phase 1: Input Validation Extract item feature vectors (TF-IDF for text, one-hot for categories, numerical for attributes). Build user profile from weighted item features of interacted items. **Gate:** Item features extracted, user profile vector built. ### Phase 2: Core Algorithm 1. Represent each item as a feature vector 2. Build user profile: weighted centroid of interacted item vectors (weight by recency, rating, or engagement) 3. Compute similarity between user profile and all candidate item...

Details

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

Similar Skills

Semantically similar based on skill content — not just same category