GraphRAG
AI Engineer path · lesson 76 of 124Watch flat retrieval fail a multi-hop question, traverse a knowledge graph to connect the dots, see how an LLM extracts the graph as triples, and compare local (traversal) vs global (community-summary) queries.
No link between DeepMind → its acquirer → that company’s CEO → the quote. The model can’t bridge the hops.
Run the traversal to assemble the connected answer…
Key insight
Vector RAG found three correct facts but couldn’t connect them. GraphRAG walks the relationships — DeepMind → Google → Pichai → quote — ignoring off-path branches (London, YouTube). Relationships are the thing flat retrieval throws away.
How GraphRAG answers a global question
Order the GraphRAG indexing and query path.
Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.
- 1Drop a step here
- 2Drop a step here
- 3Drop a step here
- 4Drop a step here
- 5Drop a step here
- 6Drop a step here
Test your knowledge
Why can flat vector RAG fail on a multi-hop question?
The short version
Flat RAG hands you three index cards that each mention one fact. GraphRAG follows the strings pinned between them on a detective's board — DeepMind to its buyer to that buyer's CEO to the quote.
In more depth
GraphRAG
Flat (vector) RAG returns top-k similar chunks independently; for a multi-hop question the pieces live in different chunks with no link. GraphRAG indexes entities and relationships into a knowledge graph (often LLM-extracted) and traverses from the question's entities across edges to gather a connected subgraph. Great for relational and global questions; cost is graph construction. Many systems combine vector recall with graph expansion.
Interview Questions
References & Further Reading
Love this visualization?
Sign up to track your progress, earn achievements, use the AI assistant, and access your personal learning dashboard.
100% free • No credit card required