Nexus Vectors - Vector database with graph tree structure
This crate provides vector storage and semantic search capabilities with a graph tree structure for hierarchical memory organization.
Features
- 384-dimensional embeddings: Compatible with all-MiniLM-L6-v2
- Cosine similarity search: Fast semantic search
- Graph tree organization: Hierarchical memory management with relevance boosting
- Priority-based boosting: High-priority memories get boosted scores
Performance Targets
- Search latency: <10ms for 1k vectors
- Memory efficiency: In-memory storage with indexing
Usage
use nexus_memory_vectors::{VectorDatabase, VectorEntry, EMBEDDING_DIMENSION};
let mut db = VectorDatabase::new();
let entry = VectorEntry::new(1, vec![0.1; EMBEDDING_DIMENSION], "general".to_string(), 1);
db.insert(entry).unwrap();
let query = vec![0.1; EMBEDDING_DIMENSION];
let (results, latency) = db.search(&query, 1, 10, 0.5).unwrap();