A hands-on demo that turns a set of Actian data-platform documentation topics into a knowledge graph, then shows why that graph answers questions a taxonomy or flat metadata table cannot — including GraphRAG, the graph-powered evolution of retrieval for AI.
Built as a learning project by an information architect, for information architects moving into AI-ready content work.
Information architecture already thinks in entities and relationships — it just keeps them implicit:
| IA concept | Knowledge graph equivalent |
|---|---|
| Taxonomy (topic hierarchy) | Nodes + BELONGS_TO edges |
| Controlled vocabulary / concepts | Concept nodes |
| Metadata fields | Node attributes |
| "Related topics" links | COVERS / shared-concept edges |
| Prerequisite ordering | REQUIRES edges |
A knowledge graph makes all of that explicit and machine-traversable — which is exactly what AI retrieval needs.
build_graph.py— converts doc topics into a graph of Topics, Concepts, and Products using RDF-style triples (subject → predicate → object).query_graph.py— answers real IA questions by traversal:- the full prerequisite learning path to any topic
- related topics via shared concepts (auto-derived "related reading")
- thin-coverage concepts (a content-gap signal for governance)
graphrag_demo.py— contrasts flat RAG (one isolated chunk) with GraphRAG (chunk + its traversed prerequisites), the graph version of the chunking-context problem.visualize.py— renders the graph todocs/graph.png.
pip install -r requirements.txt
python src/build_graph.py # build + stats
python src/query_graph.py # IA traversal questions
python src/graphrag_demo.py # flat RAG vs GraphRAG
python src/visualize.py # render docs/graph.pngEverything in the graph is a triple — (subject) --predicate--> (object):
(api-auth) --REQUIRES--> (install-guide)
(api-auth) --COVERS--> (authentication)
(api-auth) --BELONGS_TO--> (Data Platform)
This is the same model behind RDF/SPARQL (the W3C semantic-web standard) and
Neo4j's labeled property graphs. This demo uses networkx so it runs anywhere
with no database, while the triple thinking transfers directly to those tools.
- Swap the seed data for a real doc export (the topic schema is in
data/topics.json). - Add an ontology layer (formal types and allowed relationships).
- Feed
graph_retrieval()output into an LLM prompt for a working GraphRAG answer.
- Knowlayer — making enterprise content AI-ready
- Chunking deep-dive — the companion piece on retrieval context
Built by Bipin Pandey · MIT License
