Track 02 · RetrievalLesson 09 of 11
When questions need a graph
Relationship questions break chunk stores; know when a knowledge graph pays off.
- Specialisation · Decision platforms
- 35 min read
- 75 min hands-on
- Halden Freight
- Pro
What you'll be able to do
01- Diagnose which questions a chunk store cannot answer reliably (multi-hop, aggregation, "which X relate to Y") and explain why.
- Design a property-graph schema for a customer domain, with node labels, relationship types, properties, constraints and provenance.
- Implement knowledge-graph construction with LLM extraction plus entity resolution, and query it with Cypher.
- Explain Microsoft's GraphRAG (community detection, community summaries, local vs global search) and when its indexing cost is justified.
- Choose between a graph, hybrid graph + vector retrieval, SQL, or plain RAG, and defend the choice on cost and maintenance.
Before you start
- Rewriting, routing and fusing queries: query decomposition and routing to multiple sources.
- Retrieval that plans, checks and retries: multi-hop questions answered by iterative retrieval, and the signal that repeated hop patterns belong in a graph.
- Vector stores and HNSW tuning: vector indexes, which Neo4j also provides.
- Basic SQL joins. If you can read a three-table join, you can read Cypher.
The short version
A chunk store finds passages that look like the question. It does not know that Brightwater Lines runs the Rotterdam–Santos lane, that its 2026 contract supersedes the 2024 one, or that three other carriers also serve Santos. Ask "which carriers into Santos have a late-delivery cap below 10%?" and it returns the most similar-looking clauses, often from the wrong carrier, and the model writes a confident answer. A knowledge graph stores entities and typed relationships explicitly, so the question becomes a traversal with a correct, complete, citable answer. The cost is real: you design a schema, extract and resolve entities (often with LLMs), keep the graph in sync, and own its quality. GraphRAG (Microsoft, Edge et al. 2024) goes further, clustering the extracted graph into communities and pre-summarising them to answer corpus-wide "what are the themes?" questions. Build a graph when relationships drive the questions and someone will own the schema; otherwise, use SQL or plain RAG.
Key takeaways:
- Graphs win on multi-hop, aggregation, completeness ("all carriers that…") and relationship questions. Chunk stores win on "what does the document say about…".
- The schema is the product. Design node labels and relationship types from the questions users ask, not from what an LLM happens to extract.
- Entity resolution decides whether the graph is usable. "Brightwater Lines B.V.", "BRIGHTWATER LINES" and "Brightwater" must be one node.
- Hybrid retrieval is the common production pattern: vector search to find entry points, graph traversal to expand and constrain.
- GraphRAG-style indexing is expensive (LLM calls over the whole corpus, plus community summaries). Pilot on a slice and measure before committing.
Pro lesson
The rest of this lesson is in Pro.
The mental model, worked example, field note, failure table, exercise and self-check, with the voice tutor.
- Every stage and specialisation, in full
- Every lab and every role project
- Halden weeks 2–10, on your record
- Every drill, live in the playground
- All solutions, plus the server judge
- Lab Assistant and every Teach with AI