vector-index-tuning

Tune HNSW parameters and select quantization strategies for vector indexes.

Updated Mar 5, 2026
One-click install
npx skills add https://github.com/Himanshu040604/codex-skills-setup --skill vector-index-tuning-himanshu040604
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vector-index-tuning
Source: https://github.com/Himanshu040604/codex-skills-setup/tree/main/assets/codex/skills/claude-import/skills/plugins/llm-application-dev%40claude-code-workflows/skills/vector-index-tuning
Command: npx skills add https://github.com/Himanshu040604/codex-skills-setup --skill vector-index-tuning-himanshu040604

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires hnswlib, sklearn, qdrant-client, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the critical challenge of optimizing vector index performance, ensuring efficient and accurate similarity searches in large-scale vector databases.

Core Features & Use Cases

  • HNSW Parameter Tuning: Adjust M, efConstruction, and efSearch for optimal recall and latency.
  • Quantization Strategies: Implement INT8 scalar, Product Quantization (PQ), or binary quantization to reduce memory footprint.
  • Index Type Selection: Guidance on choosing between Flat, HNSW, IVF, and DiskANN based on data size.
  • Use Case: When deploying a large-scale recommendation system, use this skill to fine-tune HNSW parameters and apply quantization to achieve sub-100ms search latency for billions of vectors while maintaining high recall.

Quick Start

Use the vector-index-tuning skill to recommend HNSW parameters for 1 million vectors targeting 95% recall.

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 vector search to balance recall and latency?

HNSW parameter tuning adjusts M, efConstruction, and efSearch to balance recall and latency in vector search. This skill provides guidance and Python templates to optimize these parameters for your specific data size and performance requirements.

What is the best way to reduce vector database memory usage without losing search accuracy?

Vector database memory usage can be reduced using quantization strategies like INT8 scalar, Product Quantization (PQ), or binary quantization. This skill helps implement these techniques to lower memory footprint while maintaining high recall rates.

How do I choose between Flat, HNSW, IVF, and DiskANN index types for my vector database?

Choosing between Flat, HNSW, IVF, and DiskANN vector index types depends on your data size and performance requirements. This skill provides selection guidance to match your scale with the appropriate index architecture.

Does this skill provide Qdrant configuration templates for large-scale similarity search?

Yes, this skill provides Qdrant configuration templates for large-scale similarity search. It includes Python templates for benchmarking, quantization, and performance monitoring to ensure sub-100ms search latency for billions of vectors.

Can I benchmark vector search performance for a recommendation system with one million vectors?

Yes, you can benchmark vector search performance for recommendation systems with one million vectors. This skill includes Python templates to fine-tune HNSW parameters and apply quantization targeting 95% recall.

Why does my vector search latency spike when scaling to billions of vectors?

Vector search latency spikes during scaling often result from unoptimized HNSW parameters or lack of quantization. This skill addresses these constraints by guiding index type selection and memory optimization for large-scale vector systems.