Skip to content
Back to skills

Similarity Search

ASecurity

Score text pairs and run dense or BM25 retrieval with text2vec.

  • 247 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 9, 2026
ai-agentsfastapiapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill similarity-search --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Similarity Search?

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

Security grade badge for Similarity Search
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-similarity-search/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-similarity-search)

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: similarity-search
description: "Score text pairs and run dense or BM25 retrieval with text2vec."
disable-model-invocation: true
metadata:
  disco-role: operating
license: Apache 2.0
---

# Similarity Search

Use this sub-skill when you need sentence similarity, pair scoring, semantic search, or lexical BM25 retrieval in `text2vec`.

## Route here for

- Pairwise similarity with `Similarity`, `SimilarityType`, `EmbeddingType`, `get_score`, `get_scores`, and `similarity`.
- Dense retrieval helpers with `cos_sim` and `semantic_search` for tensor or NumPy embeddings.
- Raw-text BM25 retrieval with Jieba segmentation and top-k ranking.
- Aligned pair scoring from JSONL, CSV, or TSV without accidentally building a full cross-product matrix.
- Query-to-corpus retrieval workflows where you want either no-network BM25 now or dense search from cached embeddings later.

## Do not handle here

- Embedding initialization, batch vector generation, or CLI embedding export: route to `embeddings`.
- Fine-tuning, training data validation, and negative mining: route to `training-finetuning`.
- Benchmark-style model quality evaluation and leaderboard comparison: route to `evaluation-benchmarks`.
- HTTP serving, FastAPI, Jina, or Gradio deployment: route to `serving-deployment`.

## Operating workflow

1. Decide whether the task is pair scoring or retrieval.
2. For pair scoring, choose vector-only scoring or model-backed scoring.
3. For retrieval, choose BM25 when you want a no-network lexical path, or dense search when you already have embeddings or a cached model.
4. Read the API shapes in [references/api-reference.md](references/api-reference.md).
5. Use the bundled helpers in [scripts/](scripts/) for safe JSONL/CSV/TSV workflows.
6. Check [references/troubleshooting.md](references/troubleshooting.md) if scores, shapes, or downloads look wrong.

## Bundled scripts

- [`scripts/score_pairs.py`](scripts/score_pairs.py): score aligned text pairs from JSONL, CSV, or TSV using supplied vectors or `Similarity`.
- [`scripts/search_corpus.py`](scripts/search_corpus.py): search a corpus with BM25 or dense embeddings and return top-k hits.

Start with [references/workflows.md](references/workflows.md) for ready-to-run patterns and [references/api-reference.md](references/api-reference.md) for return shapes.

Files in this skill

  • SKILL.md2.3 KB
  • references/api-reference.md4.8 KB
  • references/troubleshooting.md4.4 KB
  • references/workflows.md4.6 KB
  • scripts/score_pairs.py12.6 KB
  • scripts/search_corpus.py15.1 KB

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.

Comments

Loading comments…

Newsletter

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