
Vector Index Tuning
Benchmarks HNSW parameters (M, efConstruction, efSearch) against your actual data to find the sweet spot between recall and latency. Implements scalar quantization, product quantization, and binary compression with memory usage estimates. The parameter tuning function runs systematic tests across different configurations and calculates recall@k, which beats guessing at settings. Also includes quantization strategies that can cut memory usage by 75% with minimal recall loss. Most useful when you're hitting memory limits or search latency SLAs with large vector datasets over 100K embeddings.
- skills.sh installs
- 11K
- GitHub stars
- 42.4K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add wshobson/agents --skill vector-index-tuning --agent claude-codeInstalls into .claude/skills of the current project.
Files
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 DiskANN
2. 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
Sponsors
Promote your product hereReach 125k+ visitors monthlyPromote your product hereReach 125k+ visitors monthly
Agent CaffeineSponsoredClose your lid, come back to finished work
SnugSponsoredThe clipboard manager for the AI eraPromote your product hereReach 125k+ visitors monthly
WaxSponsoredBlock anything with supervision, without erasing your iPhonePromote your product hereReach 125k+ visitors monthly
knobsSponsoredSee your site on any phone, any day, in any language
Details
- Repository
- github.com/wshobson/agents
- Categories
- AI & Agent Building, Debugging, Marketing & SEO, Cloud & Infrastructure
More from wshobson/agents
All 174- Hybrid Cloud Networking11K
- Turborepo Caching11K
- Pci Compliance10.9K
- Projection Patterns10.9K
- Employment Contract Templates10.9K
- Slo Implementation10.8K
- Defi Protocol Templates10.8K
- Team Composition Analysis10.7K
- Mtls Configuration10.7K
- On Call Handoff Patterns10.7K
- Service Mesh Observability10.7K
- Track Management10.7K
- Bazel Build Optimization10.6K
- Istio Traffic Management10.6K
- Nft Standards10.6K
- Linkerd Patterns10.6K
- Parallel Debugging10.4K
- Parallel Feature Development10.3K
- Task Coordination Strategies10.2K
- Multi Reviewer Patterns10.2K
- Team Communication Protocols10K
- Team Composition Patterns10K
- Evaluation Methodology7.6K
- Hads6.9K
Recommended
More AI & Agent Building1
sandbox-agentrivet-dev/skillsDeploy, configure, and integrate Sandbox Agent - a universal API for orchestrating AI coding agents (Claude Code, Codex, OpenCode, Amp) in sandboxed environment10.7Kskills.sh installs
2
agent-platform-deploygoogle/skillsDeploy open models or custom weights from Model Garden to Agent Platform endpoints, check the status of an in-progress deployment operation, or clean up resourc9.8Kskills.sh installs
3
mcp-buildermcp-use/mcp-useBuild, modify, debug, or review TypeScript MCP servers with mcp-use.9.6Kskills.sh installs
4
agent-platform-tuninggoogle/skillsAgent Platform Model Tuning. Use when you need to fine-tune open models or Gemini models using Agent Platform infrastructure. Don't use for model training outsi9.5Kskills.sh installs
5
agent-platform-tuning-managementgoogle/skillsManages GenAI tuning jobs in Agent Platform. Use this to list, get, or cancel ongoing model tuning jobs. Don't use for fine-tuning models (use `agent-platform-t9.4Kskills.sh installs
6
agent-platform-model-registrygoogle/skillsAgent Platform Model Registry Management. Use when you need to upload, list, describe, update, or delete machine learning models (and their versions) in the Age9.3Kskills.sh installs