Neo4j and Generative AI Workshop
Build a GraphRAG pipeline in this Neo4j GenAI workshop: extract a knowledge graph from PDFs, add vector search, and create retrievers with Python.
In this 2-hour workshop, you will learn
The Neo4j and Go to glossary for generative AI (opens in a new tab)Models that produce new content rather than classifying or scoring content that already exists. Workshop is a hands-on Neo4j workshop in which you build a complete 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. pipeline: you construct 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. from unstructured PDF documents, enrich it with structured data, add Full definition for vector search (opens in a new tab)Finding the records whose vectors lie closest to a query vector., and finish with a conversational agent built with Python and LangChain.
The course accompanies an instructor-led GraphAcademy session, but nothing about it requires one - you can work through the whole workshop at your own pace, with every exercise running against your own Neo4j instance.
The Fundamentals of Generative AI and Large Language Models (LLMs)
Understand how LLMs generate text, what tokens and embeddings are, and how model parameters influence output quality and relevance.
What Retrieval-Augmented Generation (RAG) Is and Why It Is Important
Learn how RAG grounds LLM responses in external data sources, reducing hallucinations and keeping answers accurate and up to date.
How GraphRAG Can Improve the Quality of LLM-Generated Content
Explore how connecting a knowledge graph to a retrieval pipeline supplies richer, relationship-aware context that plain vector search cannot provide.
How to Build Knowledge Graphs from Unstructured PDF Documents
Apply entity extraction and relationship mapping techniques to convert raw PDF content into a structured Neo4j knowledge graph using Python.
How to Enrich Knowledge Graphs with Structured Data
Merge structured datasets into an existing knowledge graph, linking entities to extend coverage and improve retrieval accuracy.
How to Use Vectors in Neo4j for Similarity Search
Configure vector indexes in Neo4j and write queries that retrieve semantically similar nodes using embedding-based cosine similarity.
How to Build Retrievers with the neo4j-graphrag Python Package
Build vector, keyword, and hybrid retrievers using the neo4j-graphrag library, then connect them to an LLM for grounded response generation.
How to Build a Conversational Agent with Neo4j, Python, and LangChain
Construct a multi-turn conversational agent that queries a Neo4j knowledge graph via LangChain tools to answer user questions accurately.
What you need to take part.
A GraphAcademy account
The workshop is delivered here on GraphAcademy, so you need to be signed in to work through the lessons and keep your progress. Creating an account is free.
A GitHub account, or Git on your own machine
You write code against the workshop-genai repository. The quickest route is a GitHub Codespace, an online editor that clones the code and installs everything for you — that needs a GitHub account.
If you would rather work locally, clone the repository with Git and run it in your own editor instead. No GitHub account is needed for that.
4 modules, 2 hours.
Who this workshop is for
This workshop is for developers and data scientists who want to move beyond basic Full definition for retrieval-augmented generation (opens in a new tab)Fetching relevant context from an external data source as additional context to inform a language model's response.. If you have experimented with Full definition for vector search (opens in a new tab)Finding the records whose vectors lie closest to a query vector. and found that similarity alone does not capture how your data connects, this workshop shows you what 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. adds: entities, 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., and the ability to combine 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.. You should be comfortable reading and running Python programs and have a basic understanding of Neo4j and 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. - Neo4j Fundamentals and Cypher Fundamentals cover everything you need. You do not need prior experience with 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. frameworks - the workshop introduces the
neo4j-graphragpackage and LangChain as you use them.What you'll do
You will build a 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. workflow end to end. Starting from a set of PDF documents, you will use 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. to extract 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. and store them as 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. in Neo4j, experimenting with chunk sizes and schemas to see how those decisions change the graph you get, then enriching the graph with structured data so your 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. can combine both sources. Throughout, you work from the workshop repository against your own Neo4j instance, so you can inspect the graph after every step, query it directly, and judge whether a schema change or a different chunk size produced better structure - the judgement that transfers to your own documents.
With the graph in place, you will create Full definition for embedding (opens in a new tab)Information represented as a numerical vector, positioned so that similar information sits close together. and a Full definition for vector index (opens in a new tab)A structure over a vector property. The database searches it to find the vectors nearest a given one, rather than comparing every vector stored. in Neo4j and use them for similarity search. You will build three kinds of retriever with the
neo4j-graphragpackage for Python: a vector retriever, a vector plus 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 follows relationships from the matched chunks, and a text-to-Cypher retriever that turns natural language questions into graph queries. The workshop ends with you assembling these pieces into a conversational agent using LangChain, giving the LLM tools to search and query your knowledge graph.Where to go next
If you want to consolidate the concepts from this workshop at a gentler pace, Neo4j & Generative AI Fundamentals covers 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. from the ground up. To go deeper into the Python tooling, Using GraphRAG with Python expands on the 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. Full definition for pattern (opens in a new tab)A graph structure written in Cypher, such as a node joined to another node by a relationship. you used here, Neo4j & LLM Integration with LangChain builds out the agent side, and Building Knowledge Graphs with LLMs takes a deeper look at turning documents into graphs. You can find upcoming instructor-led sessions and the other companion courses on the workshops page.