agentdb-vector-search-optimization
AgentDBのベクトル検索を、量子化によるメモリ削減、HNSWインデックスによる高速化、キャッシュ、バッチ処理によって最適化し、数百万のベクトルに対応できるよう性能を向上させるSkill。
📜 元の英語説明(参考)
Optimize AgentDB vector search performance using quantization for 4-32x memory reduction, HNSW indexing for 150x faster search, caching, and batch operations for scaling to millions of vectors.
🇯🇵 日本人クリエイター向け解説
AgentDBのベクトル検索を、量子化によるメモリ削減、HNSWインデックスによる高速化、キャッシュ、バッチ処理によって最適化し、数百万のベクトルに対応できるよう性能を向上させるSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o agentdb-vector-search-optimization.zip https://jpskill.com/download/18734.zip && unzip -o agentdb-vector-search-optimization.zip && rm agentdb-vector-search-optimization.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/18734.zip -OutFile "$d\agentdb-vector-search-optimization.zip"; Expand-Archive "$d\agentdb-vector-search-optimization.zip" -DestinationPath $d -Force; ri "$d\agentdb-vector-search-optimization.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
agentdb-vector-search-optimization.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
agentdb-vector-search-optimizationフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 2
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
AgentDB ベクトル検索の最適化
概要
量子化(メモリを4〜32倍削減)、HNSWインデックス(検索を150倍高速化)、キャッシュ、および数百万のベクトルにスケールするためのバッチ処理により、AgentDBのパフォーマンスを最適化します。
SOPフレームワーク:5段階の最適化
フェーズ1:ベースラインパフォーマンス(1時間)
- 現在のメトリクス(レイテンシ、スループット、メモリ)を測定します。
- ボトルネックを特定します。
- 最適化の目標を設定します。
フェーズ2:量子化の適用(1〜2時間)
- 積量子化を構成します。
- コードブックをトレーニングします。
- 圧縮を適用します。
- 精度を検証します。
フェーズ3:HNSWインデックスの実装(1〜2時間)
- HNSWインデックスを構築します。
- パラメータ(M、efConstruction、efSearch)を調整します。
- スピードアップをベンチマークします。
フェーズ4:キャッシュの構成(1時間)
- クエリキャッシュを実装します。
- TTLと削除ポリシーを設定します。
- ヒット率を監視します。
フェーズ5:結果のベンチマーク(1〜2時間)
- 包括的なベンチマークを実行します。
- 改善前/改善後を比較します。
- 改善を検証します。
クイックスタート
import { AgentDB, Quantization, QueryCache } from 'agentdb-optimization';
const db = new AgentDB({ name: 'optimized-db', dimensions: 1536 });
// 量子化(メモリを4倍削減)
const quantizer = new Quantization({
method: 'product-quantization',
compressionRatio: 4
});
await db.applyQuantization(quantizer);
// HNSWインデックス(150倍の高速化)
await db.createIndex({
type: 'hnsw',
params: { M: 16, efConstruction: 200 }
});
// キャッシュ
db.setCache(new QueryCache({
maxSize: 10000,
ttl: 3600000
}));
最適化手法
量子化
- Product Quantization: 4〜8倍の圧縮
- Scalar Quantization: 2〜4倍の圧縮
- Binary Quantization: 32倍の圧縮
インデックス
- HNSW: 150倍高速、高精度
- IVF: 高速、パーティション化された検索
- LSH: 近似検索
キャッシュ
- Query Cache: LRU削除
- Result Cache: TTLベース
- Embedding Cache: 埋め込みの再利用
成功の指標
- メモリ削減:4〜32倍
- 検索の高速化:150倍
- 維持される精度:> 95%
- キャッシュヒット率:> 70%
追加リソース
- 完全なドキュメント:SKILL.md
- AgentDBの最適化:https://agentdb.dev/docs/optimization
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
AgentDB Vector Search Optimization
Overview
Optimize AgentDB performance with quantization (4-32x memory reduction), HNSW indexing (150x faster search), caching, and batch operations for scaling to millions of vectors.
SOP Framework: 5-Phase Optimization
Phase 1: Baseline Performance (1 hour)
- Measure current metrics (latency, throughput, memory)
- Identify bottlenecks
- Set optimization targets
Phase 2: Apply Quantization (1-2 hours)
- Configure product quantization
- Train codebooks
- Apply compression
- Validate accuracy
Phase 3: Implement HNSW Indexing (1-2 hours)
- Build HNSW index
- Tune parameters (M, efConstruction, efSearch)
- Benchmark speedup
Phase 4: Configure Caching (1 hour)
- Implement query cache
- Set TTL and eviction policies
- Monitor hit rates
Phase 5: Benchmark Results (1-2 hours)
- Run comprehensive benchmarks
- Compare before/after
- Validate improvements
Quick Start
import { AgentDB, Quantization, QueryCache } from 'agentdb-optimization';
const db = new AgentDB({ name: 'optimized-db', dimensions: 1536 });
// Quantization (4x memory reduction)
const quantizer = new Quantization({
method: 'product-quantization',
compressionRatio: 4
});
await db.applyQuantization(quantizer);
// HNSW indexing (150x speedup)
await db.createIndex({
type: 'hnsw',
params: { M: 16, efConstruction: 200 }
});
// Caching
db.setCache(new QueryCache({
maxSize: 10000,
ttl: 3600000
}));
Optimization Techniques
Quantization
- Product Quantization: 4-8x compression
- Scalar Quantization: 2-4x compression
- Binary Quantization: 32x compression
Indexing
- HNSW: 150x faster, high accuracy
- IVF: Fast, partitioned search
- LSH: Approximate search
Caching
- Query Cache: LRU eviction
- Result Cache: TTL-based
- Embedding Cache: Reuse embeddings
Success Metrics
- Memory reduction: 4-32x
- Search speedup: 150x
- Accuracy maintained: > 95%
- Cache hit rate: > 70%
Additional Resources
- Full docs: SKILL.md
- AgentDB Optimization: https://agentdb.dev/docs/optimization
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (3,308 bytes)
- 📎 README.md (1,110 bytes)