Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

opensearch-function-scoring-algorithms

БесплатноБез исполняемых скриптовНе проверен

Search relevance and ranking on OpenSearch/Elasticsearch for a two-sided marketplace — candidate retrieval (hybrid BM25 + kNN, RRF, two-tower EBR), base…

pproencaот pproenca★ 231 звезда на GitHub

Об этом скилле

Marketplace-Research OpenSearch Function Scoring Best Practices

A reference distillation of research-backed algorithms for ranking in two-sided marketplaces (Airbnb, Uber Eats, DoorDash, Etsy, eBay, Booking.com) implemented on OpenSearch or Elasticsearch. Contains 56 rules across 9 categories, prioritised by cascade effect in the search ranking pipeline. Each rule explains the WHY (the cascade or the bias it corrects), shows incorrect-vs-correct code (OpenSearch JSON queries, Painless scripts, Python pre-processing, evaluation methodology), and links to the canonical source — KDD/SIGIR/WSDM papers, the OpenSearch documentation, and the engineering blogs of the marketplaces that proved these patterns at scale.

When to Apply

Reach for this skill when:

  • Designing a new marketplace search system on OpenSearch or Elasticsearch from scratch
  • Tuning function_score / rank_feature / script_score queries that aren't moving the needle
  • Setting up hybrid retrieval (BM25 + dense vectors) with Reciprocal Rank Fusion
  • Choosing between HNSW and IVF for billion-scale ANN indexes
  • Adding personalization via listing/user embeddings or two-tower architectures
  • Correcting position bias in click logs before retraining an LTR model
  • Designing exposure-fairness or new-listing cold-start exposure allocation
  • Composing decay functions (gauss / exp / linear) over geo + date + freshness
  • Diversifying the top window with MMR, DPP, or per-host caps
  • Debugging "why does my top-10 show 8 listings from one host?" or "why does ranking favor popular incumbents?"
  • Building offline evaluation infrastructure — graded judgment sets, NDCG@k pipelines, ablation studies, regression query suites
  • Designing A/B tests for ranking changes — MDE / power / sample-size pre-computation, CUPED variance reduction, online-offline correlation calibration
  • Attributing lift to specific scoring components — "did my new bias-correction help, or was it the embeddings, or both?"

The rules apply to any OpenSearch/Elasticsearch-backed marketplace search regardless of vertical — accommodation, food delivery, restaurants, services, jobs, secondhand goods, real estate. Triggers include "marketplace ranking", "search relevance", "function_score", "rank_feature", "script_score", "kNN", "hybrid search", "RRF", "learning to rank", "embedding-based retrieval", "two-tower", "position bias", "MMR", "supply fairness", "Pareto multi-objective", "NDCG", "judgment set", "ablation study", "CUPED", "A/B sample size", "ranking eval", and "why are my search results bad".

The Search Ranking Lifecycle

Categories are derived from the marketplace search ranking pipeline. Earlier stages cascade — a miss in recall (stage 1) cannot be repaired by any downstream boost, and a wrong base relevance multiplies through every functional score:

Query → [1] Recall → [2] Base Relevance → [3] Quality Signals → [4] Personalization
      → [5] Geo/Time Decay → [6] Marketplace Balance → [7] Diversity Re-rank → Results
                                                            ↑
                                          [8] Bias Correction (applied across all stages
                                                       and into training)
                                                            ↑
                                          [9] Evaluation & Measurement (the meta-layer:
                                                       judgment sets, NDCG, ablation, A/B
                                                       sizing, CUPED — without these you
                                                       can't tell if any rule helped)

Rule Categories by Priority

Priority Category Impact Prefix Rules
1 Candidate Retrieval & Recall CRITICAL recall- 6
2 Base Relevance & Field Scoring CRITICAL rel- 7
3 Quality Signals & Confidence Bounds HIGH qual- 6
4 Personalization & Embeddings HIGH pers- 7
5 Spatial & Temporal Decay HIGH decay- 5
6 Two-Sided Marketplace Balance HIGH market- 7
7 Bias Correction & Online Learning HIGH bias- 6
8 Evaluation & Measurement HIGH eval- 7
9 Diversity & Re-ranking MEDIUM-HIGH div- 5

Quick Reference

1. Candidate Retrieval & Recall (CRITICAL)

Полный SKILL.md на GitHub

Установить opensearch-function-scoring-algorithms в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

AGENTS.mdassets/templates/_template.mdmetadata.jsonreferences/_sections.mdreferences/bias-click-models.mdreferences/bias-counterfactual-eval.mdreferences/bias-interleaved-evaluation.mdreferences/bias-popularity-debiasing.mdreferences/bias-position-ips.mdreferences/bias-thompson-sampling.mdreferences/decay-exp-freshness.mdreferences/decay-gauss-geo.mdreferences/decay-multi-field-composition.mdreferences/decay-offset-noise.mdreferences/decay-scale-calibration.mdreferences/div-category-diversity.mdreferences/div-dpp-quality-diversity.mdreferences/div-max-per-host.mdreferences/div-mmr-rerank.mdreferences/div-window-penalty.mdreferences/eval-ab-sample-size-mde.mdreferences/eval-ablation-attribution.mdreferences/eval-cuped-variance-reduction.mdreferences/eval-graded-judgment-set.mdreferences/eval-ndcg-primary-metric.mdreferences/eval-online-offline-correlation.mdreferences/eval-regression-query-suite.mdreferences/market-cold-start-exploration.mdreferences/market-conversion-weighted-ranking.mdreferences/market-host-quality-signals.mdreferences/market-inventory-health.mdreferences/market-pareto-multi-objective.mdreferences/market-price-relevance.mdreferences/market-supply-fairness-lorenz.mdreferences/pers-contextual-features.mdreferences/pers-cross-encoder-rerank.mdreferences/pers-listing-embeddings.mdreferences/pers-multi-modal-embeddings.mdreferences/pers-real-time-session-vector.mdreferences/pers-tower-split-offline-online.md

FAQ

Что делает скилл opensearch-function-scoring-algorithms?

Search relevance and ranking on OpenSearch/Elasticsearch for a two-sided marketplace — candidate retrieval (hybrid BM25 + kNN, RRF, two-tower EBR), base relevance (BM25F, multi_match, LambdaMART), quality signals (Wilson lower bound, Bayesian average, rank_feature saturation/sigmoid), personalization (listing/user/session embeddings), spatial/temporal decay (gauss/exp), marketplace balance (conversion-weighted ranking, supply fairness, Pareto multi-objective), bias correction (IPS, click models, Thompson sampling), empirical evaluation (judgment sets, NDCG, ablation, A/B sizing, CUPED, regression suites), and diversity (MMR, DPP, max-per-host). Triggers on function_score, rank_feature, script_score, kNN, hybrid query, learning-to-rank, two-sided ranking, exposure fairness, NDCG, A/B testing, judgment set construction, ranking ablation, or "why is my OpenSearch ranking bad". Applies to Elasticsearch too — same APIs.

Как установить скилл opensearch-function-scoring-algorithms?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл opensearch-function-scoring-algorithms запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить opensearch-function-scoring-algorithms с