🛠️ ベクター検索
大量のデータの中から、意味的に似ている情報を
📺 まず動画で見る(YouTube)
▶ 【衝撃】最強のAIエージェント「Claude Code」の最新機能・使い方・プログラミングをAIで効率化する超実践術を解説! ↗
※ jpskill.com 編集部が参考用に選んだ動画です。動画の内容と Skill の挙動は厳密には一致しないことがあります。
📜 元の英語説明(参考)
Vector search via embeddings_* (large-scale HNSW) and ruvllm_hnsw_* (WASM router for ≤11 hot patterns), with RaBitQ 1-bit quantization for 32× memory reduction
🇯🇵 日本人クリエイター向け解説
大量のデータの中から、意味的に似ている情報を
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o vector-search.zip https://jpskill.com/download/2203.zip && unzip -o vector-search.zip && rm vector-search.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/2203.zip -OutFile "$d\vector-search.zip"; Expand-Archive "$d\vector-search.zip" -DestinationPath $d -Force; ri "$d\vector-search.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
vector-search.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
vector-searchフォルダができる - 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-17
- 取得日時
- 2026-05-17
- 同梱ファイル
- 1
💬 こう話しかけるだけ — サンプルプロンプト
- › Vector Search を使って、最小構成のサンプルコードを示して
- › Vector Search の主な使い方と注意点を教えて
- › Vector Search を既存プロジェクトに組み込む方法を教えて
これをClaude Code に貼るだけで、このSkillが自動発動します。
📖 Claude が読む原文 SKILL.md(中身を展開)
この本文は AI(Claude)が読むための原文(英語または中国語)です。日本語訳は順次追加中。
Vector Search
Two distinct vector-search paths live in this plugin. Pick the right one — they're not interchangeable.
| Path | Tool family | Backing | Capacity | Latency |
|---|---|---|---|---|
| Large-scale corpus | embeddings_* |
@claude-flow/memory HNSW (Rust/Native) |
up to millions of vectors | 150×–12,500× faster than brute-force, depending on N and parameters |
| Hot-path router | ruvllm_hnsw_* |
WASM-backed router (v2.0.1) | ~11 patterns max (ruvllm-tools.ts:58) |
sub-ms; designed for high-priority routing, not corpus search |
The "12,500×" headline applies to the large-scale embeddings_search path. The WASM router is not that path.
When to use
| Need | Path |
|---|---|
| Search a corpus of N ≥ 500 documents | embeddings_search |
| Memory-constrained corpus (≥5,000 vectors) | RaBitQ quantized — see "Quantized search" below |
| Compare two strings | embeddings_compare |
| Hierarchical / taxonomic data | embeddings_hyperbolic (Poincare ball) |
| Route a query to one of ≤11 hot patterns | ruvllm_hnsw_route |
| Cross-namespace search | memory_search_unified |
Standard search
- Check status —
mcp__claude-flow__embeddings_statusto verify the embedding engine. - Initialize —
mcp__claude-flow__embeddings_initif not active. - Generate —
mcp__claude-flow__embeddings_generatefor text input. - Search —
mcp__claude-flow__embeddings_searchwith the query. - Compare —
mcp__claude-flow__embeddings_compareto measure similarity. - Unified search —
mcp__claude-flow__memory_search_unifiedfor cross-namespace.
Quantized search (32× memory reduction)
For corpora ≥5,000 vectors and/or memory-constrained environments, use the RaBitQ 1-bit quantization workflow. Below 5,000 vectors the rebuild cost outweighs the savings — use the standard path instead.
| Step | Tool | Purpose |
|---|---|---|
| 1 | embeddings_init |
Engine warm |
| 2 | embeddings_rabitq_build |
One-time build of the 1-bit index after corpus is loaded |
| 3 | embeddings_rabitq_search |
Hamming-prefilter returns top-N candidate IDs (cheap) |
| 4 | embeddings_search |
Optional exact rerank on the candidate set (full-precision) |
| 5 | embeddings_rabitq_status |
Index health, memory footprint, build time |
Note:
embeddings_rabitq_searchreturns candidate IDs only — the rerank in step 4 is the user's responsibility (mirrors the docstring atembeddings-tools.ts:911). Without rerank, results are approximate; with rerank, you get full-precision quality at 32× lower memory.
Tuning
HNSW exposes three knobs that trade recall against latency. The "12,500×" headline assumes defaults; tune deliberately for your workload:
| Profile | efSearch |
M |
When to use |
|---|---|---|---|
recall-first |
200 | 32 | Pattern recall during planning; quality matters more than ms |
balanced (default) |
64 | 16 | General-purpose semantic recall |
latency-first |
16 | 8 | Hot-path routing where p99 latency matters |
efSearch is passed via ruvllm_hnsw_create (ruvllm-tools.ts:64). M is registry-level today; raise as a follow-up if it should be MCP-tunable. efConstruction defaults to 200 in the lite index (hnsw-index.ts:537).
HNSW pattern router (WASM, ≤11 patterns)
For routing a small number of high-priority patterns:
mcp__claude-flow__ruvllm_hnsw_create— create the WASM index (cap ~11)mcp__claude-flow__ruvllm_hnsw_add— add a patternmcp__claude-flow__ruvllm_hnsw_route— route an incoming query
This is not a corpus index. Treat it as a fast classifier over a curated set of patterns.
Hyperbolic embeddings
For hierarchical data (code trees, org charts), use mcp__claude-flow__embeddings_hyperbolic which maps to Poincare ball space. Distance is geodesic, not cosine.
CLI alternative
npx @claude-flow/cli@latest embeddings search --query "authentication patterns"
npx @claude-flow/cli@latest embeddings init
npx @claude-flow/cli@latest memory search --query "your query"
Performance
| Method | Speed |
|---|---|
| Brute-force scan | Baseline |
| HNSW (n=500, balanced) | ~150× faster |
| HNSW (n=10,000, balanced) | ~12,500× faster |
| RaBitQ + rerank (n=10,000) | ~12,500× search speed at 32× lower memory |
ruvllm_hnsw_route (n≤11) |
sub-ms per route, fixed cost |