Constructing Knowledge Graphs with Neo4j GraphRAG for Python
Construct knowledge graphs from unstructured data with Neo4j GraphRAG for Python. Define schemas, tune chunking, and build GraphRAG retrievers.
In this 2-hour course, you will learn
This course teaches you how to construct knowledge graphs from unstructured data using the Neo4j GraphRAG for Python package. You will use an LLM-powered pipeline to turn documents into a queryable graph of entities and Full definition for relationship (opens in a new tab)A named, directed connection between two nodes. Every relationship has a type, a start node and an end node., then build Full definition for GraphRAG (opens in a new tab)Retrieval-augmented generation whose context comes from a knowledge graph, so the model can follow the relationships between facts. Full definition for retriever (opens in a new tab)A component that searches a data source and returns the information relevant to a query. Often used to provide context for a language model. that answer questions from it.
Most of the information organizations hold sits in unstructured text: reports, articles, documentation, transcripts. A Full definition for knowledge graph (opens in a new tab)A representation of real-world entities and their relationships, stored according to organizing principles, typically in a graph database. makes that information usable by extracting the entities it describes and the relationships between them. This course covers the full journey — extracting a schema, building the graph, enriching it with structured data, retrieving from it, and customizing every stage of the pipeline for your own data.
Create a Knowledge Graph Using Neo4j GraphRAG for Python
Build a fully functional knowledge graph by installing and configuring the Neo4j GraphRAG for Python library and connecting it to a live Neo4j database.
Model a Knowledge Graph of Structured and Unstructured Data
Define entity schemas and relationships to represent both structured records and unstructured text, transforming raw content into a queryable graph structure.
Query a Knowledge Graph Using Retrievers
Write retrieval queries using GraphRAG retrievers to extract contextually relevant information from your knowledge graph for use in RAG pipelines.
Customize the Knowledge Graph Build Process
Configure chunking strategies, entity extraction prompts, and pipeline parameters to control how source documents are parsed and ingested into the graph.
4 modules, 2 hours.
Who this course is for
This is an advanced course for Python developers, data engineers, and AI engineers who want to build Full definition for knowledge graph (opens in a new tab)A representation of real-world entities and their relationships, stored according to organizing principles, typically in a graph database. construction pipelines. If you have completed the fundamentals courses and want to move from querying a prepared graph to creating one from your own documents, this course is the next step. It is hands-on throughout: you will spend most of your time running and modifying Python programs, inspecting the graphs they produce, and tuning the pipeline configuration to improve the results. You should have completed Neo4j Fundamentals, Cypher Fundamentals, and Neo4j & GenerativeAI Fundamentals, and be comfortable reading, running, and editing Python programs.
What you'll build and do
You work in an empty Neo4j sandbox, which means every Full definition for node (opens in a new tab)A vertex in a graph. In a property graph it can carry labels and properties. in your Full definition for knowledge graph (opens in a new tab)A representation of real-world entities and their relationships, stored according to organizing principles, typically in a graph database. is one your pipeline created — you can trace each result back to a decision you made. The course provides a ready-to-run development environment and code for each lesson.
You will use the
neo4j_graphragpackage'sSimpleKGPipelineto build your first knowledge graph from text, then take control of the process: extracting a schema from documents with an Go to glossary for large language model (opens in a new tab)A model trained on text to predict the next token, and so to generate language., defining your own schema to constrain what gets extracted, and experimenting with chunk size to see how it changes the graph. You will add structured data alongside the extracted entities to improve answer quality, and build two Full definition for retriever (opens in a new tab)A component that searches a data source and returns the information relevant to a query. Often used to provide context for a language model. over the result: a vector + Full definition for Cypher (opens in a new tab)Neo4j'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. retriever that combines semantic search with graph Full definition for traversal (opens in a new tab)Following relationships from one node to the next to reach other parts of a graph., and a text-to-Cypher retriever that turns natural language into queries. The final challenge is open-ended — you bring your own documents and construct a knowledge graph from them.Where to go next
A natural next step is Context Graphs: Agent Memory with Neo4j, where the same extraction techniques power an AI agent's long-term memory — entities are extracted from live conversations rather than static documents, and the agent records its reasoning into a graph. If you build with LangChain, Using Neo4j with LangChain shows you how to implement vector, graph, and text-to-Cypher retrieval in the LangChain ecosystem. This course also prepares you for the Neo4j & Generative AI Certification, which tests Full definition for knowledge graph (opens in a new tab)A representation of real-world entities and their relationships, stored according to organizing principles, typically in a graph database. construction alongside Full definition for GraphRAG (opens in a new tab)Retrieval-augmented generation whose context comes from a knowledge graph, so the model can follow the relationships between facts. and Full definition for vector search (opens in a new tab)Finding the records whose vectors lie closest to a query vector. skills.