Neo4j LLM Knowledge Graph Builder - Extract Nodes and Relationships from Unstructured Text (PDF, YouTube, Webpages)

llm graph builder

The Neo4j LLM Knowledge Graph Builder is an online application for turning unstructured text into a knowledge graph, it provides a magical text to graph experience.

It uses ML models (LLM - OpenAI, Gemini, Llama3, Diffbot) to transform PDFs, web pages, and YouTube videos into a graph of entities and their relationships, which it stores in your Neo4j database.

  • best results for files with long-form text in English

  • not suited for tabular data like Excel or CSV or images/diagrams/slides

  • higher quality data extraction if you configure types for nodes and relationships in the settings ()

The front-end is a React Application and the back-end a Python FastAPI application. It uses the llm-graph-transformer module that Neo4j contributed to LangChain.

Here is a quick demo:

Functionality Includes

  1. Open the LLM-Knowledge Graph Builder

  2. Connect to a Neo4j (Aura) instance

  3. Provide your PDF files, Youtube URLs, Wikipedia Keywords or S3/GCS buckets

  4. Construct Graph with LLM / Diffbot

  5. Visualize Knowledge Graph in App

  6. Chat with your data with GraphRAG

  7. Open Neo4j Bloom for further visual exploration

  8. Use the constructed knowledge graph in your applications

llm graph builder viz
  • Login, or create an account at

  • Under Instances, create a new AuraDB Free Database

  • Downloads the credentials file

  • Wait until the instance is running

  • Drop the credentials file on the connect dialog for the LLM Graph Builder

How it works

  1. Uploaded Sources are stored as Document nodes in the graph

  2. Each document (type) is loaded with the LangChain Loaders

  3. The content is split into Chunks

  4. Chunks are stored in the graph and connected to the Document and to each other for advanced RAG patterns

  5. Highly similar Chunks are connected with a SIMILAR relationship to form a kNN Graph

  6. Embeddings are computed and stored in the Chunks and Vector index

  7. Using the llm-graph-transformer or diffbot-graph-transformer entities and relationships are extracted from the text

  8. Entities are stored in the graph and connected to the originating Chunks

Online Application


Michael Hunger, Tomaz Bratanic, Niels De Jong, Morgan Senechal, Persistent Team

Community Support

Neo4j Online Community




GitHub Issues


LangChain KG Construction Module


The LLM Knowledge Graph Builder Application is available online.

You can also run it locally, by cloning the GitHub repository and following the instructions in the file.

It is using Docker for packaging front-end and back-end, and you can run docker-compose up to start the whole application.

Videos & Tutorials

llm knowledge graph construction

Detailed Walk-Through

Livestream LLM-Knowledge Graph Builder