DEV.co
RAG Frameworks · neo4j-labs

llm-graph-builder

llm-graph-builder transforms unstructured data (PDFs, documents, web pages, videos) into structured knowledge graphs stored in Neo4j using LLMs and LangChain. It provides a full-stack application with Python backend (FastAPI), React frontend, and support for multiple LLM providers including OpenAI, Gemini, Anthropic, and local models via Ollama.

Source: GitHub — github.com/neo4j-labs/llm-graph-builder
4.9k
GitHub stars
845
Forks
Jupyter Notebook
Primary language
Apache-2.0
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositoryneo4j-labs/llm-graph-builder
Ownerneo4j-labs
Primary languageJupyter Notebook
LicenseApache-2.0 — OSI-approved
Stars4.9k
Forks845
Open issues63
Latest releasev0.8.6 (2026-06-11)
Last updated2026-07-07
Sourcehttps://github.com/neo4j-labs/llm-graph-builder

What llm-graph-builder is

A full-stack application (Python 3.12+, FastAPI, React) that orchestrates LLM-based extraction of entities and relationships from unstructured sources, stores results in Neo4j 5.23+, and exposes conversational query interfaces with token tracking and configurable embedding models. Supports 11+ LLM providers and 5+ input sources (local, S3, GCS, YouTube, web).

Quickstart

Get the llm-graph-builder source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/neo4j-labs/llm-graph-builder.gitcd llm-graph-builder# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Enterprise Knowledge Graph Construction

Organizations processing large volumes of unstructured documents (contracts, reports, manuals) benefit from automated extraction into queryable Neo4j graphs for compliance, discovery, and risk analysis workflows.

RAG-Enhanced Q&A Systems

Build retrieval-augmented generation pipelines where LLM-extracted graph structures enable more precise semantic queries, entity filtering, and source attribution compared to vector-only retrieval.

Multi-Source Data Integration

Ingest heterogeneous content (YouTube transcripts, web articles, PDFs, S3 documents) into a unified knowledge graph, enabling cross-source relationship discovery and consolidated analytics.

Implementation considerations

  • Neo4j 5.23+ with APOC plugin is mandatory; Cypher variable-scope subquery syntax not available in earlier 5.x releases.
  • Python 3.12+ required for backend; frontend uses Node/Yarn; Docker-Compose deployment simplifies multi-tier orchestration.
  • LLM credential management (.env variables) must handle secrets securely; token tracking requires optional separate database (TOKEN_TRACKER_DB_*).
  • Embedding model selection impacts retrieval quality and cost; configurable per-user or globally via EMBEDDING_MODEL/EMBEDDING_PROVIDER env vars.
  • Neo4j Desktop deployments require separate backend/frontend deployment; docker-compose not supported.

When to avoid it — and what to weigh

  • Real-Time Streaming Data — System is designed for batch/document processing with LLM extraction; not suited for low-latency event streams or continuous data ingestion pipelines.
  • Strict Cost Control on LLM Calls — Every document extraction triggers LLM calls; token usage scales linearly with input volume. Organizations unable to absorb per-call LLM costs should evaluate cheaper schema extraction alternatives.
  • Offline-Only Environments — Requires active LLM API connectivity (OpenAI, Gemini, Anthropic, etc.) or Ollama setup. Airgapped deployments demand significant workarounds.
  • Simple Tabular Data Conversion — Over-engineered for structured data already in CSV/JSON format. Traditional ETL tools are simpler and cheaper for non-unstructured sources.

License & commercial use

Apache License 2.0 (Apache-2.0). Permissive OSI-approved license. Permits commercial use, modification, and distribution with inclusion of NOTICE and LICENSE files. No liability or warranty provided.

Apache 2.0 permits commercial use without additional fees or approval. However, review your organization's LLM provider terms (OpenAI, Gemini, Anthropic, etc.) and Neo4j licensing separately. Application itself imposes no commercial restrictions, but downstream dependencies may.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationAdequate
License clarityClear
Deployment complexityModerate
DEV.co fitStrong
Assessment confidenceHigh
Security considerations

Application handles LLM API keys, Neo4j credentials, and user data. Considerations: (1) .env files must not be committed; (2) Neo4j URI/credentials exposed in browser if login dialog used—mitigate via pre-configuration; (3) token tracking DB requires separate credential management; (4) no explicit mention of input sanitization (PDFs, web sources) or output validation; (5) Neo4j injection risks depend on LLM extraction quality—verify for production. Cloud deployments (GCP) inherit platform security; review IAM and network policies independently.

Alternatives to consider

LangChain + Custom Extraction Pipeline

More lightweight; you own the extraction logic and graph schema. Trade-off: no UI, requires development effort.

Amazon Neptune + AWS Glue for Entity Extraction

Managed graph database with AWS's extraction services. Trade-off: vendor lock-in, higher cost, less flexible LLM choice.

Graph-RAG / Microsoft's graph-rag

Purpose-built for graph-enhanced RAG; lighter than full knowledge graph builder. Trade-off: narrower scope (RAG-only), less UI polish.

Software development agency

Build on llm-graph-builder with DEV.co software developers

Evaluate llm-graph-builder for your enterprise knowledge extraction. We help you integrate, optimize LLM costs, and deploy securely to production.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

llm-graph-builder FAQ

Can I run this without Neo4j Aura (e.g., self-hosted Neo4j)?
Yes. Any Neo4j 5.23+ instance with APOC plugin works. Set NEO4J_URI, NEO4J_USERNAME, NEO4J_PASSWORD in backend .env. Desktop deployments require separate backend/frontend deployment (no docker-compose).
What LLM should I use to minimize cost?
Ollama (local, free) eliminates API costs but requires GPU/CPU. Groq and Fireworks offer cheaper inference than OpenAI. Token tracking (TRACK_USER_USAGE=true) helps monitor and optimize usage per user.
How do I secure API keys in production?
Use secrets management (e.g., GCP Secret Manager, AWS Secrets Manager, HashiCorp Vault) instead of .env files. Docker/Kubernetes can inject secrets at runtime. Never commit .env to version control.
Can I use this for real-time data ingestion?
Not designed for streaming. Process batch documents, then query results. For continuous ingestion, integrate extraction logic into a streaming pipeline (Kafka, Pub/Sub) separately.

Software development & web development with DEV.co

From first prototype to production, DEV.co delivers software development services around tools like llm-graph-builder. Our software development agency staffs experienced software developers and web developers for custom software development, web development, integrations, and ongoing support across rag frameworks and beyond.

Ready to Build Knowledge Graphs at Scale?

Evaluate llm-graph-builder for your enterprise knowledge extraction. We help you integrate, optimize LLM costs, and deploy securely to production.