GraphMinds
My MSc thesis at Birmingham, combining knowledge graphs and local language models to answer questions about documents without sending them to the cloud.
MSc thesis at the University of Birmingham, supervised by Professor Christopher Baber.
The difference appeared on multi-hop questions; straightforward factual recall was similar to plain RAG.
GraphMinds was my MSc thesis at the University of Birmingham, supervised by Professor Christopher Baber. I wanted to ask a language model questions about sensitive documents without sending those documents to the cloud. I also wanted to be able to follow its answer back to the material it had used. Running locally solved only the first part.
The system extracts entities and relationships from unstructured text using sentence transformers and named entity recognition, then builds a graph in NetworkX. When a question arrives, it retrieves a relevant subgraph and passes that context to a language model running through Ollama. The model receives connected facts rather than only a collection of text fragments.
A path back to the documents
Answers carry a citation trail through the documents, entities and relationships involved. PyVis makes the graph available to explore directly. A reader can follow a connection and ask whether it belongs there. The system is designed to acknowledge missing support; the graph can still contain a bad extraction, and the model can still misunderstand what it is given.
The full pipeline runs offline: document ingestion, graph construction and language-model inference. No cloud processing or telemetry is needed. Keeping that boundary around the documents was a requirement of the thesis, not an optional mode added afterwards.
Where the graph made a difference
In comparisons with plain retrieval-augmented generation, straightforward factual recall produced similar results. The difference appeared on multi-hop questions, where an answer depends on joining information across documents. The graph gives retrieval those relationships explicitly. The result supports that use case; it does not establish that graph retrieval is the better choice for every question.
This is the combination that kept my attention after the thesis. Graphs give me a way to represent relationships precisely. Language models handle the language around them. Bringing the two together lets me build a system whose answers can be checked against a path through the original documents.