本文へスキップ
Skillpedia
機械学習41k · #6727

vector-index-tuning

できること

このツールは、画像やテキストなどの大量のデータに対する検索を、より速く効率的にするのに役立ちます。データの整理方法を調整することで、AIが探しているものをより正確かつ迅速に見つけられるようにし、使用するメモリも少なくします。

使う場面

  • ✓データ量が多く、検索が遅いとき。
  • ✓検索速度と結果の正確さのバランスを取りたいとき。
  • ✓データ検索で使われるメモリを減らす必要があるとき。

スキルのリンク

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

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/wshobson/agents/blob/main/plugins/llm-application-dev/skills/vector-index-tuning/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“似た画像を検索する処理を、より速く、メモリを少なく使うように最適化するにはどうすればよいですか?”

毎週5つの新しいスキル。1分で読めます。

仕組み

このツールは、データの接続方法や保存方法を制御する内部パラメータを調整します。データ量や速度・精度の目標に応じて、HNSWや量子化(Quantization)などの異なる整理方法を選択できます。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)を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
よくある質問

「HNSWパラメータ」とは何ですか?

HNSWというデータ整理方法における検索の速度と精度に影響する設定値です。これらを調整することで結果を改善できます。

「量子化(quantization)」とは何ですか?

データがメモリ上で占める容量を減らす技術です。検索を速く、安価にできますが、精度がわずかに下がることもあります。

「再現率と速度のトレードオフ」とは何を意味しますか?

よくあるトレードオフで、検索速度を上げると結果の正確さ(再現率)が下がることがあり、その逆もあります。調整では、用途に合った最適なバランスを目指します。

詳細

作者による元の説明

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

人気

GitHubのスター
41k
ランキング
#6727
ライセンス
MIT
更新日
2026/10/15

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル