Knowledge graphs, context graphs and procedural graphs
A knowledge graph stores facts as a network of things (nodes) joined by relationships (edges), like Flight AI-302 → departs from → Gate C8. For AI agents it helps to think in three layers: the knowledge graph says what is true, a context graph picks out what matters right now, and a procedural graph says what to do next.
Everyday analogy
A city. The full city map is the knowledge graph. The few streets around you on your phone's navigation screen are the context graph. The turn-by-turn directions are the procedural graph.
Example
An airline agent is asked to rebook a passenger. The knowledge graph holds all passengers, flights, fares and policies. For this decision it pulls a small context graph: this passenger, flight AI-302 (34 of 185 seats taken), Gate C8, 4 seats left on the next flight, 9 minutes to boarding close. The procedural graph then guides it: check availability → compare options → apply fare rules → check visa if needed → if no options, hand over to a human.
| Layer | Question it answers | What it holds | Changes |
|---|---|---|---|
| Ontology | What do things mean? | The types of things and allowed relationships (a passenger books a flight) | Rarely |
| Knowledge graph | What's true? | Stable facts across the organisation | Slowly |
| Context graph | What matters now? | A small, relevant slice for this one decision: live state and recent history | Every request |
| Procedural graph | What do I do next? | Steps, the paths between them and the rules (constraints) | When the process changes |
Facts as triples
Every fact in a knowledge graph is a simple sentence of three parts: subject → relationship → object.
- Priya → works in → Finance
- Finance → is managed by → Sam
- So the graph can answer: who is Priya's manager? Sam.
A plain vector search finds text that sounds similar; a graph can follow the links between facts. GraphRAG combines the two.
Why it helps agents: don't load everything. Scope the graph to the decision in front of the agent, let the procedure guide (not dictate) the next step, and keep a trace of what happened so the graphs can be corrected when they turn out to be wrong.
Try it yourself
About 15 minDraw a mini knowledge graph
- Pick your family or team. Draw circles for 6 people, places or things.
- Join them with labelled arrows like works in, manages, lives in.
- Ask yourself a question the drawing can answer by following two arrows, e.g. Who manages my brother's team?
What you should see: Following the arrows answers questions that a keyword search over the same text would struggle with.
Use any free AI chatbot (ChatGPT, Claude, Gemini or Copilot). Never paste private or confidential information.