Skip to content
Skillpedia
Machine learning41k Β· #6727

vector-index-tuning

What it does

This tool helps make searches in large amounts of data (like images or text) faster and more efficient. It adjusts how this data is organized so the AI can find what you're looking for more accurately and quickly, using less memory.

When to use it

  • βœ“When you have a lot of data and searches are slow.
  • βœ“When trying to balance search speed with result accuracy.
  • βœ“When you need to reduce the memory used by data search.

Skill link

https://github.com/wshobson/agents/blob/main/plugins/llm-application-dev/skills/vector-index-tuning/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/wshobson/agents/blob/main/plugins/llm-application-dev/skills/vector-index-tuning/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œHow can I optimize the search for similar images to make it faster and use less memory?”

5 new skills a week. 1 minute to read.

How it works

The tool adjusts internal parameters that control how data is connected and stored. It can choose different organization methods (like HNSW or Quantization) depending on the data volume and your speed and accuracy goals.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

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
FAQ

What are 'HNSW parameters'?

These are settings that affect the speed and accuracy of searches in a specific data organization method called HNSW. Adjusting them can improve results.

What is 'quantization'?

It's a technique to reduce the space data takes up in memory, making searches faster and cheaper, sometimes with a small loss in accuracy.

What does 'recall vs speed' mean?

It's a common trade-off: increasing search speed might decrease the accuracy of results (recall), and vice versa. The tuning aims for the best balance for your needs.

Details

Original description by the author

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

repo: wshobson/agents

Popularity

GitHub stars
41k
Ranking position
#6727
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills