Module 16
Graph Memory and Knowledge Graphs
Some questions are about connections, not similar text: which customers bought something containing an ingredient someone in their family is allergic to? You learn why vector memory struggles with multi-hop questions, how to model and query a knowledge graph with Cypher in Neo4j and Kuzu, and how to let an agent build and read graph memory safely with constrained extraction and entity resolution.
By the end of this module you can
- explain nodes, edges, properties and triples, and recognise when a question needs multi-hop traversal rather than similarity search.
- write Cypher with CREATE, MERGE, MATCH, WHERE and RETURN, using parameters and avoiding the MERGE duplicate trap.
- choose between Neo4j and Kuzu and run the same graph queries in both from Python.
- turn conversations into graph memory with schema-constrained LLM extraction and entity resolution done in code.
- give an agent safe, parameterised graph query tools and test graph memory with unit tests and labelled examples.
Lessons
3 in this module- 01Why graph memory mattersRecognise multi-hop questions that vector memory cannot answer, model facts as nodes, edges and triples, and walk a small graph in plain Python.
- 02Neo4j, Kuzu and Cypher basicsCreate, merge and query a Crumb graph of customers, purchases, products and allergens with Cypher in Kuzu and Neo4j, using parameters and avoiding common traps.
- 03Adding graph memory to an agentBuild graph memory for an agent with schema-constrained triple extraction, entity resolution in code, MERGE-based writes, safe query tools and tests.