research(nightly): namespace-partitioned multi-agent HNSW memory#654
Draft
ruvnet wants to merge 2 commits into
Draft
research(nightly): namespace-partitioned multi-agent HNSW memory#654ruvnet wants to merge 2 commits into
ruvnet wants to merge 2 commits into
Conversation
Implements ruvector-ns-partition with three measurable variants: - GlobalFlat: single HNSW + post-filter (42.7% cross-NS recall) - Partitioned: per-namespace HNSW (97.5% cross-NS recall, 22× faster single-NS) - HierarchicalNS: centroid router + per-NS HNSW (53% cross-NS recall at 2× speed) Zero external dependencies. 7 unit tests pass. Build: release. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_019XVhmXn9Chh92wWbjgF3N3
… memory Covers 2026 SOTA for multi-tenant vector search, benchmark analysis, failure modes, security considerations, production migration path, 10-20 year thesis on namespace-native agent cognition substrates. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_019XVhmXn9Chh92wWbjgF3N3
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
ns-partitioned-anndocs/adr/ADR-272-ns-partitioned-ann.mdcrates/ruvector-ns-partitiondocs/research/nightly/2026-07-10-ns-partitioned-ann/README.mddocs/research/nightly/2026-07-10-ns-partitioned-ann/gist.mdMulti-agent AI systems each need isolated vector memory but must also retrieve knowledge across agent boundaries. This nightly adds a pure-Rust PoC benchmarking three namespace strategies on a 6 000-vector, 8-namespace workload.
Key findings (all measured, no aspirational numbers):
GlobalFlat (the strategy used by Pinecone namespaces, Chroma collections, pgvector filtered search) achieves only 42.7% cross-namespace recall at ef=64 — consistent with ACORN (SIGMOD 2024) measurements of post-filter degradation at ~12.5% selectivity.
Per-namespace HNSW (
Partitioned) achieves 97.5% cross-NS recall and is 21.8× faster for single-agent queries than GlobalFlat, with no extra memory overhead (4 779 KB vs 4 988 KB).What's Included
Working Rust PoC (
crates/ruvector-ns-partition/, zero external deps):src/hnsw.rs: 240-line minimal HNSW with deterministic LCG, greedy descent, diversity-heuristic pruningsrc/lib.rs:NamespacedIndextrait +GlobalFlat,Partitioned,HierarchicalNSimplementationssrc/bin/benchmark.rs: deterministic benchmark with brute-force oracle and acceptance gate7 unit tests — all passing
ADR-272 proposing Partitioned as the recommended production strategy with security integration plan (capgated + proof-gate)
Research document with 2026 SOTA survey, memory math, failure modes, 10–20 year agent OS thesis
SEO gist with public technical article format
Test Plan
cargo build --release -p ruvector-ns-partition— Finished in 2m 24scargo test -p ruvector-ns-partition— 7 passed, 0 failedcargo run --release -p ruvector-ns-partition --bin benchmark— PARTIAL PASS (Partitioned passes all acceptance criteria)cargo fmt -p ruvector-ns-partition— cleanAcceptance Gate Result
Ecosystem Connections
ruvector-capgated(ADR-268): per-namespace capability mask for access controlruvector-proof-gate(ADR-227): proof-gated cross-namespace writesruvector-mincut: namespace graph compactionmcp-brain: MCP tool surface (memory_ns_search_*)ruFlo:on_ns_recall_drop/on_ns_size_exceedstriggersrvf: per-namespace portable bundle exportThis branch should either become a production RuVector capability (
NamespacedIndextrait merged intoruvector-core) or a falsified research path with useful evidence.Generated by Claude Code