Entities, relations, and triples
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.
The unit of work is not the document
Retrieval systems store documents and return documents. A document is an arbitrary container: it is whatever a person happened to write in one sitting. The fact you need is usually one clause inside it, and the fact that completes the answer is a clause in a different document written by someone else.
Graph engineering changes the unit. The unit is the triple.
Triple — one subject, one relation, one object. “Release v4.2.0 includes change CHG-7043” is a triple. A document of forty sentences yields perhaps eight triples, and the other thirty-two sentences are prose about them.INCLUDES is one of eight types the schema permits, which is step 4.A graph is two things
| what it is | what it carries | |
|---|---|---|
| node | one entity, named once | a label saying what kind of thing it is |
| edge | one relation between two nodes | its direction, the document it came from, and a confidence |
That is the entire definition. There is no third element. Everything else in this volume is a decision about how nodes and edges get made, kept or refused.
What the structure buys
Once relations are explicit, two things are true that were not true of the documents.
Paths exist that no document states. If one document says a test covers a framework and another says a submission changed that framework, the graph contains a two-step path from the test to the submission. Neither document mentions the other.
The connection is queryable. “What is three steps from here” is a question you can ask of a graph and cannot ask of a corpus.
What it costs, stated up front
A graph is not free and this volume is not a recommendation to build one. It costs a vocabulary somebody maintains, an extraction pass over every document, and a rule for deciding when two names mean one thing. Step 11 puts a number on that and names the cases where you should not pay it.
What to take from this step
- The unit is the triple, not the document. A document is an arbitrary container.
- A graph is nodes and edges. There is no third element.
- The payoff is paths that no single document states — and the price is a schema, an extractor and a resolution rule.