Skip to content

Conversation

@Nsuccess
Copy link

Closes #248

What this PR does

Adds a Knowledge Graph layer to MemU, enabling relationship-aware memory retrieval.

Features Added:

  • KnowledgeGraph class using NetworkX for entity-relationship storage
  • Entity extraction LLM prompt for extracting entities and relationships from text
  • Graph traversal with get_subgraph_context() for context-aware retrieval
  • Entity deduplication with fuzzy matching
  • KnowledgeGraphMixin for easy service integration
  • 26 unit tests covering all functionality

Files Added:

  • src/memu/database/knowledge_graph.py - Core KnowledgeGraph class
  • src/memu/prompts/entity_extraction.py - LLM prompt for entity extraction
  • src/memu/app/knowledge_graph_mixin.py - Service mixin
  • tests/test_knowledge_graph.py - 26 unit tests

Dependencies:

  • Added networkx>=3.0 to pyproject.toml

Closes NevaMind-AI#248

- Add KnowledgeGraph class using NetworkX for entity-relationship storage
- Add entity extraction LLM prompt for extracting entities and relationships
- Add KnowledgeGraphMixin for service integration
- Add entity deduplication with fuzzy matching
- Add graph traversal with get_subgraph_context()
- Add 26 unit tests for Knowledge Graph functionality
- Add networkx>=3.0 dependency
@sairin1202
Copy link
Contributor

Hi Nsuccess, thank you for the suggestion. At the moment, the knowledge graph approach conflicts with our current system architecture, so we’re unable to accept it. We appreciate your understanding.

@sairin1202 sairin1202 closed this Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[2026NewYearChallenge] Knowledge Graph Memory with Entity Extraction

3 participants