Vector Index Tuning skill for Claude

Optimize vector index performance for latency, recall, and memory.

When Claude uses it

Use when tuning HNSW parameters, selecting quantization strategies, or scaling vector search infrastructure.

Vector Index Tuning SKILL.md

The full skill file from wshobson/agents (MIT).

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

ParameterDefaultEffect
M16Connections per node, ↑ = better recall, more memory
efConstruction100Build quality, ↑ = better index, slower build
efSearch50Search 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

How to install Vector Index Tuning

Claude Code

Copy the skill into your personal skills folder (or into .claude/skills/ inside a project):

npx degit wshobson/agents/plugins/llm-application-dev/skills/vector-index-tuning#main ~/.claude/skills/vector-index-tuning

Codex

npx degit wshobson/agents/plugins/llm-application-dev/skills/vector-index-tuning#main ~/.codex/skills/vector-index-tuning

Claude.ai and Claude Desktop

Download the skill folder from GitHub, zip it, and upload it under Settings → Capabilities → Skills.

Frequently asked questions

+What does the Vector Index Tuning skill do?

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

+How do I install Vector Index Tuning in Claude Code?

Copy the skill folder into ~/.claude/skills/vector-index-tuning, for example with "npx degit wshobson/agents/plugins/llm-application-dev/skills/vector-index-tuning#main ~/.claude/skills/vector-index-tuning". Claude Code loads it automatically and uses it when a task matches.

+Does Vector Index Tuning work with ChatGPT or Codex?

Yes. Vector Index Tuning uses the open SKILL.md format. In Codex, put the folder in ~/.codex/skills/vector-index-tuning. In Claude.ai, zip the folder and upload it under Settings → Capabilities → Skills.

+Is Vector Index Tuning free?

Vector Index Tuning is published on GitHub by wshobson under the MIT license, which allows free use.

Related ai agents & skills skills

  1. Grill Me

    A relentless interview to sharpen a plan or design.

    mattpocock/skills★ 327k
  2. Skill Creator

    Official

    Create new skills, modify and improve existing skills, and measure skill performance.

    anthropics/skills★ 197k
  3. Caveman

    Terse caveman voice: answer first, fluff gone, every technical fact kept.

    JuliusBrussee/caveman★ 121k
  4. Workflow Orchestration Patterns

    Design durable workflows with Temporal for distributed systems.

    wshobson/agents★ 43k
  5. Agent Memory

    Use when an agent keeps relearning the same correction, CLAUDE.md has grown unreadable, or you need to trace where a remembered rule came…

    alirezarezvani/claude-skills★ 30k
  6. Caveman

    Terse mode: drop filler, articles and pleasantries, keep technical accuracy, about 75% fewer tokens, and stay in it.

    alirezarezvani/claude-skills★ 30k
  7. Cinematic Shot Prompting

    Use when creating camera movement, cinematic angles, or motion prompts for AI video generators like Runway Gen-3, Kling, and Luma.

    alirezarezvani/claude-skills★ 30k
  8. Claude Coach

    Use when the user wants to get better at using Claude ('coach me', 'teach me Claude tricks', 'make me a power user').

    alirezarezvani/claude-skills★ 30k
  9. Fable Goal

    Use when the user wants a /goal prompt rather than the build itself ('/fable-goal', 'turn this into a goal prompt', 'write the prompt that…

    alirezarezvani/claude-skills★ 30k

See all ai agents & skills skills →

More skills from wshobson

  1. Vision Sft

    Fine-tune vision-language models (VLMs) with supervised learning on image+text data.

    wshobson/agents★ 43k
  2. Visual Design Foundations

    Apply typography, color theory, spacing systems, and iconography principles to create cohesive visual designs.

    wshobson/agents★ 43k
  3. Visual Edit Precision

    Use when making UI/frontend changes guided by visual context, when the user selects elements visually, draws annotations, or provides…

    wshobson/agents★ 43k

All skills by wshobson →

Give your whole team an AI agent with skills

Cody runs managed AI agents your team can message in Slack, Teams, WhatsApp and the web, with 50+ business integrations, scheduled tasks and memory. No terminal required.