Forward-deployed / Learning zone
Knowledge graphsa standalone module
Lesson 06

Knowledge graphs & LLMs

TL;DR

Knowledge graphs and language models fix each other's defining weaknesses, in both directions. Graph → LLM: a model's knowledge is latent, frozen, and unattributable — it will state your customer count fluently and wrongly. A graph supplies explicit, current, citable facts to ground generation, via GraphRAG (retrieve subgraphs, not just text chunks), text-to-query (the model translates a natural-language question into Cypher/SPARQL and the database answers), and graph-shaped memory for agents. LLM → graph: construction was always the bottleneck, and extraction — reading contracts and tickets and drafting entities, relationships, and mappings — is exactly the labor LLMs made an order of magnitude cheaper. The circle closes into a flywheel: the model helps build the graph; the graph keeps the model honest. The discipline holding it together: LLM-drafted facts enter the graph only through the confidence-and-review pipeline, never straight from generation into "truth." A hallucinated fact, once stored, launders itself into every downstream answer with a straight face.

🎯 For the product leader

Why it matters — This intersection is why knowledge graphs left the semantic-web ghetto and landed on product leaders' roadmaps. "Our assistant answers from our facts, with citations, respecting our permissions" is a product claim vector-only RAG makes weakly and a graph makes strongly. Your enterprise buyers can tell the difference in the security review.

What it changes in your decisions — Grounding stops being a model-quality line item ("reduce hallucinations") and becomes an asset decision: what knowledge do we own, how fresh is it, and which answers must be provably sourced? It also reprices graph construction — the pre-LLM cost estimates in your old business case are stale.

Ask yourself — "When our AI feature answers a customer, can it cite the fact, the fact's source, and the reason this user was allowed to see it?"

Risk if ignored — An assistant that hallucinates policy in your brand's voice. Or the quieter failure: an LLM-built graph whose unreviewed errors surface a year later as confidently cited "facts" in front of your biggest account.

Direction one: the graph grounds the model

Plain RAG retrieves text chunks that look similar to the question. That fails structurally on two question types. Multi-hop questions ("which of our customers are exposed to Supplia's recall?") have no single-chunk answer, because the answer is a path across systems. Global questions ("what are the main themes in this quarter's tickets?") need a summary over everything, not any one retrievable passage. Graph-augmented retrieval answers both by retrieving structure:

Graph-augmented retrieval

Retrieving structure, not just similar text · answers both multi-hop and global questions

Permissions apply at retrieval — the assistant's knowledge shrinks to the asker's entitlements.

User question
Retrieval planner
Similarity is enoughVector search — relevant text chunks
Multi-hop / preciseGraph retrieval — entities + subgraph, or text-to-Cypher
Global / thematicCommunity summaries — pre-built over graph clusters
Assembled context — facts + passages + provenance
Answer with citations — every claim → fact → source

Permissions are applied to graph retrieval before context assembly, not after.

Three patterns to know by name:

Two properties make this pattern enterprise-grade rather than merely accurate. Provenance flows through — claim → fact → source document — for auditable answers. Permissions apply at retrieval — the graph knows who may see which subgraph, so the assistant's knowledge shrinks to the asker's entitlements (the leakage problem, solved at the right layer). For agentic products, the same graph serves as structured memory. Facts an agent learns get written back as triples with provenance — queryable and reviewable — instead of accumulating in an unauditable text scratchpad.

Direction two: the model builds the graph

Construction was always the cost center. Its most expensive station — reading unstructured text and drafting structured facts — is now LLM work: entity and relationship extraction from contracts and tickets, schema-mapping suggestions, even candidate scoring for entity resolution. Teams that shelved knowledge-graph plans in 2019 because "we'd need an NLP team" should re-run that math. This repricing is a big part of why the field revived.

The discipline that keeps it from backfiring:

Choosing your grounding posture

Posture What it is Right when Watch out
Vector RAG only Chunks + similarity Q&A over documents; single-hop answers; speed to ship Multi-hop and aggregate questions quietly wrong; weak citation granularity
+ Text-to-query Model writes queries against structured stores Quantitative questions with a clean schema Query errors need validation + evals; schema sprawl hurts
+ GraphRAG Subgraphs & community summaries in context Multi-hop, cross-entity, global questions; citation and permission rigor Indexing cost; freshness burden; needs a graph worth querying
Fine-tuning Bake knowledge into weights Style, format, domain language Wrong tool for facts: stale on arrival, unattributable — see fine-tune vs. RAG

The postures stack — most serious deployments end at "hybrid." The sequencing advice is unglamorous: start with vector RAG, measure where it fails (retrieval evals), and let the observed failure types — multi-hop, quantitative, global — justify each graph investment in order.

Failure modes

Practitioner checklist