Vector search — embedding models and dimensions, distance metrics, ANN indexes (HNSW, IVF) and their recall/latency trade-offs, metadata filtering, hybrid search, pgvector vs dedicated stores, re-embedding migrations, multi-tenancy. Use to store and search embeddings (vector database, pgvector, HNSW, embeddings, ANN).
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Vector Databases?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/vectora-os-vector-databases)
---
name: vector-databases
description: Vector search — embedding models and dimensions, distance metrics, ANN indexes (HNSW, IVF) and their recall/latency trade-offs, metadata filtering, hybrid search, pgvector vs dedicated stores, re-embedding migrations, multi-tenancy. Use to store and search embeddings (vector database, pgvector, HNSW, embeddings, ANN).
metadata:
category: ai
---
# Vector databases
## Purpose
Store and query embeddings with the right recall, latency and filtering.
**Use when:** semantic search and RAG storage.
**Not for:** choosing a search product (`decision-analyst`).
## Inputs
- Embedding model, corpus size, filters, latency budget.
## Outputs
- Index config, filtering strategy, benchmark.
## Read first
- [Project Brain](../../../project-brain/README.md) — `npm run brain -- query "vector databases"` for prior decisions, patterns and anti-patterns.
## Steps
1. **Embeddings.** Pick model; record version; plan re-embedding.
Done when version stored with vectors.
2. **Index.** Choose HNSW/IVF params by recall vs latency benchmark.
Done when recall measured against exact search.
3. **Filter.** Pre-filter by tenant and ACL efficiently.
Done when filters do not destroy recall.
4. **Operate.** Backups, reindex procedure, cost.
Done when procedure documented.
## Best practices
- Start with pgvector if Postgres is already used and scale is modest.
- Benchmark with your data.
## Common mistakes
- Mixing embeddings from different models.
- Post-filtering causing empty results.
## Example
pgvector HNSW m=16, ef_search=80: recall@10 0.96 at p95 18 ms for 2M vectors with tenant partial indexes.
## Reusable prompt
```text
Apply the Vector databases skill (.agents/skills/vector-databases/SKILL.md).
Context: {{task card or question; links to PRD, ADRs, code paths}}
Constraints: {{approved thresholds, deadlines, allowed files}}
Choose embedding and index settings by benchmark, design filtering and re-embedding operations.
Return: Index config, filtering strategy, benchmark..
Cite evidence (file:line, command output, source) for every claim; list open questions separately.
```