Skip to content

About

Turn documentation into a knowledge graph — with a GraphRAG demo, for information architects

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Knowledge Graphs for Information Architects

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.

Knowledge graph of Sample docs

Why this exists

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.

What it demonstrates

  1. build_graph.py — converts doc topics into a graph of Topics, Concepts, and Products using RDF-style triples (subject → predicate → object).
  2. 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)
  3. graphrag_demo.py — contrasts flat RAG (one isolated chunk) with GraphRAG (chunk + its traversed prerequisites), the graph version of the chunking-context problem.
  4. visualize.py — renders the graph to docs/graph.png.

Quick start

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.png

The mental model: triples

Everything 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.

Where this goes next

  • 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.

See also


Built by Bipin Pandey · MIT License

About

Turn documentation into a knowledge graph — with a GraphRAG demo, for information architects

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages