Skip to content
Back to skills

Recsys And Ranking

ASecurity

Playbook for Kaggle recommendation and ranking competitions (OTTO, H&M, session-based recommendation, search relevance, learning-to-rank) — candidate generation (co-visitation, recency, popularity, embeddings), feature engineering for user-item pairs, LambdaRank/GBDT rankers, MAP@K/NDCG/recall validation, and memory-efficient pipelines. Use when predictions are ranked lists of items per user/query/session.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 5, 2026
ai-agentsgo

Works with

  • cli

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add TranBaDat2607/claude-code-kaggle-grandmaster --skill recsys-and-ranking --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Recsys And Ranking?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Recsys And Ranking
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tranbadat2607-recsys-and-ranking/badge)](https://www.skillsdirectory.com/skills/tranbadat2607-recsys-and-ranking)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: recsys-and-ranking
description: Playbook for Kaggle recommendation and ranking competitions (OTTO, H&M, session-based recommendation, search relevance, learning-to-rank) — candidate generation (co-visitation, recency, popularity, embeddings), feature engineering for user-item pairs, LambdaRank/GBDT rankers, MAP@K/NDCG/recall validation, and memory-efficient pipelines. Use when predictions are ranked lists of items per user/query/session.
---

# RecSys & Ranking Playbook

The winning architecture is almost always **two-stage**: generate ~50–200 candidates per
user/session with cheap methods (maximise recall@N), then re-rank them with a GBDT ranker using
rich user–item features.

## 1. Validation

Reproduce the test construction in time: train on weeks 1..k, label week k+1 (or truncate
sessions at a random point like the test). Measure **candidate recall@N** (upper bound for the
ranker) and the final metric (MAP@12, recall@20, NDCG). Use a subsample of users for speed;
confirm on more.

## 2. Candidate generation (union of sources)

- User history: recently interacted / repurchased items (often the strongest).
- Co-visitation matrices (item → items seen together within a time window), weighted by time
  and event type (click/cart/order); separate matrices for clicks vs buys.
- Popularity: global and per segment (age bucket, region, category), recent-window popularity.
- Embedding similarity: item2vec/word2vec on sessions, ALS/BPR (implicit), two-tower models;
  approximate kNN (faiss).
- Item-attribute similarity (same product group/colour), "bought together".
Track each source's recall contribution; tune N per source.

## 3. Ranker features

- User: activity counts, recency, diversity, price sensitivity, preferred categories.
- Item: popularity over multiple windows and trends, price, conversion rates, attributes.
- User × item: past interactions with the item / its category, time since last interaction,
  co-visitation scores from each source, candidate rank within each source, embedding similarity.
- Context: time to target period, seasonality.
Labels: whether the candidate is interacted with in the target window.

## 4. Ranking models

LightGBM `lambdarank` / XGBoost `rank:ndcg` / CatBoost `YetiRank` with query groups, or binary
classifiers (often comparable). Negative subsampling for speed; ensemble rankers trained on
different windows.

## 5. Engineering

Data is huge: use polars/cuDF, int32 ids, parquet, chunked processing per user shard, GPU
co-visitation computation. Cache candidates & features per week. Rankers: GPU XGBoost/CatBoost on millions of
pairs. How-to and the hardware limits (cuDF needs a T4, not a P100; Linux or WSL2): `compute-efficiency`
(`references/tabular.md`).

## 6. Search relevance / LTR with text

Cross-encoders or LLM re-rankers over (query, document) pairs; GBDT stack over BM25,
embedding similarities, and cross-encoder scores; group CV by query.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.