recommendation-algorithm-design
БесплатноБез исполняемых скриптовНе проверенComplete mastery guide for designing social media recommendation algorithms — understanding candidate generation, ranking models, engagement prediction…
от nirholas★ 289 звёзд на GitHubОб этом скилле
Recommendation Algorithm Design — From First Principles
This skill teaches you to build recommendation systems that surface the right content to the right person at the right time. You'll learn the full pipeline — from candidate generation to final ranking — and understand why feeds feel the way they do.
The Recommendation Pipeline
Every major social platform follows the same high-level architecture:
┌─────────────────────────────────────────────────────────────┐
│ THE RECOMMENDATION PIPELINE │
├─────────────────────────────────────────────────────────────┤
│ │
│ ALL CONTENT (millions) │
│ │ │
│ ▼ │
│ ┌─────────────┐ │
│ │ CANDIDATE │ Filter: ~10,000 posts worth considering │
│ │ GENERATION │ (follows, topics, graph neighbors) │
│ └──────┬──────┘ │
│ │ │
│ ▼ │
│ ┌─────────────┐ │
│ │ RANKING │ Score each candidate: P(engagement) │
│ │ MODEL │ (neural network, 100+ features) │
│ └──────┬──────┘ │
│ │ │
│ ▼ │
│ ┌─────────────┐ │
│ │ FILTERING │ Remove: spam, duplicates, policy │
│ │ & MIXING │ Inject: diversity, exploration, ads │
│ └──────┬──────┘ │
│ │ │
│ ▼ │
│ FINAL FEED (~50 posts for this session) │
│ │
└─────────────────────────────────────────────────────────────┘
Stage 1: Candidate Generation
The universe of content is too large to score every item. Candidate generation narrows millions of posts to thousands worth evaluating.
Sources of Candidates
| Source | What It Catches | Latency |
|---|---|---|
| In-Network | Posts from people you follow | Low |
| Social Graph | Posts liked by people you follow | Medium |
| Topic Graph | Posts in topics you engage with | Medium |
| Embedding Similarity | Posts similar to your past engagement | High |
| Trending | High-velocity posts across the platform | Low |
| Exploration | Random high-quality posts (serendipity) | Low |
Two-Tower Retrieval Model
The standard architecture for large-scale candidate generation:
┌──────────────────┐ ┌──────────────────┐
│ USER TOWER │ │ ITEM TOWER │
├──────────────────┤ ├──────────────────┤
│ │ │ │
│ User features: │ │ Post features: │
│ - Follow graph │ │ - Text embedding │
│ - Past likes │ │ - Author stats │
│ - Topic prefs │ │ - Engagement rate│
│ - Demographics │ │ - Recency │
│ - Activity time │ │ - Media type │
│ │ │ │
│ ┌─────┐ │ │ ┌─────┐ │
│ │ MLP │ │ │ │ MLP │ │
│ └──┬──┘ │ │ └──┬──┘ │
│ │ │ │ │ │
│ ┌──▼──┐ │ │ ┌──▼──┐ │
│ │128-d│ │ │ │128-d│ │
│ │embed│ │ │ │embed│ │
│ └──┬──┘ │ │ └──┬──┘ │
└───────┼──────────┘ └───────┼──────────┘
│ │
└───────┐ ┌──────────┘
│ │
cosine_sim(u, i) → relevance score
class TwoTowerModel(nn.Module):
"""Dual encoder for user-item matching."""
def __init__(self, user_dim, item_dim, embed_dim=128):
super().__init__()
self.user_tower = nn.Sequential(
nn.Linear(user_dim, 512),
nn.ReLU(),
nn.Linear(512, 256),
nn.ReLU(),
nn.Linear(256, embed_dim),
nn.LayerNorm(embed_dim)
)
self.item_tower = nn.Sequential(
nn.Linear(item_dim, 512),
nn.ReLU(),
nn.Linear(512, 256),
nn.ReLU(),
nn.Linear(256, embed_dim),
nn.LayerNorm(embed_dim)
)
def forward(self, user_features, item_features):
user_embed = self.user_tower(user_features)
item_embed = self.item_tower(item_features)
# Cosine similarity as relevance score
score = F.cosine_similarity(user_embed, item_embed)
return score
Установить recommendation-algorithm-design в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл recommendation-algorithm-design?
Complete mastery guide for designing social media recommendation algorithms — understanding candidate generation, ranking models, engagement prediction, content graph modeling, collaborative filtering, embedding spaces, real-time personalization, exploration vs exploitation tradeoffs, feedback loops, filter bubble mitigation, and building recommendation systems from scratch. Based on analysis of production systems like Twitter/X's open-source algorithm, with applications to crypto community feeds and DeFi content curation.
Как установить скилл recommendation-algorithm-design?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл recommendation-algorithm-design запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic