Week 13 — Knowledge Graphs as Structured Agent Memory
Retrieval · Knowledge Graph · Agents
Advanced
V — Graph engineering
Overview
Switch from model internals to the information system around the model. Facts become explicit triples; retrieval becomes path search as well as semantic similarity. The eight-layer pipeline: ingestion → extraction → entity resolution → graph storage → retrieval → agent → verification → update.
What You Will Learn
- Represent evidence as subject–relation–object triples.
- Explain why entity resolution must precede scale.
- Build vector + entity + path + temporal retrieval.
- Answer a multi-hop question via a graph path.
Core Concepts
Triples
\text{Subject}\rightarrow\text{Relation}\rightarrow\text{Object}
Eight-layer pipeline
ingestion, extraction, entity resolution, graph storage, retrieval, agent, verification, update.
Hybrid retrieval
Vector lookup + entity lookup + path search + community retrieval + temporal filtering.
Prerequisites
Work these pages on this site before the lecture.
Lecture notes
The eight layers are a pipeline, not a slogan: ingest → extract triples → resolve entities → store → retrieve (vector + entity + path + temporal) → agent → verify → update. Skipping resolution splits one real-world entity into two nodes and every multi-hop path dies.
A path beats a vector on “why / who / before” questions; a vector wins on fuzzy paraphrase. Your lab must show one question of each kind, including a case where the graph loses.
Required readings
Related on this site
Lab / Implementation
Convert a small document collection into entity/relation/evidence records and load them into Neo4j; implement vector + entity + path retrieval (Lab 1) and answer one multi-hop 'why?' via a path (Lab 2).
Not on this site (paper reading required)
- triples/extraction
- entity resolution
- the 8-layer pipeline
- Cypher/Neo4j
- grounding
Mastery Check
- DERIVE: the eight-layer pipeline; when a path beats a vector
- IMPLEMENT: docs→triples→resolution→Neo4j→hybrid retrieval
- BENCHMARK: multi-hop accuracy, path correctness, latency
- DEBUG: an entity-resolution miss splitting a node
- EXPLAIN: why resolution must precede scale