vector-index-tuning – DevOps & Infrastructure skill for AI agents
Optimize vector index performance for latency, recall, and memory. Use when tuning HNSW parameters, selecting quantization strategies, or scaling vector search infrastructure.
Install the vector-index-tuning skill with one command
Pick the tool you use, copy the command and paste it in your terminal. The skill lands in that tool's skills folder and is ready in your next session.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/vector-index-tuning-c7f50.tgz | tar xz -C ~/.claude/skills
Call it in Claude Code: /vector-index-tuning – then describe the task you want done.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/vector-index-tuning-c7f50.tgz | tar xz -C ~/.codex/skills
Call it in Codex: $vector-index-tuning – then describe the task you want done.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/vector-index-tuning-c7f50.tgz | tar xz -C ~/.hermes/skills
Call it in Hermes Agent: /vector-index-tuning – then describe the task you want done.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/vector-index-tuning-c7f50.tgz | tar xz -C ~/.deepcode/skills
Call it in DeepSeek: /vector-index-tuning – then describe the task you want done.
SKILL.md content
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
Related skills
- expo-cicd-workflows – Helps understand and write EAS workflow YAML files for Expo projects. Use this skill…
- expo-deployment – Deploy Expo apps with EAS: build and submit iOS and Android releases, configure build…
- watchers – Poll RSS, JSON APIs, and GitHub with watermark dedup.
- runbook-generator – Generate operational runbooks from a service name — deployment, incident response…
- fedora-hyprland-installer – Install, configure, verify, repair, update, and uninstall Hyprland on Fedora Linux with…
- fedramp-compliance – Implement FedRAMP requirements for federal cloud services. Configure NIST 800-53…
- firebase-app-platform – Build and operate apps on Firebase using Auth, Firestore, Cloud Functions, and Hosting…
- flutter-expert – Master Flutter development with Dart 3, advanced widgets, and multi-platform deployment.