RAG From Scratch with LangChain
Learn Retrieval-Augmented Generation (RAG) by building it step by step in Python. You will see why a plain LLM hallucinates and can't read your private data, then build both halves of a RAG system: an ingestion pipeline (load files, chunk them, embed them, store them in a vector database) and a retrieval pipeline (embed the question, find the closest chunks, and let an LLM answer from them). You finish by turning the notebook into a clean, modular project with a persistent FAISS index.
Built on the publicly available RAG From Scratch with LangChain by Krish Naik — watch the original. Adapted by Oreni: the lessons, quizzes and exercises are AI-generated from the videos. Not endorsed by the creator.
Free to join, no card needed. New accounts get one module free.

Free to join, no card needed. New accounts get one module free.
What you’ll learn
- Explain why LLMs hallucinate and why RAG is often cheaper and easier to keep fresh than fine-tuning.
- Describe the two RAG pipelines: data ingestion and query retrieval, and what retrieval, augmentation and generation each mean.
- Load text and PDF files into LangChain Document objects with useful metadata.
- Split documents into overlapping chunks with RecursiveCharacterTextSplitter and pick a sensible chunk size.
- Turn text into vectors with a Sentence Transformers embedding model and store them in ChromaDB.
- Build a retriever that returns the top-k most similar chunks with a similarity score.
- Connect the retriever to an LLM (via Groq) with a prompt that answers only from the context, and return sources and confidence.
- Refactor a notebook into a modular RAG project: data loader, embedding pipeline, FAISS vector store and search.
Watching teaches. Practice proves it.
Every feature below ladders up to one question: can you actually do the job and pass the interview.
AI-graded mock interviews
Answer real interview questions in writing — AI grades you and hands back a reference answer.
Active recall
Open-ended questions after every lesson, AI-graded, with follow-ups when you're shaky.
Quizzes
Retake any quiz, review your mistakes, and keep your best score.
Hands-on exercises
Checklist tasks with an expected-outcome reveal, so you know the moment you got it right.
Spaced-repetition flashcards
FSRS-scheduled review with a live due-count — it only resurfaces cards right before you'd forget them.
Skill mindmap
See how every concept in the course connects — not a syllabus, a map.
Cheatsheets
Searchable, copyable, downloadable — a reference you keep using after you finish.
Timestamped notes
Pin a note to the exact video moment, jump straight back to it later.
Progress + resume
Every topic tracked — close the tab, come back next week, pick up exactly where you left off.
Inside the course
5 milestones, 12 lessons, ~2 hours of video. Every lesson comes with hands-on tasks and active-recall checks — you practise it, not just watch it.
Before writing code, you will understand the problem RAG solves. Plain LLMs only know their training data, so they hallucinate on recent events and know nothing about your company's private documents. You will see the two pipelines every RAG system is built from.
- Why Plain LLMs Fall Short: Hallucination and Private Data
- The Two RAG Pipelines: Ingestion and Retrieval
Now you start coding. You will set up a Python project, learn LangChain's Document structure (page content plus metadata), and use document loaders to read text and PDF files into that structure.
- Project Setup and the LangChain Document Structure
- Loading Text and PDF Files with Document Loaders
This is the heart of the ingestion pipeline. You will split documents into overlapping chunks, turn each chunk into a 384-number vector with an open-source embedding model, store everything in ChromaDB, and build a retriever that finds the chunks closest to a question.
- Processing PDFs with Metadata and Splitting Them into Chunks
- Turning Chunks into Embeddings with Sentence Transformers
- Storing Vectors in ChromaDB
- Building a Retriever with Similarity Search
With retrieval working, you add the final step: an LLM that reads the retrieved context and answers. You will build a simple RAG function with a Groq-hosted model, then an enhanced version that returns sources and a confidence score.
- A Simple RAG Function with a Groq LLM
- An Enhanced RAG Pipeline: Sources, Confidence and Citations
Notebooks are great for learning but hard to maintain. In this last module you turn everything into a small Python project with separate modules for loading, embedding, a persistent FAISS vector store, and search — the structure you would use at work.
- Splitting the Pipeline into Modules: Data Loader and Embedding
- A Persistent FAISS Vector Store and RAG Search
Before you start
- Comfortable writing basic Python: functions, classes, lists and dictionaries
- Able to install packages and run a Jupyter notebook
- A rough idea of what an LLM like ChatGPT is
Start learning today
See the full course plan and try a lesson free, no account needed. Sign up to keep going and pick up where you left off on any device.
Free to join, no card needed. New accounts get one module free.