Core Concepts Overview¶
GraphMem is built on four fundamental concepts that mirror how human memory works.
The Three Pillars¶
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ ingest() │ │ query() │ │ evolve() │
│ Learn new │ │ Recall + │ │ Mature │
│ knowledge │ │ Reasoning │ │ memories │
└──────┬──────┘ └──────┬──────┘ └──────┬──────┘
│ │ │
▼ ▼ ▼
┌─────────────────────────────────────────────────────────────┐
│ KNOWLEDGE GRAPH │
│ │
│ Entities ──[relationships]──▶ Entities │
│ │
│ With: Temporal validity, PageRank, Multi-tenant │
└─────────────────────────────────────────────────────────────┘
1. Knowledge Graph¶
When you ingest text, GraphMem extracts:
- Entities: People, companies, concepts, dates, numbers
- Relationships: How entities connect
- Attributes: Properties of entities
Creates:
┌────────────┐ ┌────────────┐
│ Elon Musk │──CEO──▶│ Tesla │
│ (Person) │ since │ (Company) │
│ │ 2008 │ │
└────────────┘ └────────────┘
Learn more about Knowledge Graph
2. Memory Evolution¶
Like human memory, GraphMem's memory evolves:
| Mechanism | What Happens | Human Equivalent |
|---|---|---|
| Decay | Unused memories fade | Forgetting curve |
| Consolidation | Similar memories merge | Sleep consolidation |
| Rehydration | Conflicts resolved | Memory updating |
| Importance | Hub entities prioritized | Synaptic strengthening |
3. Temporal Validity¶
Every relationship has a time window:
memory.ingest("John was CEO from 2010-2018")
memory.ingest("Jane became CEO in 2018")
memory.query("Who was CEO in 2015?") # → John
memory.query("Who is CEO now?") # → Jane
Learn more about Temporal Validity
4. Multi-Tenancy¶
Complete data isolation between users:
alice = GraphMem(config, user_id="alice")
bob = GraphMem(config, user_id="bob")
alice.ingest("I work at Google")
bob.query("Where does Alice work?") # → "No information found"
Learn more about Multi-Tenancy
How It All Fits Together¶
┌─────────────────────────────────────────────────────────────────┐
│ GraphMem │
├─────────────────────────────────────────────────────────────────┤
│ │
│ 📥 INGEST 🧠 UNDERSTAND 📤 RETRIEVE │
│ ───────── ─────────── ────────── │
│ • Text • Entity extraction • Semantic search │
│ • Documents • Relationship mapping • Graph traversal │
│ • Conversations • Alias resolution • Community query │
│ • Temporal tracking • Multi-hop reason │
│ │
│ 🔄 EVOLVE ⚡ OPTIMIZE 🔒 ISOLATE │
│ ──────── ────────── ───────── │
│ • Consolidation • PageRank scoring • Multi-tenant │
│ • Decay old info • Importance weighting • User isolation │
│ • Conflict resolve • Caching (Redis) • Session scoping │
│ │
└─────────────────────────────────────────────────────────────────┘
Data Flow¶
Ingest Flow¶
- Text is chunked semantically
- LLM extracts entities and relationships
- Entities are resolved (deduplicated)
- Embeddings are generated
- Data is stored in the graph
Query Flow¶
- Query is embedded
- Similar entities are found
- Related entities are traversed
- Context is assembled
- LLM generates answer
Evolve Flow¶
- PageRank is recalculated
- Unused memories decay
- Similar entities consolidate
- Conflicts are resolved
- Cache is invalidated