You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TurboVault's built-in semantic search (TF-IDF) is a strong low-resource default and will stay the default. This issue tracks adding true embedding-based semantic search as an optional, feature-gated vertical for larger or more semantically diverse vaults, where dense embeddings meaningfully improve recall over lexical/TF-IDF approaches.
This is not a replacement for TF-IDF. It is an opt-in upgrade, off by default, so the common case (modest vault, zero-config, instant, offline, private) is unaffected.
Prior art
@ForrestThump has a working prototype on his feature/vector-db branch (CPU-friendly embeddings, paragraph-level incremental re-embedding, gated behind a vector-search feature) — excellent reference material. To be clear, this is open for anyone to pick up; no assumption about who authors it, and ForrestThump is very welcome to drive it if he has the bandwidth.
Architecture direction (from a Q2 2026 review)
Design it as a vertical that abstracts the embedder (and optional reranker) behind traits, defaults to a pure-Rust CPU stack, and gates heavier backends behind features.
Static embeddings via model2vec-rs + hnsw_rs (pure Rust, zero FFI; cross-compiles cleanly to Pi/musl/WASM).
Model: Potion potion-mxbai-256d-v2 (~71.45 MTEB v2 English, 15k+ sentences/sec on CPU, 256-dim so the index stays small); potion-mxbai-micro (~0.7 MB) for the edge floor.
Static embeddings have closed most of the gap with small transformers while being orders of magnitude faster and smaller — a good fit for the local-first ethos.
Quantized transformers via fastembed-rs (ONNX, int8): Qwen3-Embedding-0.6B (Matryoshka 256–2048 dims, Apache-2.0) or Nomic Embed v2 (CPU-purpose-built, single-model dense+sparse hybrid).
Tier 3 — optional reranker (highest quality per cost)
FlashRank-class on CPU (sub-20 ms for ~50 candidates), or mxbai-rerank-xsmall / jina-reranker-v3 for higher quality.
Hybrid note: TurboVault already has Tantivy BM25. The strongest retrieval path is BM25 + dense + RRF, then optional rerank — mostly assembled from parts that already exist.
Summary
TurboVault's built-in semantic search (TF-IDF) is a strong low-resource default and will stay the default. This issue tracks adding true embedding-based semantic search as an optional, feature-gated vertical for larger or more semantically diverse vaults, where dense embeddings meaningfully improve recall over lexical/TF-IDF approaches.
This is not a replacement for TF-IDF. It is an opt-in upgrade, off by default, so the common case (modest vault, zero-config, instant, offline, private) is unaffected.
Prior art
@ForrestThump has a working prototype on his
feature/vector-dbbranch (CPU-friendly embeddings, paragraph-level incremental re-embedding, gated behind avector-searchfeature) — excellent reference material. To be clear, this is open for anyone to pick up; no assumption about who authors it, and ForrestThump is very welcome to drive it if he has the bandwidth.Architecture direction (from a Q2 2026 review)
Design it as a vertical that abstracts the embedder (and optional reranker) behind traits, defaults to a pure-Rust CPU stack, and gates heavier backends behind features.
Tier 1 — default backend (pure-Rust, CPU, edge-friendly)
model2vec-rs+hnsw_rs(pure Rust, zero FFI; cross-compiles cleanly to Pi/musl/WASM).potion-mxbai-256d-v2(~71.45 MTEB v2 English, 15k+ sentences/sec on CPU, 256-dim so the index stays small);potion-mxbai-micro(~0.7 MB) for the edge floor.Tier 2 — optional quality upgrade (heavier dependency)
fastembed-rs(ONNX, int8): Qwen3-Embedding-0.6B (Matryoshka 256–2048 dims, Apache-2.0) or Nomic Embed v2 (CPU-purpose-built, single-model dense+sparse hybrid).Tier 3 — optional reranker (highest quality per cost)
Hybrid note: TurboVault already has Tantivy BM25. The strongest retrieval path is BM25 + dense + RRF, then optional rerank — mostly assembled from parts that already exist.
Suggested shape
crates/plugins/turbovault-plugin-vector-search, behind avector-searchfeature, default-off (depends on the Phase 1 provider scaffolding, [Phase 1] Decompose tools.rs into composable providers #28).Open questions
hnsw_rs(no deps) vssqlite-vec/usearch(SQL + persistence, but C/C++ FFI).Caveats