feat(memory): graph-aware retrieval with BFS traversal and RRF fusion (#1226)#1250
Merged
feat(memory): graph-aware retrieval with BFS traversal and RRF fusion (#1226)#1250
Conversation
…#1226) Phase 3 of graph memory epic (#1222): augment existing recall with graph traversal, scoring, and context injection. - Add graph_recall function with fuzzy word-split entity matching, depth-tracked BFS expansion, composite scoring, and deduplication - Add bfs_with_depth to GraphStore with MAX_FRONTIER=300 guard against SQLite bind variable limit - Add MemoryRoute::Graph variant with RELATIONSHIP_PATTERNS heuristic - Add BudgetAllocation.graph_facts (4% when graph-memory enabled) - Add recall_graph method to SemanticMemory with graph_store field - Add graph facts context injection with [known facts] prefix, fact-by-fact token budget enforcement, and sanitization - Add GraphConfig to MemoryState for runtime recall_limit/max_hops - Use f32::total_cmp for NaN-safe composite score sorting
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
Phase 3 of graph memory epic (#1222): graph-aware retrieval with BFS traversal, composite scoring, and context injection.
Closes #1226
[known facts]prefix, fact-by-fact token counting, sanitization via sanitize_memory_message (6th memory path)Security
Test plan
cargo +nightly fmt --checkcargo clippy --workspace --features full -- -D warningscargo nextest run --workspace --features full --lib --bins(4189 passed, 11 skipped)