Building Knowledge Graphs with LLMs
Start building knowledge graphs with LLMs. Use the Neo4j LLM Graph Builder to turn unstructured text into a knowledge graph and query it with Cypher.
In this 1-hour course, you will learn
Building Knowledge Graphs with LLMsA model trained on text to predict the next token, and so to generate language. teaches you how to turn unstructured text into a knowledge graphA representation of real-world entities and their relationships, stored according to organizing principles, typically in a graph database. using a large language model, without writing a line of extraction code. In around an hour you will upload documents to the Neo4j LLM Graph Builder, watch an LLM identify the entities and relationshipsA named, directed connection between two nodes. Every relationship has a type, a start node and an end node. in the text, refine the schema it works to, and query the finished graph with CypherNeo4j's implementation of GQL, the ISO standard query language for graph databases. It is declarative: you describe the pattern to find, and the database decides how to find it..
Knowledge graphs sit at the heart of grounded generative AIModels that produce new content rather than classifying or scoring content that already exists.. Techniques such as GraphRAGRetrieval-augmented generation whose context comes from a knowledge graph, so the model can follow the relationships between facts. depend on a graph that connects the entities in your domain, but most of the information those graphs need is locked away in unstructured sources: PDFs, wiki pages, transcripts, and reports. LLMs change the economics of building them - a model that can read and summarise a document can also extract the people, concepts, and relationships it describes.
Knowledge Graphs
What a knowledge graph is and how it can support the operation of GenAI applications.
Unstructured Data
How a knowledge graph can be created from unstructured data using an LLM.
LLM Graph Builder
How to use the LLM Graph Builder to create a prototype knowledge graph and explore your data.
Query Knowledge Graphs
How to query a knowledge graph using Cypher.
3 modules, 1 hour.
Who this course is for
This course is for developers, data scientists, and architects who have unstructured data and want to work with it as a graph - especially if you are building a GraphRAGRetrieval-augmented generation whose context comes from a knowledge graph, so the model can follow the relationships between facts. application and the missing piece is the knowledge graphA representation of real-world entities and their relationships, stored according to organizing principles, typically in a graph database. itself. It is also a fast route to a prototype: the LLMA model trained on text to predict the next token, and so to generate language. Graph Builder is a visual tool, so you can evaluate whether knowledge graph construction works for your documents before committing to a code-first pipeline. You should be comfortable reading a graph data modelThe labels, relationship types and properties chosen to represent a domain., writing simple
MATCHpatterns, and understand how knowledge graphs ground LLM answers; the prerequisite courses are listed beside this overview.What you'll build and do
You will build a knowledge graphA representation of real-world entities and their relationships, stored according to organizing principles, typically in a graph database. from real course material: lessons from the Neo4j & Generative AI Fundamentals course, converted to PDF, so you can judge the quality of the extraction because you know the source. GraphAcademy provides a blank Neo4j Aura instanceA single Neo4j database running in Aura., and the Neo4j LLM Graph Builder runs in your browser and connects directly to it - you do not need to install anything.
After exploring an existing knowledge graph to see what you are aiming for, you upload a document and generate a graph from it. The first pass is deliberately unrestricted, and you will see how quickly an open schema becomes noisy - so you define graph patterns such as
(Technology)-[:HAS]->(Capability)to focus the extraction, regenerate, and compare. Finally you inspect theDocument,Chunk, andEntitymodel the tool creates and write CypherNeo4j's implementation of GQL, the ISO standard query language for graph databases. It is declarative: you describe the pattern to find, and the database decides how to find it. queries that trace an extracted entity back to the exact chunk of text it came from.Where to go next
When you outgrow a visual tool, Constructing Knowledge Graphs with Neo4j GraphRAG for Python shows you how to build the same pipeline programmatically with the
neo4j-graphragpackage. To go deeper on how unstructured data is embedded and searched, Introduction to Vector Indexes and Unstructured Data covers the vector side, and Developing with Neo4j MCP Tools connects AI agents to the graph you have built. This course also counts toward the Neo4j & Generative AI Certification, which validates your ability to build GenAI applications backed by Neo4j.