Hybrid Memory: Bridging Semantic Knowledge Graphs with Dense Vectors
Vector databases excel at fuzzy, semantic queries ("find code related to authentication"). Knowledge graphs excel at structured facts ("find who owns the authentication module").
Spector merges these two paradigms into a unified hybrid memory system.
The Unified Retrieval Funnel
When a query is received:
- Vector Retrieval: Computes similarity scores across dense vector spaces to identify key candidate nodes.
- Graph Expansion: Starting from the candidate nodes, Spector traverses Hebbian and Entity edges to retrieve related entities and chronological links.
- Fused Scoring: Combines vector cosine distance with graph weights to generate a final context package.
This hybrid approach ensures the agent gets both semantic flexibility and factual precision.