Algo Ecom Bm25
Implement BM25 ranking function for e-commerce product search relevance scoring. Use this skill when the user needs to build a text-based product search engine, improve search result relevance, or replace basic TF-IDF with a more robust ranking function — even if they say 'product search ranking', 'search relevance', or 'BM25 implementation'.
Install
npx skills add asgard-ai-platform/skills --skill algo-ecom-bm25git clone --depth 1 https://github.com/asgard-ai-platform/skills.git /tmp/skills
mkdir -p ~/.claude/skills
cp -r /tmp/skills/algo-ecom-bm25 ~/.claude/skills/algo-ecom-bm25Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# BM25 Ranking Function ## Overview BM25 (Best Matching 25) is an improved TF-IDF ranking function that adds term frequency saturation and document length normalization. Score = Σ IDF(t) × (TF(t,d) × (k₁+1)) / (TF(t,d) + k₁ × (1 - b + b × |d|/avgdl)). Standard parameters: k₁=1.2, b=0.75. The backbone of most text search engines (Elasticsearch, Solr). ## When to Use **Trigger conditions:** - Building product search with text-based relevance ranking - Replacing basic TF-IDF with better document length normalization - Tuning search relevance in Elasticsearch/Solr **When NOT to use:** - When semantic similarity matters more than keyword matching (use embeddings) - For single-field exact matching (simpler methods suffice) ## Algorithm ``` IRON LAW: BM25 Has Two Critical Parameters — k₁ and b k₁ controls term frequency saturation: higher k₁ = more weight to repeated terms. k₁=0 ignores TF entirely (boolean). b controls document length normalization: b=1 fully normalizes by length, b=0 ignores length. Default k₁=1.2, b=0.75 works for most cases but MUST be tuned for your specific corpus. ``` ### Phase 1: Input Validation + Tokenization Tokenize each document to lowercase word tokens. **Remove stop words** before counting — the bundled script drops a standard English stop list (`the, a, an, and, or, but, of, in, on, at, to, for, with, by, from, as, is, are, was, were, be, been, being`). Then build an inverted index: term → list of (document, term
Details
- Skill name
algo-ecom-bm25- Repository
- asgard-ai-platform/skills
- Path
algo-ecom-bm25/SKILL.md- License
- MIT
- Repo updated
- 6 June 2026
FAQ
What does the Algo Ecom Bm25 skill do?
Implement BM25 ranking function for e-commerce product search relevance scoring. Use this skill when the user needs to build a text-based product search engine, improve search result relevance, or replace basic TF-IDF with a more robust ranking function — even if they say 'product search ranking', 'search relevance', or 'BM25 implementation'.
How do I install the Algo Ecom Bm25 skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add asgard-ai-platform/skills --skill algo-ecom-bm25. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Algo Ecom Bm25 popular?
It lives in asgard-ai-platform/skills, which has 248 GitHub stars and 30 forks.
Related skills
Algo Ad Bidding
248asgard-ai-platform/skills
Implement and select ad bidding strategies from manual CPC to automated target-CPA and target-ROAS. Use this skill when the user needs to choose a bidding strategy, set up automated bidding, or optimize bid parameters — even if they say 'what bidding strategy should I use', 'target CPA setup', or 'smart bidding configuration'.
Algo Ad Budget
248asgard-ai-platform/skills
Optimize advertising budget allocation across campaigns using marginal returns analysis. Use this skill when the user needs to distribute budget across multiple campaigns, optimize spend pacing, or maximize overall ROAS under budget constraints — even if they say 'how to split my ad budget', 'campaign budget optimization', or 'diminishing returns on ad spend'.
Algo Ad Ctr
248asgard-ai-platform/skills
Build CTR prediction models for estimating ad click-through rates from features. Use this skill when the user needs to predict click probability, build an ad ranking model, or evaluate ad creative performance — even if they say 'predict click rate', 'ad relevance scoring', or 'which ad will get more clicks'.
Algo Ecom Ranking
248asgard-ai-platform/skills
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'.
Algo Blockchain Smart Contract
248asgard-ai-platform/skills
Design and implement smart contracts as self-executing programmatic agreements on blockchain. Use this skill when the user needs to build automated on-chain logic, evaluate smart contract security, or design tokenized business rules — even if they say 'smart contract development', 'automated agreement', or 'on-chain logic'.
Algo Forecast Prophet
248asgard-ai-platform/skills
Build forecasting models with Meta's Prophet for business time series with holidays and changepoints. Use this skill when the user needs user-friendly time series forecasting, handling of missing data and holidays, or automatic changepoint detection — even if they say 'forecast with Prophet', 'business forecast', or 'easy time series model'.
Browse the most popular Claude skills, all marketing, sales & business skills, or write your own with the skills generator.