GenAI Beyond Chat with RAG, Knowledge Graphs and Python
A Talk by Martin O'Hanlon (Neo4j Graph Database & Analytics, Neo4j)
About this Talk
GenAI and Large Language Models (LLMs) have the potential to increase productivity and provide access to data, but they need grounding and good context to be truly useful.
In this hands-on GenAI masterclass, you will learn how Knowledge Graphs and Retrieval Augmented Generation (RAG) can support your GenAI projects.
You will:
- Learn about Large Language Models (LLMs), hallucination and integrating knowledge graphs
- Explore Retrieval Augmented Generation (RAG) and its role in grounding LLM-generated content
- Use Vector indexes and embeddings in Neo4j to perform similarity and keyword search
- Use Python, LangChain and OpenAI to create a Knowledge Graph of unstructured data
After completing this masterclass, you will be able to explain the terms LLM, RAG, grounding, and knowledge graphs. You will also have the knowledge and skills to create simple LLM-based applications using Neo4j and Python.
This masterclass will put you on the path to controlling LLMs and enabling their integration into your projects.
Key Topics
- Large Language Models (LLMs) and strategies for improving their responses
- Use Python and LangChain to interact with an LLM
- Learn how to implement Retrieval Augmented Generation (RAG) strategies, including:
- Using prompts to provide instructions and context
- Using Neo4j vectors to query a graph database
- Use vector indexes to search for similar data
- Create embeddings and vector indexes
- Build a graph of unstructured data using Python and LangChain
Target Audience
- Software developers
- Data Engineering
- Managers of the above
Goals
- Build a knowledge graph of unstructured data
- Create a Retrieval Augmented Generation (RAG) chat agent using Python, Langchain, and Neo4j
Session outline:
- Knowledge Graphs, Unstructured Data, and Vectors
- Semantic search, vectors and embeddings
- Importing unstructured data
- Building a graph
- LLMs, RAG, Python, and LangChain
- LLMs, hallucination, and grounding
- Using Python and LangChain
- Grounding an LLM
- Agents and Retrievers
Format
This class is very hands-on.
Each section will be introduced by the facilitator, before moving quickly on to hand-on coding exercises.
You will use Python, LangChain, OpenAI, and Neo4j to create a graph of unstructured data and develop a chat agent.
A “starter” repository will be provided, along with a Neo4j instance and OpenAI API key removing the challenges of setup and allowing you to get started quickly.
You can use your own Python development environment or use a prebuilt online environment and VS Code IDE on Gitlab.
All the content will be provided at the start of the class allowing you to either follow along, work at your own pace, or continue after the class has completed. There are multiple open-ended stretch activities where you can practise your skills or develop your own solutions.
The masterclass is split into 2 main activities:
- Knowledge Graphs, Unstructured Data, and Vectors - you will import unstructured data, creating embedding and build a graph
- LLMs, RAG, Python, and LangChain - you will create a chat agent that will integrate with a graph in Neo4j
Once complete you will have the knowledge and skills to create a graph of your own unstructured data and use an LLM to find and interpret the data.
Level
Beginner - Intermediate
Prerequisite Knowledge
Before taking this masterclass, you should have:
- A basic understanding of Graph Databases and Neo4j
- Knowledge of Python and capable of reading simple programs