Knowledge Graphs & GraphRAG
Store facts as connected entities, query them with Cypher, build graphs from text with LLMs, and use them for retrieval that follows relationships.
Before this: AI Engineering (embeddings and RAG). Graph Neural Networks helps for the embeddings step but is optional.
-
12 min
Step 1What is a knowledge graph?
Entities and relationships as a graph, and why that structure helps.
Knowledge Graphs - ComputerphileComputerphile
-
8 min
Step 2Taxonomies, ontologies, and semantics
The vocabulary that defines what a graph's nodes and edges mean.
Taxonomy, Ontology, Knowledge Graph, and SemanticsOntology Explained: Philosophy and AI
-
3 min
Step 3Graph databases
A fast tour of Neo4j and the property graph model.
Neo4j in 100 SecondsFireship
-
4 min
Step 4Cypher basics
Create, match, and update nodes and relationships with Cypher.
Episode 2: Neo4j Cypher Basics: Reading & Writing DataNeo4j
-
1h 10m
Step 5Knowledge graph embeddings
TransE and friends: score missing links with learned vectors.
Stanford CS224W: Machine Learning w/ Graphs I 2023 I Knowledge Graph EmbeddingsStanford Online
-
24 min
Step 6Extract a knowledge graph from text with an LLM
Turn unstructured text into entities and relations using GPT-4o.
Extracting Knowledge Graphs From Text With GPT4oThu Vu
thu-vu92/knowledge-graph-llms★ 753 -
4 min
Step 7GraphRAG vs. vector RAG
Where retrieving connected facts beats retrieving similar chunks.
GraphRAG vs. Traditional RAG: Higher Accuracy & Insight with LLMIBM Technology
-
14 min
Step 8How GraphRAG works
Entity graphs, traversal, and multi-hop retrieval, and when you need them.
Graph RAG Simply Explainedcodebasics
-
14 min
Step 9Retrieval with Cypher queries
An LLM writes Cypher to answer questions from a graph database.
GraphRAG Explained: AI Retrieval with Knowledge Graphs & CypherIBM Technology
-
36 min
Step 10Build a GraphRAG pipeline
Ontology, extraction prompts, and graph retrieval in one Python project.
GraphRAG: Building a Smarter AI System (full walkthrough)Thu Vu
thu-vu92/graphRAG★ 100 -
16 min
Step 11Microsoft GraphRAG
Microsoft's community summaries for whole-corpus questions, and the indexing cost.
Graph RAG: Improving RAG with Knowledge GraphsPrompt Engineering
-
9 min
Step 12LightRAG
A cheaper graph index with dual-level retrieval.
LightRAG - A simple and fast RAG that beats GraphRAG? (paper explained)AI Bites
HKUDS/LightRAG★ 40.8k -
53 min
Step 13GraphRAG with Neo4j in practice
A workshop combining vector search and a graph for an agent.
RAG Needs a Map: Using GraphRAG to Retrieve Connected Context — Nyah Macklin, Neo4jAI Engineer
neo4j/neo4j-graphrag-python★ 1.3k
Build it
Watching isn't learning. Pick one and put it on GitHub.
- Extract a knowledge graph from 20 Wikipedia articles with an LLM, load it into Neo4j, and answer five multi-hop questions with Cypher.
- Build plain vector RAG and GraphRAG over the same documents and compare their answers on 10 questions that need connected facts.
- Index a small corpus with LightRAG and write up its indexing cost, speed, and answer quality next to Microsoft GraphRAG.