Theory
Vanilla RAG chunks documents, embeds them, retrieves the top-k by cosine similarity, and stuffs them into the prompt. It works — until the right answer requires connecting two facts that live in different chunks.
A KG fixes three concrete failure modes:
- Multi-hop questions — Which competitor of our supplier was founded by an ex-employee of Acme? Three hops; no single chunk contains the answer. A graph traversal returns it directly.
- Entity disambiguation — Java the island vs Java the language. Vector search confuses them; a KG distinguishes them with a
rdf:type. - Authoritative facts — What is our current return policy? You want the triple, not a summary of five drafts. KGs encode provenance and as-of dates natively (see PROV-O).
GraphRAG (Level 2) combines vector retrieval and graph traversal — best of both worlds.