Skills · Data & AI

Vector Index Tuning

Unverified30/40

Optimize vector index performance for latency, recall, and memory. Use when tuning HNSW parameters, selecting quantization strategies, or scaling vector search infrastructure.

Originally by wshobson · MIT

Claude CodePartialHas SKILL.md but declares no allowed-tools — Claude Code will ask for permission each time
CursorPartialPlain prose you can paste in — but no Cursor rules file
CodexPartialPlain prose you can paste in — but no AGENTS.md
Gemini CLIPartialPlain prose you can paste in
CopilotPartialPlain prose you can paste in — but no Copilot instructions file
npx agentalley add vector-index-tuning

This command does not work yet — the CLI is still being built. Until then, use Raw in the reader below to take the file.

Who is stuck, and on what

Optimize vector index performance for latency, recall, and memory. Use when tuning HNSW parameters, selecting quantization strategies, or scaling vector search infrastructure.

The whole source

No sign-in, no blur, nothing truncated
vector-index-tuning/SKILL.md70 lines2.3 KBRawView on GitHub
Frontmatter — 2 properties
namevector-index-tuning
descriptionOptimize vector index performance for latency, recall, and memory. Use when tuning HNSW parameters, selecting quantization strategies, or scaling vector search infrastructure.
1---
2name: vector-index-tuning
3description: Optimize vector index performance for latency, recall, and memory. Use when tuning HNSW parameters, selecting quantization strategies, or scaling vector search infrastructure.
4---A5No allowed-tools declared — no way to tell what this skill may touch
5 
6# Vector Index Tuning
7 
8Guide to optimizing vector indexes for production performance.
9 
10## When to Use This Skill
11 
12- Tuning HNSW parameters
13- Implementing quantization
14- Optimizing memory usage
15- Reducing search latency
16- Balancing recall vs speed
17- Scaling to billions of vectors
18 
19## Core Concepts
20 
21### 1. Index Type Selection
22 
23```
24Data Size Recommended Index
25────────────────────────────────────────
26< 10K vectors → Flat (exact search)
2710K - 1M → HNSW
281M - 100M → HNSW + Quantization
29> 100M → IVF + PQ or DiskANN
30```
31 
32### 2. HNSW Parameters
33 
34| Parameter | Default | Effect |
35| ------------------ | ------- | ---------------------------------------------------- |
36| **M** | 16 | Connections per node, ↑ = better recall, more memory |
37| **efConstruction** | 100 | Build quality, ↑ = better index, slower build |
38| **efSearch** | 50 | Search quality, ↑ = better recall, slower search |
39 
40### 3. Quantization Types
41 
42```
43Full Precision (FP32): 4 bytes × dimensions
44Half Precision (FP16): 2 bytes × dimensions
45INT8 Scalar: 1 byte × dimensions
46Product Quantization: ~32-64 bytes total
47Binary: dimensions/8 bytes
48```
49 
50## Templates and detailed worked examples
51 
52Full template library and detailed worked examples live in `references/details.md`. Read that file when you need the concrete templates.
53 
54## Best Practices
55 
56### Do's
57 
58- **Benchmark with real queries** - Synthetic may not represent production
59- **Monitor recall continuously** - Can degrade with data drift
60- **Start with defaults** - Tune only when needed
61- **Use quantization** - Significant memory savings
62- **Consider tiered storage** - Hot/cold data separation
63 
64### Don'ts
65 
66- **Don't over-optimize early** - Profile first
67- **Don't ignore build time** - Index updates have cost
68- **Don't forget reindexing** - Plan for maintenance
69- **Don't skip warming** - Cold indexes are slow
70 

Reviews

Installed this one?Write the first review and take the Trailblazer badge.

Reviews only open after a real install, so this is empty — and we leave it empty rather than invent one.

Alternatives

Also in Data & AI