Graph Engineering Introduction 12 of 12 steps written

Building a retrieval layer that follows connections instead of matching resemblance

Twelve steps, four parts, three runnable labs.

Introduction

Your retrieval works and your answers are still wrong. You ask “what breaks if I change this”, “why did this start failing”, “what are we exposed to” — and get back documents that resemble the question instead of the facts connected to it.

Why tuning the retriever does not fix it

The reflex is to improve the search: a better embedding model, a reranker, a higher k, hybrid keyword-plus-vector. Those help when the answer is ranked low. They cannot help when the answer is ranked at zero — and on this kind of question it is, because the document holding the answer was written by someone who was not thinking about your question and shares no words with it.

In the three labs in this volume, the document that states the answer scores exactly zero against the question every time. No threshold promotes it. That is not a tuning problem, and recognizing it as a different problem is most of what this volume is for.

What graph engineering is

Graph engineering is the practice of converting documents into an explicit structure of entities and relations, so that retrieval can follow connections instead of matching resemblance.

Instead of storing documents and returning documents, you extract the facts inside them as triples — one subject, one relation, one object — and store how those facts connect. A question then starts at an entity and walks, one relation at a time, to facts no document mentioned alongside it.

You may know this as a knowledge graph. This volume just says graph: the compound adds nothing, and using both words invites the idea that they are two different things.

Where it sits in what you already run

It does not replace your retriever. Finding where to start is still a similarity problem, and this volume keeps it that way — a graph layer takes over after the first step, not instead of it.

the stepwhat does itwhere it stops
1. find the starting pointkeyword or vector search, over your existing indexat resemblance — it can only return what looks like the question
2. walk outwarda graph layer, following typed relations from thereat a hop budget you set, which is step 6
3. write it downserialize the reached subgraph into textat the size of the request block, which is step 7

So the honest framing is not “graphs instead of vector search”. It is: your search picks the starting point, and the graph decides what travels with it.

Is this for you?

It depends on the shape of your questions, not on the size of your corpus. Sort a few of your real ones:

question shapeexamplewhat it needs
descriptive“what does verify_signature do?”resemblance — you do not need this volume
descriptive“summarize the incident report”resemblance — a graph is pure overhead here
connective“what breaks if I change verify_signature?”connection — the answer is about a different entity
connective“why did this test start failing?”connection — the cause is hops from the symptom
connective“which products are exposed to this outage?”connection — the two ends share no vocabulary
Four cases where the answer is to build nothing. Your questions are descriptive. Your corpus is one tool’s output and is already joined. Your entities have no stable identifiers — this is the one that quietly sinks projects. Or your documents change faster than you can re-extract them. Step 11 puts numbers to this; it is raised here so you can stop reading early if it applies.

What it costs

Said before you are invested rather than after. A graph costs a vocabulary somebody maintains, an extraction pass over every document, and a rule for deciding when two names mean one thing. That last one is the hard part, and step 5 is about the two opposite ways it fails.

What you will build

A graph retrieval layer in eight stages, of which five are decisions you make and three are infrastructure you buy. Three runnable labs carry it — a test-failure triage, a code-and-git question, and a supply-chain exposure question. They share their core byte for byte, which is how the claim that the method is domain-independent is made checkable rather than asserted.

By the end you can tell which of your own questions need connection rather than resemblance, build the pipeline that answers them, and say what it cost.

What is original here, and what is not

The retrieval half of this volume is its own: the budget sweep, the hop sweep, the baseline comparison, and every measured figure. The construction half — schema design, extraction discipline, and the fusion pipeline — follows an established curriculum, and the steps that borrow from it carry a link to the source at the point they borrow. Full references are at the end of step 12.

How to read the source labels

Every step is labeled with where its content comes from, so you always know whether you are being told something or shown a measurement.

labelmeans
conceptargued from first principles, quotes nothing from a lab
demonstrateda lab prints the mechanism; quotes its own printed output
measureda lab compares two things; quotes figures from the comparison
hands-onyou run it on your own material
Nothing here is a benchmark. These graphs are 10 to 14 nodes and these corpora are five documents. They show a mechanism clearly and they prove nothing statistically. Step 12 lists every limit without hedging.
Build state: 12 of 12 steps written. The table of contents marks which.