Vector Index Tuning
Seth HobsonCommunityCreated by Seth Hobson
- Skill
- Guidelines
- Data and AI
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
Vector Index Tuning provides a structured approach to optimizing vector search infrastructure. It covers index selection based on data scale, HNSW parameter configuration, and various quantization strategies to balance memory footprint with search accuracy. The skill includes best practices for benchmarking, monitoring, and maintaining production vector indexes.
What it does
- Provides criteria for selecting index types based on dataset size.
- Explains the impact of HNSW parameters like M, efConstruction, and efSearch.
- Outlines quantization methods including FP16, INT8, and Product Quantization.
- Offers templates for benchmarking HNSW configurations.
- Includes code for implementing scalar quantization.
- Defines best practices for production monitoring and maintenance.
When to use it
- When tuning HNSW parameters for specific recall or latency targets.
- When selecting a quantization strategy to optimize memory usage.
- When scaling vector search infrastructure to handle millions of vectors.
- When troubleshooting performance bottlenecks in vector search.
- When planning for index maintenance and reindexing cycles.
Advantages
- Helps balance the trade-off between search speed and accuracy.
- Provides clear guidance on memory optimization through quantization.
- Includes actionable templates for benchmarking and parameter recommendation.
- Encourages data-driven tuning using real query benchmarks.
Usage examples
- “How should I choose an index type for 50 million vectors?”
- The skill recommends using IVF + PQ or DiskANN for datasets exceeding 100 million vectors, suggesting that for 50 million, these advanced structures are appropriate to manage memory and latency.
- “What are the recommended HNSW parameters for high recall?”
- The skill explains that increasing M and efSearch improves recall, and provides a template function to calculate optimal parameters based on target recall and latency requirements.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/wshobson/vector-index-tuning/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip vector-index-tuning.zip -d .agents/skills
Documentation by Seth Hobson
Vector Index Tuning
Guide to optimizing vector indexes for production performance.
When to Use This Skill
Tuning HNSW parameters
Implementing quantization
Optimizing memory usage
Reducing search latency
Balancing recall vs speed
Scaling to billions of vectors
Core Concepts
1. Index Type Selection
Data Size Recommended Index
────────────────────────────────────────
< 10K vectors → Flat (exact search)
10K - 1M → HNSW
1M - 100M → HNSW + Quantization
> 100M → IVF + PQ or DiskANN2. HNSW Parameters
| Parameter | Default | Effect |
|---|---|---|
| M | 16 | Connections per node, ↑ = better recall, more memory |
| efConstruction | 100 | Build quality, ↑ = better index, slower build |
| efSearch | 50 | Search quality, ↑ = better recall, slower search |
3. Quantization Types
Full Precision (FP32): 4 bytes × dimensions
Half Precision (FP16): 2 bytes × dimensions
INT8 Scalar: 1 byte × dimensions
Product Quantization: ~32-64 bytes total
Binary: dimensions/8 bytesTemplates and detailed worked examples
Full template library and detailed worked examples live in references/details.md. Read that file when you need the concrete templates.
Best Practices
Do's
Benchmark with real queries - Synthetic may not represent production
Monitor recall continuously - Can degrade with data drift
Start with defaults - Tune only when needed
Use quantization - Significant memory savings
Consider tiered storage - Hot/cold data separation
Don'ts
Don't over-optimize early - Profile first
Don't ignore build time - Index updates have cost
Don't forget reindexing - Plan for maintenance
Don't skip warming - Cold indexes are slow
Files
- ATTRIBUTION.mdAdded by AutoGineer995 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md2.3 KiB
- references/details.md12.9 KiB
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs Node.js
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- Seth Hobson
- Publisher
- Seth Hobson (Community)
- Source
- wshobson/agents · plugins/llm-application-dev/skills/vector-index-tuning · commit 4bde316
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Seth Hobson or Seth Hobson.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download vector-index-tuning.zip