LLM Graph Builder - Construct Knowledge Graphs from Unstructured Text (PDF, YouTube, Webpages)

llm graph builder

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

It uses ML models (LLM, Diffbot) to transform PDFs, web pages, and YouTube videos into a graph of entities and their relationships.

The frontend is a React Application and the backend a Python FastAPI application. It uses the llm-graph-transformer module that we contributed to LangChain.

Functionality Includes

  1. Connect to a Neo4j (Aura) instance

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

  3. Construct Graph with LLM / Diffbot

  4. Visualize Knowledge Graph in App

  5. Chat with your data with GraphRAG

  6. Open Neo4j Bloom for further visual exploration

  7. Use the constructed knowledge graph in your applications

llm graph builder viz

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

Public Demo

https://llm-graph-builder.neo4jlabs.com/

Authors

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

Community Support

Neo4j Online Community

Code Repository

GitHub

Issues

GitHub Issues

Installation

The Demo is available online, configured for OpenAI GPT and for Google Gemini on Vertex AI

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

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

Videos & Tutorials

llm knowledge graph construction