Skip to content
Back to skills

Retrieval And Utilities

ASecurity

"Dense semantic search utilities, retrieve-and-rerank

  • 247 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 9, 2026
ai-agentspythonapi

Works with

  • cli
  • api

Security analysis

A100/100

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

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill retrieval-and-utilities --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Retrieval And Utilities?

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

Security grade badge for Retrieval And Utilities
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-retrieval-and-utilities/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-retrieval-and-utilities)

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: retrieval-and-utilities
description: "Dense semantic search utilities, retrieve-and-rerank
  orchestration, hard-negative mining, embedding quantization, similarity
  helpers, corpus chunking, and vector DB/service cautions for
  sentence-transformers."
disable-model-invocation: true
metadata:
  disco-role: operating
license: Apache 2.0
---

# Retrieval and Utilities

Use this sub-skill when a task asks for dense retrieval, semantic search over precomputed embeddings, a retrieve-then-rerank handoff, hard-negative mining, embedding quantization for retrieval, paraphrase/community utilities, or similarity helper selection.

## Route the task

- For dense top-k search over embeddings, use `sentence_transformers.util.semantic_search`; see `references/api-reference.md`.
- For two-stage retrieval, first preserve `corpus_id` from dense hits, then hand the selected texts and IDs to a `CrossEncoder`; see `references/retrieval-reference.md`.
- For dataset construction, use `sentence_transformers.util.mine_hard_negatives` with explicit dataset column names, output format, and score/margin filters.
- For memory or latency pressure, tune `query_chunk_size`, `corpus_chunk_size`, `top_k`, embedding precision, and optional FAISS/USearch/vector DB integration.
- For cosine/dot/euclidean/manhattan behavior, paraphrase mining, community detection, and quantized embedding search, use the API notes before writing code.

## Boundaries

- Low-level `SentenceTransformer.encode` choices belong in `../embeddings-and-similarity/SKILL.md`.
- CrossEncoder constructor, prediction, ranking, and activation details belong in `../reranking-cross-encoder/SKILL.md`.
- SparseEncoder-specific search belongs in `../sparse-encoder-search/SKILL.md`.
- Training losses and evaluators belong in `../evaluation-and-training/SKILL.md`.

## Fast checks

- Run `python scripts/semantic_search_demo.py --help` to inspect the safe demo CLI.
- Run `python scripts/semantic_search_demo.py --toy-tensors` for a network-free semantic search example.
- Use `python scripts/semantic_search_demo.py --model MODEL_NAME_OR_PATH --local-files-only` only when the model is already available locally.

## References

- API contracts: `references/api-reference.md`
- Retrieval workflows: `references/retrieval-reference.md`
- Failure modes: `references/troubleshooting.md`
- Demo script: `scripts/semantic_search_demo.py`

Files in this skill

  • SKILL.md2.3 KB
  • references/api-reference.md6.4 KB
  • references/retrieval-reference.md6.8 KB
  • references/troubleshooting.md5.2 KB
  • scripts/semantic_search_demo.py4.3 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.