Skip to content

AI agents · Knowledge graphs

GraphRAG Knowledge Agent

An agent that reads plain text, turns it into a Neo4j knowledge graph, then answers questions about it in normal language.

Private project. Happy to walk you through it.

GraphRAG Knowledge Agent, sketched

Context

The problem

Vector search is great at finding similar text and bad at questions that hop across relationships, like “who supplies the companies this group owns?”. I wanted answers that follow real connections instead of guessing.

Approach

How I built it

  1. Gemini pulls people, companies and the links between them out of the text. Everything is checked against a schema before it's saved to Neo4j.

  2. To answer a question, the agent writes a Cypher query, runs it on the graph and explains the result in plain English.

  3. Generated queries are read-only, and every step has validation and error handling, so a bad query can't damage the graph.

Result

What came out of it

  • Answers that follow real relationships

  • Read-only queries by design

  • Errors caught at every step