Generative AI

RAG and GraphRAG with LangChain, LangGraph and Neo4j

From your documents to an assistant that cites its sources: 24 labs with Docker, local models, vector and hybrid search, knowledge graphs and a complete final project.

Intermediate · 30 hours · 24 lessons · Course language: Spanish and English

Build an end-to-end document assistant on your own computer. You start with Docker Desktop, Neo4j and Ollama, with no paid API keys. You learn to load and version documents, split them with LangChain, generate local embeddings and retrieve evidence with the vector and text indexes of Neo4j. You combine semantic search, hybrid search and graph traversals; with LangGraph you build a stateful flow with routes, limited retrieval, abstention and persistence. You measure retrieval and citations, test malicious documents and service failures, and publish a local API and interface. Every class has theory, a narrated video explanation, a step-by-step lab, results and a solution. You finish with Atlas: a support assistant with its own corpus, sources you can inspect, evaluation, tests and a complete guide to install, run and recover it. The 30 hours include study and practice; they are not the length of the videos. The lessons, quizzes and videos are in English; the lab code, the sample corpus and the model answers stay in Spanish, and every lesson explains the Spanish names.

What you will learn

  • Set up a local stack with Docker on Windows and macOS, with no paid API
  • Load and split documents with stable IDs, versions and locators
  • Build vector, hybrid and GraphRAG retrieval on Neo4j
  • Orchestrate RAG with LangGraph: state, routes, limited retries and abstention
  • Keep conversations separate and recover checkpoints after a restart
  • Measure retrieval, inspect citations and test failures without confusing tests with guarantees
  • Deliver a complete assistant with an API, a UI, evaluation and an independent solution

Skills

RAG, GraphRAG, LangChain, LangGraph, Neo4j, Cypher, Local embeddings, Hybrid search, Ollama, Docker Compose, Retrieval evaluation, Citations and traceability, Persistence, Context security

Program

Module 1: Foundations and your first RAG (free classes)

Docker, Neo4j and your first local answer with sources.

Project: A small RAG that runs with every file included in the free classes.

  1. RAG from scratch: set up Docker and understand evidence: Install Docker Desktop and VS Code, create the files and check Neo4j and Ollama without a paid API.
  2. Neo4j and Cypher: documents, chunks and relationships: Model a document, use parameters and show that MERGE doesn't duplicate the same fact.
  3. Your first local RAG with sources: Download the models, load a small corpus and get an answer with citations you can inspect.

Module 2: Ingestion, chunking and embeddings

Traceable documents and reproducible local vectors.

Project: A versioned corpus whose load doesn't duplicate chunks.

  1. Idempotent ingestion and document traceability: Load documents with stable IDs, versions and cleanup of obsolete chunks.
  2. Chunking with LangChain and metadata: Compare sizes and overlap and keep the origin and locator of every chunk.
  3. Local embeddings and semantic similarity: Generate multilingual vectors, compare similarity and check their dimension before indexing.

Module 3: Vector and hybrid retrieval

Indexes, filters, ranking and context budget.

Project: A measured retriever with allowed sources and rank fusion.

  1. Neo4j vector indexes and retrieval: Check ONLINE indexes and retrieve documents with LangChain and Neo4j's current SEARCH.
  2. Hybrid search and document filters: Fuse vector and text rankings without comparing their scores and apply the list of allowed sources.
  3. Diversity, reranking and context budget: Reduce duplicates, compare an explicit reranking and decide how much context to send to the model.

Module 4: GraphRAG and safe queries

Entities, relationships and evidence spread across documents.

Project: An answer that combines architecture and owners without running Cypher generated by a model.

  1. Build a traceable knowledge graph: Model services, dependencies and teams with curated data you can review.
  2. GraphRAG: combine vectors and graph traversals: Answer a question that combines architecture and the owners' schedules with two documents.
  3. Safe Cypher: parameters and allowed queries: Test an injection payload as data and avoid write queries generated by the model.

Module 5: LangGraph for RAG

Explicit state, routes and retrieval with limits.

Project: An inspectable flow that searches, answers or abstains in two attempts at most.

  1. LangGraph: state and nodes of a RAG flow: Separate analysis, retrieval and generation and watch the real state between nodes.
  2. Route questions between vector, hybrid and graph: Build transparent routes for semantic queries, exact codes and dependencies.
  3. Retrieve, reformulate and abstain within limits: Apply an alternative strategy and end with an abstention when there is no allowed evidence.

Module 6: Conversation, evaluation and operations

Persistence, streaming, security, metrics, tests and API.

Project: A local service that keeps conversations apart and makes its limits visible.

  1. Conversation and persistent checkpoints: Handle simple follow-ups, keep threads apart and check the state when SQLite is reopened.
  2. Streaming, timeouts and service failures: Emit graph events and diagnose Neo4j and Ollama failures without presenting a made-up answer.
  3. Context security and malicious documents: Tell data from instructions, exclude sources and test that there are no write effects.
  4. Evaluate retrieval, answers and sources: Measure Recall@k and MRR with a labeled dataset and inspect the limits of citation metrics.
  5. Unit tests, integration and regressions: Separate deterministic logic, real services and the model's evaluation; catch a deliberate regression.
  6. Run a local RAG API and interface: Start the service, check health and logs and practice a logical copy and restore of the corpus.

Module 7: Final project: Atlas

Building, integrating and accepting a complete assistant.

Project: Atlas: a document assistant with GraphRAG, API, UI, sources, evaluation and recovery.

  1. Atlas project I: prepare corpus, graph and indexes: From a clean folder, set up Docker, load data and indexes and check the baseline retrieval.
  2. Atlas project II: integrate the complete assistant: Join LangChain, Neo4j, LangGraph, persistence, API and UI and review the answers' sources.
  3. Atlas project III: validate, recover and deliver: Run acceptance, failures, restart and restore; deliver evidence and compare with the complete solution.

Prerequisites

  • Basic Python: functions, lists and dictionaries; the first session reviews the concepts used
  • Docker Desktop and VS Code; the installation steps are included
  • A computer with 16 GB of RAM recommended and space for images and models; generation on a CPU takes longer than on a GPU
  • Internet for the first download; you don't need to buy another course or pay for a model API

Next courses

  • Agentic AI: From Workflows to Autonomous Agents · Advanced · 32 hours
    The difference between an agentic system and an agent, and the best practices for building both: workflows, the agent loop, tools, context engineering, skills, MCP, code execution, human in the loop, durable execution, evaluation, observability, security and production. Theory and a lab in every class, 24 labs verified in Docker with the official documentation, and a video in every class.
  • LLMOps: Generative AI in Production with Best Practices · Advanced · 25 hours
    The complete lifecycle of an LLM application: versioned prompts, traces, evaluation with datasets and calibrated judges, CI, metrics and SLOs, a gateway, caching and costs, personal data, red teaming, the supply chain, governance and canary deployments. 20 labs in Docker with a local model, based on the official documentation, and a video in every lesson.

See all courses