Skip to content
Back to skills

Vector Database Design

ASecurity

Chooses the index type, embedding dimensions, chunking and metadata filters for a vector store, with recall checked against a test set.

  • 3 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added November 15, 2026
ai-agentsdatabase

Security analysis

A100/100

Scanned November 15, 2026

npx -y skills add workspace-templates/ai-agent-templates --skill vector-database-design --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Vector Database Design?

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

Security grade badge for Vector Database Design
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/workspace-templates-vector-database-design/badge)](https://www.skillsdirectory.com/skills/workspace-templates-vector-database-design)

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: vector-database-design
description: Chooses the index type, embedding dimensions, chunking and metadata filters for a vector store, with recall checked against a test set.
---

# Vector database design

Decide from data size, query shape and filters, not from what a tutorial used.

## Steps

1. Ask or measure: number of vectors now and in a year, update rate, query rate, latency target, and which filters every query needs (tenant, language, date, access level).
2. Pick the embedding model first. Note its dimensions and max input length. Higher dimensions cost memory and speed; test whether a truncated or smaller variant keeps recall.
3. Chunk by meaning: split on headings and paragraphs, 200 to 500 tokens, with small overlap. Store the source ID, position and title with each chunk.
4. Choose the index. Under about 100k vectors, exact search is often fast enough and has perfect recall. Beyond that use HNSW for low latency, or IVF with quantization when memory is the limit. Write down the tuning parameters (for HNSW: M, efConstruction, efSearch).
5. Design metadata: only fields you filter on, indexed, with fixed types. Enforce tenant and permission filters inside the query, never after retrieval.
6. Build a test set of 30 to 100 real questions with known correct chunks. Measure recall at 5 and 10 against exact search.
7. Add hybrid search (keyword plus vector) when queries contain names, codes or rare terms.

## Rules

- Never mix embeddings from two models in one index.
- Store the model name and version with every vector so you can re-embed later.

## Report

The chosen design with reasons, the parameters, and the measured recall and latency.

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.

View all in ai-agents →

Comments

Loading comments…

Newsletter

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