Skip to content
Skillpedia
Machine learning41k · #4894

vector-index-tuning

Enables your agent to search for information faster and more accurately. It's useful for optimizing the speed and quality of searches in vector databases.

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.

Example of what to ask your AI

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

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

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

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.
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.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add wshobson/agents --skill vector-index-tuning

Or download just the file:

curl -L https://raw.githubusercontent.com/wshobson/agents/main/plugins/llm-application-dev/skills/vector-index-tuning/SKILL.md -o SKILL.md
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
#4894
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills