mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-24 13:54:31 +00:00
Seven-file research at docs/research/rabitq-integration/ surveying
where RaBitQ (ADR-154, crates.io v2.2.0) is consumed today, where
else it could go, and what architectural pattern each candidate
should use.
## Top 3 integration recommendations
1. **ruvector-diskann RaBitQ backend** — replace/augment the PQ
quantizer with `RabitqPlusIndex` (≤500 LoC). ADR-154 already
named DiskANN as a target consumer; the spot is open.
2. **ruvector-graph `VectorPropertyIndex`** — vector-keyed property
lookup for graph nodes via RaBitQ codes alongside the property
table (≤600 LoC). Unlocks "find nodes whose embedding is closest
to query" without a separate index crate.
3. **ruvector-gnn `differentiable_search` rewrite** — replace the
cosine fan-out at `differentiable_search.rs` with
`RabitqPlusIndex::search_with_rerank` (≤300 LoC). Keeps the
gradient path; collapses memory by 32×.
## Key nuance discovered
The `VectorKernel` trait + `CpuKernel` shipped at
`crates/ruvector-rabitq/src/kernel.rs:78` and ADR-157's dispatch
policy is fully specified — but **no caller wires it up**. The
only reference is a doc comment at `crates/ruvector-rulake/src/lake.rs:595`.
Any new consumer choosing Pattern 2 (the trait dispatch route)
would be the first non-test caller and would have to implement
dispatch from scratch — almost certainly diverging from
ADR-157's determinism gate. This forced an ordering decision:
**ruLake must implement `register_kernel` first**; Phase 1 below
stays Pattern 1 (direct embed) only.
## Phased roadmap
- **Phase 1 (4–5 wk):** the 3 high-value Pattern-1 integrations
above. All direct-embed; no trait dispatch yet.
- **Phase 2 (4–6 wk):** ruLake wires `register_kernel`; CpuKernel
+ at least one new kernel (CPU-SIMD or WASM) become real;
≥2 consumers route through the trait.
- **Phase 3 (~2 wk):** propose new ADR ("RaBitQ as ruvector's
canonical vector compression substrate") and catalog what
ruvector-graph / -gnn / -attention need to share one
compression layer.
Total: ~10–13 engineer-weeks.
## What this is NOT
- Not implementation. No Rust code in this PR — just markdown.
- Not an ADR. Phase 3 may produce one; this is the research that
precedes it.
- Not a binding decision. Each integration in §02 is annotated
with effort + value so the team can re-prioritize.
## File breakdown
INDEX.md 51 LoC
01-current-integration.md 134 LoC (call sites today)
02-integration-opportunities.md 300 LoC (15 candidates surveyed)
03-architectural-patterns.md 289 LoC (3 patterns + anti-patterns)
04-cross-cutting-concerns.md 230 LoC (determinism, witness, perf)
05-roadmap.md 238 LoC (3 phases, milestones)
06-decision-record.md 107 LoC (1-page call to action)
Refs: ADR-154 (RaBitQ), ADR-155 (ruLake), ADR-157 (accelerator
plane), PR #380 (ADR-159 + workspace cleanup), PR #381 (Python
SDK M1).
Co-Authored-By: claude-flow <ruv@ruv.net>
|
||
|---|---|---|
| .. | ||
| adr | ||
| analysis | ||
| api | ||
| architecture | ||
| benchmarks | ||
| cloud-architecture | ||
| cnn | ||
| code-reviews | ||
| dag | ||
| development | ||
| examples | ||
| gnn | ||
| guides | ||
| hnsw | ||
| hooks | ||
| implementation | ||
| integration | ||
| nervous-system | ||
| optimization | ||
| plans/subpolynomial-time-mincut | ||
| postgres | ||
| project-phases | ||
| publishing | ||
| research | ||
| reviews | ||
| ruvllm | ||
| rvagent | ||
| sdk | ||
| security | ||
| sparse-inference | ||
| sql | ||
| testing | ||
| training | ||
| .gitkeep | ||
| .nojekyll | ||
| agi-container.md | ||
| C2-shell-execution-hardening.md | ||
| C8_RESULT_VALIDATION_IMPLEMENTATION.md | ||
| consciousness-api.md | ||
| IMPLEMENTATION-C5.md | ||
| index.html | ||
| INDEX.md | ||
| moe-routing-optimization-analysis.md | ||
| README.md | ||
| REPO_STRUCTURE.md | ||
| research-openfang.md | ||
RuVector Documentation
Complete documentation for RuVector, the high-performance Rust vector database with global scale capabilities.
📚 Documentation Structure
docs/
├── adr/ # Architecture Decision Records
├── analysis/ # Research & analysis docs
├── api/ # API references (Rust, Node.js, Cypher)
├── architecture/ # System design docs
├── benchmarks/ # Performance benchmarks & results
├── cloud-architecture/ # Cloud deployment guides
├── code-reviews/ # Code review documentation
├── dag/ # DAG implementation
├── development/ # Developer guides
├── examples/ # SQL examples
├── gnn/ # GNN/Graph implementation
├── guides/ # User guides & tutorials
├── hnsw/ # HNSW index documentation
├── hooks/ # Hooks system documentation
├── implementation/ # Implementation details & summaries
├── integration/ # Integration guides
├── nervous-system/ # Nervous system architecture
├── optimization/ # Performance optimization guides
├── plans/ # Implementation plans
├── postgres/ # PostgreSQL extension docs
├── project-phases/ # Development phases
├── publishing/ # NPM publishing guides
├── research/ # Research documentation
├── ruvllm/ # RuVLLM documentation
├── security/ # Security audits & reports
├── sparse-inference/ # Sparse inference docs
├── sql/ # SQL examples
├── testing/ # Testing documentation
└── training/ # Training & LoRA docs
Getting Started
- guides/GETTING_STARTED.md - Getting started guide
- guides/BASIC_TUTORIAL.md - Basic tutorial
- guides/INSTALLATION.md - Installation instructions
- guides/AGENTICDB_QUICKSTART.md - AgenticDB quick start
- guides/wasm-api.md - WebAssembly API documentation
Architecture & Design
- architecture/ - System architecture details
- cloud-architecture/ - Global cloud deployment
- adr/ - Architecture Decision Records
- nervous-system/ - Nervous system architecture
API Reference
- api/RUST_API.md - Rust API reference
- api/NODEJS_API.md - Node.js API reference
- api/CYPHER_REFERENCE.md - Cypher query reference
Performance & Benchmarks
- benchmarks/ - Performance benchmarks & results
- optimization/ - Performance optimization guides
- analysis/ - Research & analysis docs
Security
- security/ - Security audits & reports
Implementation
- implementation/ - Implementation details & summaries
- integration/ - Integration guides
- code-reviews/ - Code review documentation
Specialized Topics
- gnn/ - GNN/Graph implementation
- hnsw/ - HNSW index documentation
- postgres/ - PostgreSQL extension docs
- ruvllm/ - RuVLLM documentation
- training/ - Training & LoRA docs
Development
- development/CONTRIBUTING.md - Contribution guidelines
- development/MIGRATION.md - Migration guide
- testing/ - Testing documentation
- publishing/ - NPM publishing guides
Research
- research/ - Research documentation
- cognitive-frontier/ - Cognitive frontier research
- gnn-v2/ - GNN v2 research
- latent-space/ - HNSW & attention research
- mincut/ - MinCut algorithm research
🚀 Quick Links
For New Users
- Start with Getting Started Guide
- Try the Basic Tutorial
- Review API Documentation
For Cloud Deployment
- Read Architecture Overview
- Follow Deployment Guide
- Apply Performance Optimizations
For Contributors
- Read Contributing Guidelines
- Review Architecture Decisions
- Check Migration Guide
For Performance Tuning
- Review Optimization Guide
- Run Benchmarks
- Check Analysis
📊 Documentation Status
| Category | Directory | Status |
|---|---|---|
| Getting Started | guides/ | ✅ Complete |
| Architecture | architecture/, adr/ | ✅ Complete |
| API Reference | api/ | ✅ Complete |
| Performance | benchmarks/, optimization/, analysis/ | ✅ Complete |
| Security | security/ | ✅ Complete |
| Implementation | implementation/, integration/ | ✅ Complete |
| Development | development/, testing/ | ✅ Complete |
| Research | research/ | 📚 Ongoing |
Total Documentation: 460+ documents across 60+ directories
🔗 External Resources
- GitHub Repository: https://github.com/ruvnet/ruvector
- Main README: ../README.md
- Changelog: ../CHANGELOG.md
- License: ../LICENSE
Last Updated: 2026-02-26 | Version: 2.0.4 (core) / 0.1.100 (npm) | Status: Production Ready