Conversation
- speculativeEmbed: real FNV-1a hash embedding (128-dim) from file content - ragRetrieve: cosine similarity on embeddings + TF-IDF keyword fallback - contextRank: TF-IDF weighted scoring instead of raw keyword matching - Remove false DiskANN claim (will implement as Rust crate next) Co-Authored-By: claude-flow <ruv@ruv.net>
…R-143) New Rust crate: ruvector-diskann Core algorithm (NeurIPS 2019 DiskANN paper): - Vamana graph with α-robust pruning (bounded out-degree R) - k-means++ seeded Product Quantization (M subspaces, 256 centroids) - Asymmetric PQ distance tables for fast candidate filtering - Two-phase search: PQ-filtered beam search → exact re-ranking - Memory-mapped persistence (mmap vectors + binary graph) Performance characteristics: - L2-squared distance with 8-wide loop unrolling (auto-vectorized) - Greedy beam search with bounded visited set - Save/load with flat binary format (mmap-friendly) 9 tests passing: distance, PQ train/encode, Vamana build/search, bounded degree, full index CRUD, PQ-accelerated search, save/load. Co-Authored-By: claude-flow <ruv@ruv.net>
Rust core (ruvector-diskann): - 4-accumulator L2 distance for ILP optimization - Recall@10 = 1.000 on 2K vectors - Search latency: 90µs (5K vectors, 128d, k=10) - 14 tests: distance, PQ, Vamana, recall, scale, edge cases NAPI-RS bindings (ruvector-diskann-node): - Sync + async build/search - Batch insert (flat Float32Array) - Save/load, delete, count - Thread-safe via parking_lot::RwLock npm package (@ruvector/diskann): - Platform-specific loader (linux/darwin/win) - TypeScript declarations - Node.js test passing Co-Authored-By: claude-flow <ruv@ruv.net>
5 targets: linux-x64, linux-arm64, darwin-x64, darwin-arm64, win32-x64 Co-Authored-By: claude-flow <ruv@ruv.net>
Optimizations applied: - FlatVectors: contiguous f32 slab (eliminates Vec<Vec> indirection) - VisitedSet: O(1) clear via generation counter (replaces HashSet) - 4-accumulator ILP for L2 distance (auto-vectorized) - Flat PQ distance table (cache-line friendly) - Parallel medoid finding via rayon - Zero-copy save (write flat slab directly) - Optional simsimd feature for hardware NEON/AVX2/AVX-512 - Optional gpu feature with Metal/CUDA/Vulkan dispatch stubs Results (5K vectors, 128d): - Search: 90µs → 55µs (1.6x faster) - Build: 6.9s → 6.2s (10% faster) - Recall@10: 0.998 (maintained) - 17 tests passing Co-Authored-By: claude-flow <ruv@ruv.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements DiskANN/Vamana as a dedicated Rust crate with NAPI-RS bindings, closing the last missing capability gap identified in the ruvector audit (ADR-143).
New Crates
ruvector-diskann— Core Rust implementation (Vamana graph + Product Quantization + mmap persistence)ruvector-diskann-node— NAPI-RS bindings with sync/async APIsPublished Packages
@ruvector/diskann@0.1.0— main npm package@ruvector/diskann-darwin-arm64@0.1.0— Apple Silicon binaryAlgorithm (NeurIPS 2019)
Performance
Also in this PR
parallel-workers.ts: real hash embedding (was stub), cosine similarity RAG (was keyword-only)ADR-143: documents all gaps and decisionsTest plan
🤖 Generated with claude-flow