Official first-party Python package for building GraphRAG applications that combine Neo4j graph databases with LLMs and vector search.
neo4j-labs/llm-graph-builder
Web app that uses LLMs and LangChain to turn PDFs, docs, videos and web pages into a knowledge graph stored in Neo4j.
- Stars
- 5,281
- Forks
- 885
- Open issues
- 61
- Last commit
- 19 hours ago
What is it?
Knowledge Graph Builder converts unstructured content such as PDFs, DOCs, TXT files, YouTube videos and web pages into a structured knowledge graph in Neo4j. It uses large language models through the LangChain framework to extract nodes, relationships and their properties, and lets you define a custom schema for the extraction.
Files can be loaded from the local machine, S3, Google Cloud Storage or web sources. You pick an LLM provider such as OpenAI, Gemini, Diffbot, Anthropic or a local Ollama model. The app includes a Q&A chat that queries the data in Neo4j and returns source metadata with answers, and graphs can be previewed in Neo4j Bloom.
The project is a FastAPI backend with a React frontend, deployable via docker-compose or separately. It requires Neo4j 5.23 or later with APOC, and supports Neo4j Aura. Token usage tracking and embedding model selection are optional configuration.
Key features
- 01Builds knowledge graphs with nodes, relationships and properties from unstructured files.
- 02Imports data from local files, S3, Google Cloud Storage, YouTube and web pages.
- 03Supports multiple LLM providers including OpenAI, Gemini, Diffbot, Anthropic and Ollama.
- 04Allows custom schemas for entity and relationship labels.
- 05Provides a chat interface that answers questions over the graph with source metadata.
- 06Offers graph visualization in Neo4j Bloom.
Use cases
- Turning a collection of PDFs or reports into a queryable graph of entities and relationships.
- Building a GraphRAG chatbot over your own documents stored in Neo4j.
- Extracting structured knowledge from YouTube transcripts or web articles.
- Running extraction with a local Ollama model when data must stay on your own machine.
Quick start
- 1
Prerequisite: Python 3.12 and a Neo4j 5.23+ database with APOC
- 2
Create backend/.env from backend/example.env and set NEO4J_URI, NEO4J_USERNAME, NEO4J_PASSWORD, NEO4J_DATABASE
- 3
Create a virtual environment and install backend requirements
cd backend && python3.12 -m venv venv && source venv/bin/activate && pip install -r requirements.txt - 4
Start the backend server
uvicorn score:app --reload
Things to know
- Requires a Neo4j 5.23+ database with APOC installed; Neo4j Desktop needs separate backend and frontend deployment.
- Needs an LLM API key (for example OpenAI or Diffbot) to build graphs.
Topics
FAQ
- What is llm-graph-builder?
- Web app that uses LLMs and LangChain to turn PDFs, docs, videos and web pages into a knowledge graph stored in Neo4j. Knowledge Graph Builder converts unstructured content such as PDFs, DOCs, TXT files, YouTube videos and web pages into a structured knowledge graph in Neo4j. It uses large language models through the LangChain framework to extract nodes, relationships and their properties, and lets you define a custom schema for the extraction.
- Is llm-graph-builder free to use? What license does it have?
- llm-graph-builder is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is llm-graph-builder still maintained?
- Actively maintained. The last commit to llm-graph-builder was on Oct 21, 2026.
- What can I use llm-graph-builder for?
- Turning a collection of PDFs or reports into a queryable graph of entities and relationships. Building a GraphRAG chatbot over your own documents stored in Neo4j. Extracting structured knowledge from YouTube transcripts or web articles. Running extraction with a local Ollama model when data must stay on your own machine.
- How do I install llm-graph-builder?
- Prerequisite: Python 3.12 and a Neo4j 5.23+ database with APOC Create backend/.env from backend/example.env and set NEO4J_URI, NEO4J_USERNAME, NEO4J_PASSWORD, NEO4J_DATABASE Create a virtual environment and install backend requirements: cd backend && python3.12 -m venv venv && source venv/bin/activate && pip install -r requirements.txt Start the backend server: uvicorn score:app --reload
- Where can I get llm-graph-builder?
- The source code and installation instructions are on GitHub: https://github.com/neo4j-labs/llm-graph-builder
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A lightweight knowledge-graph RAG framework and server that indexes documents into entities and relations for retrieval-augmented LLM answers.
A graph-native memory system for AI agents that stores conversations, builds knowledge graphs and records reasoning, backed by Neo4j.
A Python data pipeline that uses LLMs to extract structured knowledge graphs from unstructured text for retrieval-augmented question answering.
Python framework for building temporal knowledge graphs that track how facts change over time, used as memory and context for AI agents.
A local code knowledge graph that gives AI coding tools precise review context over MCP and a CLI.