AI for developers

RAG in AI: LangChain and LangFlow

Build assistants that answer from your documents, with LangChain and LangFlow.

Request this program
Duration
21 h · 3 days
Level
Advanced
Format
On site · Remote · Blended
Max. group size
12 participants

Overview

This program explains and puts into practice RAG (retrieval-augmented generation), the technique that lets a language model answer from an organization's documents. Participants build a complete system: ingestion, chunking, embeddings, vector database, retrieval and generation. They first build it in code with LangChain, then visually with LangFlow, before tackling quality improvement and going to production.

Who this program is for

  • Developers, data analysts and engineers wishing to build assistants on their data
  • Architects and technical project managers involved in AI projects
  • Training centers offering an advanced AI path

Prerequisites

  • Programming basics, ideally in Python
  • Basic knowledge of prompting and APIs
  • Comfortable with the terminal and a code editor

Learning objectives

  • Explain the architecture of a RAG system
  • Prepare, split and index documents
  • Choose and use embeddings and a vector database
  • Build a question-answering chain with LangChain
  • Visually design a RAG flow and an agent with LangFlow
  • Improve relevance: hybrid search, reranking, evaluation
  • Expose and monitor your assistant in production

Detailed curriculum

7 modules · 21 h · 3 days

Day 1
Language models, embeddings and vector search3 h🛠 1 workshop
50% theory · 50% practice
  • How a language model works and the context window
  • Embeddings: representing meaning with vectors
  • Similarity and vector search
  • Model limits and the value of RAG
🛠 Hands-on workshops
Explore embeddings1 h

Compute embeddings and observe how close sentences are.

✅ Deliverable : An exploration notebook
Architecture of a RAG system4 h🛠 1 workshop
30% theory · 70% practice
  • Ingestion: loading PDFs, web pages, databases
  • Splitting documents and chunking strategies
  • Indexing in a vector database
  • Retrieval, context assembly and generation
  • Citing your sources
🛠 Hands-on workshops
A first "hand-made" RAG2.5 h

Build a minimal RAG without a framework to understand each step.

✅ Deliverable : A minimal working RAG
Day 2
LangChain: getting started3.5 h
30% theory · 70% practice
  • Models, prompts and structured outputs
  • Chains and composition
  • Conversation memory
  • Tools and agents: principles
Building a RAG with LangChain3.5 h🛠 1 workshop
20% theory · 80% practice
  • Document loaders and splitters
  • Vector database and retriever
  • Question-answering chain with sources
  • Managing conversation history
🛠 Hands-on workshops
Document assistant in Python2.5 h

Build an assistant that answers questions about a corpus of company documents.

✅ Deliverable : A document assistant with sources
Day 3
LangFlow: building visually3 h🛠 1 workshop
20% theory · 80% practice
  • Installing and launching LangFlow
  • Components, flows and variables
  • Reproducing the RAG visually
  • Exposing a flow through an API
🛠 Hands-on workshops
RAG and agent in LangFlow2 h

Design the flow, test it in the interface and call it from a script.

✅ Deliverable : An exportable LangFlow flow
Improving RAG quality2.5 h
30% theory · 70% practice
  • Hybrid search and reranking
  • Query rewriting and multiple queries
  • Measuring quality: relevance, faithfulness, recall
  • Diagnosing errors
Going to production1.5 h
60% theory · 40% practice
  • Exposing the assistant through an API
  • Security, access rights and privacy
  • Observability, costs and document updates

Tools and technologies

API OpenAIChromaDBDockerJupyter NotebookLangChainLangFlowPython

Teaching methods

  • Alternating theory and hands-on coding work
  • Capstone project: an assistant on a fictional company's documents
  • Code and results reviews
  • Comparison of code and low-code approaches

Assessment

  • Graded exercises in each module
  • Demonstration of the RAG built and its evaluation
  • Knowledge-check quiz

Required equipment

  • A computer with Python 3 installed and a code editor
  • A language model API key (provided or personal)
  • An internet connection

Resources provided

  • Notebooks and code repository for the workshops
  • Exercise document corpus
  • RAG system evaluation grid

Career outcomes

  • A working document assistant
  • A method to evaluate and improve a RAG
  • Skills sought for enterprise AI projects