Vector Search logo

Vector Search

CommunityPopular
ruvnet
vector-search

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

Overview

Publisherruvnet
Repositoryruflo
Skill namevector-search
Stars
72.7K
Forks
8.6K
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by ruvnet on GitHub. Read the source before you install it.

Installation

Install the Vector Search AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ruvnet/ruflo.git /tmp/ruflo
mkdir -p .claude/skills
cp -r /tmp/ruflo/plugins/ruflo-agentdb/skills/vector-search .claude/skills/vector-search
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Vector Search in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Vector Search on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Vector Search is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Vector Search

Two distinct vector-search paths live in this plugin. Pick the right one — they're not interchangeable.

PathTool familyBackingCapacityLatency
Large-scale corpusembeddings_*@claude-flow/memory HNSW (Rust/Native)up to millions of vectors~1.9× at N=20k, ~3.2×–4.7× at N=5k vs brute-force (measured; recall@10 ≈ 0.99). ANN wins above the crossover
Hot-path routerruvllm_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

NeedPath
Search a corpus of N ≥ 500 documentsembeddings_search
Memory-constrained corpus (≥5,000 vectors)RaBitQ quantized — see "Quantized search" below
Compare two stringsembeddings_compare
Hierarchical / taxonomic dataembeddings_hyperbolic (Poincare ball)
Route a query to one of ≤11 hot patternsruvllm_hnsw_route
Cross-namespace searchmemory_search_unified

Standard search

  1. Check statusmcp__plugin_ruflo-core_ruflo__embeddings_status to verify the embedding engine.
  2. Initializemcp__plugin_ruflo-core_ruflo__embeddings_init if not active.
  3. Generatemcp__plugin_ruflo-core_ruflo__embeddings_generate for text input.
  4. Searchmcp__plugin_ruflo-core_ruflo__embeddings_search with the query.
  5. Comparemcp__plugin_ruflo-core_ruflo__embeddings_compare to measure similarity.
  6. Unified searchmcp__plugin_ruflo-core_ruflo__memory_search_unified for 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.

StepToolPurpose
1embeddings_initEngine warm
2embeddings_rabitq_buildOne-time build of the 1-bit index after corpus is loaded
3embeddings_rabitq_searchHamming-prefilter returns top-N candidate IDs (cheap)
4embeddings_searchOptional exact rerank on the candidate set (full-precision)
5embeddings_rabitq_statusIndex health, memory footprint, build time

Note: embeddings_rabitq_search returns candidate IDs only — the rerank in step 4 is the user's responsibility (mirrors the docstring at embeddings-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:

ProfileefSearchMWhen to use
recall-first20032Pattern recall during planning; quality matters more than ms
balanced (default)6416General-purpose semantic recall
latency-first168Hot-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__plugin_ruflo-core_ruflo__ruvllm_hnsw_create — create the WASM index (cap ~11)
  • mcp__plugin_ruflo-core_ruflo__ruvllm_hnsw_add — add a pattern
  • mcp__plugin_ruflo-core_ruflo__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__plugin_ruflo-core_ruflo__embeddings_hyperbolic which maps to Poincare ball space. Distance is geodesic, not cosine.

CLI alternative

bash
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

Measured numbers (source: scripts/benchmark-intelligence.mjs, ruvector NAPI backend; recall@10 ≈ 0.99). The older "150×–12,500×" figures were brute-force-fallback artifacts and have been retired — see project CLAUDE.md "V3 Performance Targets".

MethodMeasured speedup vs brute-force
Brute-force scanBaseline
HNSW (N=5,000)~3.2×–4.7× faster
HNSW (N=20,000)~1.9× faster
HNSW (below crossover, small N)ties/loses vs brute-force
RaBitQ quantization32× memory reduction; 0.60 ms/query at N≈14.7k
ruvllm_hnsw_route (n≤11)sub-ms per route, fixed cost

Frequently asked questions

What does the Vector Search AI skill do?

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

Why use Vector Search on TypingMind?

Because you install it once and use it with any model. Vector Search is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Vector Search in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ruvnet/ruflo/tree/main/plugins/ruflo-agentdb/skills/vector-search. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Vector Search?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Vector Search?

As many as you like. As long as a model supports skills, you can use Vector Search with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Vector Search AI skill free?

Yes. It is published on GitHub by ruvnet under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇