feat: add ruvector-mrl Matryoshka Resolution Index (2.0–3.5× ANN speedup)#609
Draft
ruvnet wants to merge 2 commits into
Draft
feat: add ruvector-mrl Matryoshka Resolution Index (2.0–3.5× ANN speedup)#609ruvnet wants to merge 2 commits into
ruvnet wants to merge 2 commits into
Conversation
Two-stage ANN index for MRL-trained embeddings (OpenAI text-embedding-3, Cohere embed-v3, Nomic embed-v1.5). Two variants: MrlLinear (brute-force prefix scan) and MrlGraph (greedy kNN graph on prefix, beam search). Measured on MRL-simulated data (alpha=0.25, D_FAST=32/D_FULL=128): - MrlLinear: 2.0× throughput, 100% recall@10 - MrlGraph: 3.5× throughput, 94.3% recall@10 All 4 acceptance criteria pass. 7/7 unit tests pass. Co-Authored-By: claude-flow <ruv@ruv.net>
ADR-269: records the decision to add two-stage MRL-aware ANN indexing to the ruvector crate family. Documents rationale for two-phase graph build and the training-dependency finding. Nightly research (2026-06-26): 24-section README with full benchmark tables, architecture diagrams, comparison with prior nightly sessions, and limitations/future work. SEO gist article included. 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
crates/ruvector-mrl: a new Rust library crate implementing Matryoshka Resolution Index (MRL-aware two-stage ANN) for MRL-trained embeddings (OpenAItext-embedding-3, Cohereembed-v3, Nomicembed-v1.5)MrlLinear(brute-force prefix scan + full-dim rerank) andMrlGraph(greedy kNN graph on prefix space + full-dim rerank)Benchmark Results (2026-06-26, release build, N=5000, D_FULL=128, D_FAST=32)
Experiment A — Random Gaussian (no MRL structure)
Experiment B — MRL-Simulated (α=0.25, prefix is informative)
Acceptance test: PASS — all 4 criteria met on MRL-structured data.
Test plan
cargo test -p ruvector-mrl→ 7/7 tests passcargo run --release -p ruvector-mrl --bin mrl-bench→ PASS (all acceptance criteria)cargo build --release -p ruvector-mrl→ no warnings from ruvector-mrlFiles Changed
Cargo.toml— addedcrates/ruvector-mrlworkspace membercrates/ruvector-mrl/— new crate (lib.rs, flat.rs, graph.rs, mrl.rs, main.rs)docs/adr/ADR-269-matryoshka-mrl-index.mddocs/research/nightly/2026-06-26-matryoshka-mrl-index/README.mddocs/research/nightly/2026-06-26-matryoshka-mrl-index/gist.md🤖 Generated with claude-flow
Generated by Claude Code