vector-index-tuning

Tune HNSW parameters and quantization for large-scale vector search indexes.

1|Updated Dec 23, 2025
One-click install
npx skills add https://github.com/ccf/claude-code-ccf-marketplace --skill vector-index-tuning-ccf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vector-index-tuning
Source: https://github.com/ccf/claude-code-ccf-marketplace/tree/main/plugins/llm-application-dev/skills/vector-index-tuning
Command: npx skills add https://github.com/ccf/claude-code-ccf-marketplace --skill vector-index-tuning-ccf

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps optimize vector search performance by tuning index configurations, balancing latency, recall, and memory for large-scale vector data.

Core Features & Use Cases

  • HNSW parameter tuning: adjust M, efConstruction, and efSearch to improve recall and latency.
  • Index type selection: choose Flat, HNSW, IVF, or hybrid setups based on data size and memory constraints.
  • Quantization and memory planning: apply INT8, PQ, or binary quantization to reduce footprint and improve throughput.
  • Benchmarking templates: reproduce experiments to compare configurations and track results.
  • Use Case: Production search in recommendation and similarity workloads with billions of vectors, where latency targets and memory budgets drive index design decisions.

Quick Start

Run the vector-index-tuning workflow on your dataset to determine optimal HNSW parameters and quantization, then apply the recommendations to your production index.

Frequently Asked Questions about vector-index-tuning

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I tune HNSW parameters for better vector search recall and latency?

Tune HNSW parameters by adjusting M, efConstruction, and efSearch to balance vector search recall against query latency. Increasing M and efConstruction improves graph connectivity and recall during indexing, while efSearch controls the recall-latency trade-off at query time.

What is the best way to reduce memory footprint for large-scale vector search?

Reduce memory footprint for large-scale vector search by applying quantization strategies such as INT8, PQ, or binary quantization. These techniques compress vector representations, lowering memory usage and improving throughput without drastically degrading recall.

How do I choose between Flat, HNSW, and IVF indexes for my vector dataset?

Choose between Flat, HNSW, and IVF indexes based on your dataset size and memory constraints. Flat indexes suit small datasets requiring exact search, while HNSW and IVF handle large-scale, latency-constrained workloads with approximate nearest neighbor search.

Can I benchmark different vector index configurations to track recall and latency?

You can benchmark different vector index configurations using provided benchmarking templates. These templates help reproduce experiments to compare HNSW and quantization setups, tracking recall, latency, and memory metrics across configurations.

Why does my vector search latency spike when memory is constrained?

Vector search latency spikes under memory constraints when index configurations exceed available RAM, causing disk swapping or inefficient graph traversal. Tuning HNSW parameters and applying quantization like PQ or INT8 reduces the memory footprint to stabilize latency.

Does vector index tuning work for production-scale recommendation workloads with billions of vectors?

Vector index tuning works for production-scale recommendation and similarity workloads with billions of vectors. It addresses latency targets and memory budgets by selecting appropriate index types, HNSW parameters, and quantization strategies for large-scale deployments.