Algo ecom ranking
Skill charlieviettq/awesome-agent-skill/.cursor/skills/asgard-ai-platform/algo-ecom-ranking
Design multi-objective e-commerce product ranking combining relevance, conversion, and business metrics. Use this skill when the user needs to build a product ranking system beyond text relevance, balance relevance with commercial objectives, or implement learning-to-rank — even if they say 'product sorting', 'search result ranking', or 'how to rank products'.From its SKILL.md
npx -y skills add charlieviettq/awesome-agent-skill --skill algo-ecom-rankingAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 22 stars22 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
4.3 KB, 883 tokens by cl100k_base, as published. Nobody here has run it
E-Commerce Product Ranking
Overview
E-commerce ranking combines text relevance (BM25) with commercial signals (CTR, conversion rate, revenue, margin) into a unified ranking score. Uses learning-to-rank (LTR) models trained on click and conversion data to optimize for business-relevant outcomes.
When to Use
Trigger conditions:
- Building a product search/browse ranking beyond pure text relevance
- Incorporating business metrics (margin, inventory) into ranking
- Implementing a learning-to-rank pipeline
When NOT to use:
- For pure text search relevance only (use BM25)
- When no click/conversion data exists (start with rule-based ranking)
Algorithm
IRON LAW: Relevance Is Necessary But NOT Sufficient for E-Commerce Ranking
A result that is textually relevant but has zero sales history, no
reviews, and is out of stock serves no one. E-commerce ranking must
balance: relevance (does it match the query?), quality (is it a good
product?), and commercial value (does it generate revenue?).
Phase 1: Input Validation
Collect features per product-query pair: text relevance score (BM25), historical CTR, conversion rate, average rating, review count, price competitiveness, inventory level, margin. Gate: Minimum features available, click data from 30+ days.
Phase 2: Core Algorithm
Rule-based baseline: Score = w₁×relevance + w₂×popularity + w₃×rating + w₄×recency. Manually tune weights.
LTR approach:
- Generate training data from click logs (clicked = positive, skipped = negative, with position debiasing)
- Features: text match, behavioral (CTR, add-to-cart rate), product quality (rating, reviews), freshness, price
- Train: LambdaMART or gradient-boosted ranking model optimizing NDCG
- Blend: final_score = α × LTR_score + (1-α) × business_boost
Phase 3: Verification
Evaluate offline: NDCG@10, MRR. A/B test online: revenue per search, click-through rate, conversion rate. Gate: NDCG improves over baseline, A/B test positive on primary metric.
Phase 4: Output
Return ranked product list with score decomposition.
Output Format
{
"results": [{"product_id": "P123", "rank": 1, "final_score": 0.92, "components": {"relevance": 0.85, "popularity": 0.95, "quality": 0.90}}],
"metadata": {"query": "wireless earbuds", "model": "lambdamart", "ndcg_at_10": 0.72}
}
Examples
Sample I/O
Input: Query "laptop", 500 matching products Expected: Top results balance text match + high conversion + good ratings, not just keyword relevance.
Edge Cases
| Input | Expected | Why |
|---|---|---|
| New product, no history | Rely on text relevance + category avg | Cold start — no behavioral signal |
| Out of stock item | Demote or remove | Showing unavailable products frustrates users |
| Sponsored product | Blend ad rank with organic | Separate sponsored from organic clearly |
Gotchas
- Position bias in training data: Higher-ranked items get more clicks regardless of quality. Debias training data using inverse propensity weighting or randomization experiments.
- Popularity bias: Without diversity controls, popular items dominate rankings. New or niche products get no exposure. Add exploration bonus.
- Revenue optimization ≠ user satisfaction: Ranking by margin pushes expensive products up. Users lose trust if results feel commercially manipulated.
- Feature freshness: Click signals change daily. Retrain or update features frequently. Stale features degrade ranking quality.
- Category-specific models: A single ranking model may not work across all categories. Electronics ranking differs from fashion ranking.
References
- For LambdaMART implementation, see
references/lambdamart.md - For position debiasing techniques, see
references/position-debiasing.md
What ships with it: 3 files
30.8 KB alongside SKILL.md
examples/
- sample_scenario.md6.8 KB
references/
- lambdamart.md13.5 KB
- position-debiasing.md10.5 KB
Gives 0 of the 12 instructions most product growth skills give in 883 tokens
Counted across 728 of the 1,010 authors here whose files we hold, read 2026-08-07
- Read product marketing context before asking questionsin 24 of 728, across 18 files
- Define the ideal customer profilein 21 of 728, across 3 files
- Document a rollback plan before deploymentin 21 of 728, across 12 files
- Analyze the codebase to understand the productin 19 of 728, across 1 file
- Ask clarifying questions about the value propositionin 19 of 728, across 1 file
- Search for companies matching the criteriain 19 of 728, across 1 file
- Look for signals of immediate needin 19 of 728, across 1 file
- Assign a fit score from one to tenin 19 of 728, across 1 file
- Identify the target decision-maker rolein 19 of 728, across 1 file
- Suggest a personalized contact strategyin 19 of 728, across 1 file
- Provide conversation starters for outreachin 19 of 728, across 1 file
- Format results in a scannable markdown templatein 19 of 728, across 1 file
Said here and by no other author read
- combine text relevance with commercial signals
- gate minimum features and thirty days of click data
- tune rule-based weights manually
- generate training data from click logs
- debias training data using inverse propensity weighting
- optimize models for ndcg
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.