Skip to main content
skill Claude Code CX Codex Cursor

vector-index-tuning — Claude Code skill: tuning vector indexes

This skill tunes vector indexes for latency, recall, and memory. Use it when adjusting HNSW, choosing quantization, or scaling vector search.

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add wshobson/agents
/plugin install llm-application-dev@claude-code-workflows
Open on GitHub

What vector-index-tuning does

vector-index-tuning covers index selection by dataset size, from exact Flat search to HNSW, HNSW with quantization, IVF + PQ, and DiskANN. It helps connect latency, recall, and memory requirements to an index design.

The skill explains HNSW parameters such as M, efConstruction, and efSearch, along with FP32, FP16, INT8, Product Quantization, and Binary. Templates and worked examples are available in references/details.md. Use real queries for benchmarking, watch recall over time, and account for build time, warming, and reindexing.

Install it when you are tuning vector search or planning to scale it. For a small index with no latency or memory pressure, the extra guidance may be unnecessary.

What it helps with

  • choose an index type for a given vector count
  • tune HNSW for a recall and speed tradeoff
  • reduce vector memory with a quantization strategy
  • check build time, warming, and reindexing costs
  • plan vector search for billions of vectors

Example prompts for the agent

  • Tune the HNSW parameters for these real queries and explain the recall and latency tradeoffs.
  • Compare FP16, INT8, and Product Quantization for this vector index.
  • Review this vector search scaling plan, including warming and reindexing.

How to install vector-index-tuning

1Plugin marketplace

/plugin marketplace add wshobson/agents
/plugin install llm-application-dev@claude-code-workflows

This installs the whole llm-application-dev plugin with all its skills

2Skills CLI (Vercel)

npx skills add wshobson/agents --skill vector-index-tuning -a claude-code

3Manually: put the files in place

~/.claude/skills/vector-index-tuning/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/vector-index-tuning/

From the same set213

The whole set →
typescript-advanced-types Seth Hobson Guides an agent through advanced TypeScript types, from generics to conditional and mapped types. Use it for typed libraries, API clients, or strict configuration objects. Claude Code CX Codex Cursor 92,169installs tailwind-design-system Seth Hobson Helps build design systems with Tailwind CSS v4, from theme tokens to component variants. Use it when a project needs shared UI patterns. Claude Code CX Codex Cursor 70,180installs brand-landingpage Travis D. Elliott This skill interviews you about the product and its visual direction, then builds a landing page through Stitch. Use it when there’s no established design yet. Claude Code CX Codex Cursor 39,476installs python-testing-patterns Seth Hobson This skill guides Python testing with pytest, fixtures and mocks. Use it when building a test suite or tracking down failing checks. Claude Code CX Codex Cursor 36,943installs python-performance-optimization Seth Hobson This skill profiles Python code to locate CPU and memory bottlenecks. Use it when an application responds slowly or consumes too many resources. Claude Code CX Codex Cursor 35,675installs nextjs-app-router-patterns Seth Hobson This skill covers Next.js App Router patterns for rendering, routing, and data fetching. Use it when starting an App Router project or moving from Pages Router. Claude Code CX Codex Cursor 32,529installs api-design-principles Seth Hobson Use this skill to plan or review REST and GraphQL APIs. It helps when writing a specification or setting API conventions for a team. Claude Code CX Codex Cursor 30,348installs code-review-excellence Seth Hobson This skill guides pull request reviews, catches logic and security issues, and helps teams give specific feedback. Use it for review standards or developer mentoring. Claude Code CX Codex Cursor 30,193installs

Similar

fal-3d nexu-io Skill for creating 3D models from text or images via fal.ai. Useful for game assets, AR previews, product mockups, and concept sculpting. Claude Code CX Codex Cursor +1 2,800installs google-cloud-solution-hybrid-search-alloydb official google This skill helps design and validate AlloyDB hybrid search, combining semantic retrieval with keyword search and structured SQL filters. Claude Code Gemini CLI CX Codex 3,300installs venice-image-generate nexu-io Connects agent workflows to Venice AI image generation endpoints and styles. It helps generate visual assets directly from developer prompts. Claude Code CX Codex Cursor +1 2,700installs replicate nexu-io Discovers, compares, and runs AI models through Replicate's API for image and video generation pipelines. Claude Code CX Codex Cursor +1 2,700installs skill-creator official anthropics Creates and refines skills, then tests them with prompts, evaluations, and performance checks. Claude Code Claude.ai 414,180installs writing-for-agents Matt Pocock Guidance for writing skills and agent-facing documents. Use it when editing AGENTS.md, CLAUDE.md, or reference files reached from them. Claude Code 466,719installs media-use heygen-com Finds or generates media for HyperFrames videos, including voiceovers, music, cutouts, and color grades. Stores files locally in assets. Claude Code CX Codex Cursor +1 1,100,000installs mcp-builder official anthropics This skill walks through building an MCP server in TypeScript or Python, from reading the protocol spec to writing tests and evaluation questions. Claude Code Claude.ai 130,949installs

Questions about vector-index-tuning

How do I install vector-index-tuning in Claude Code?

Run npx skills add wshobson/agents --skill vector-index-tuning -a claude-code. The skill file is placed at ~/.claude/skills/vector-index-tuning/SKILL.md.

What does vector-index-tuning do?

It guides index selection and tuning for HNSW, quantization, memory, latency, and recall. It also covers checks for scaling, warming, and reindexing.

Which HNSW parameters does the skill cover?

It covers M, efConstruction, and efSearch. These affect recall, memory use, index build quality, and search latency.

Source text

SKILL.md · MIT
---
name: vector-index-tuning
description: Optimize vector index performance for latency, recall, and memory. Use when tuning HNSW parameters, selecting quantization strategies, or scaling vector search infrastructure.
---

# 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

```
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 bytes
```

## Templates 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

© Seth Hobson · MIT · wshobson/agents

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor