LociGraph
A retrieval-augmented generation system inspired by the Method of Loci: documents become a graph of connected memories, and answers are grounded in what the graph activates.

- Role
- Software developer
- Built with
- Python, FastAPI, spaCy, Sentence embeddings, React, TypeScript, react-force-graph, Docker
What it does
Upload PDFs or text, explore the semantic connections between their parts, and ask questions. Answers cite their sources ([1], [2]) and the graph replays which memories were activated to produce them.
- Keyword, semantic, hybrid and graph retrieval modes.
- Live memory graph and a node inspector for content, activation and neighbours.
- Works with any OpenAI-compatible model API.
How retrieval works
Documents are split into semantic chunks by comparing each sentence with the running centroid of the current chunk. Chunks become graph nodes, connected where their similarity is high enough.
In graph mode, a hybrid keyword/semantic score picks seed nodes; their activation is sharpened, then spread breadth-first across edges, decaying with each hop and weighted by edge similarity. The most activated chunks go into a prompt that requires a citation for every claim.