langchain-ai

rag-from-scratch: Learn Retrieval-Augmented Generation Step by Step

A Jupyter notebook series that teaches the building blocks of retrieval-augmented generation, from indexing and retrieval to generation. It is aimed at learners who want to understand RAG concepts through an educational progression rather than adopt a ready-made application.

Jupyter NotebookRAGLLMMachine Learning
View on GitHub Compare
Stars
9.4k
Forks
2.2k
Stars, last 30 days
+596

Our take

Health score

23/100

How it is scored
Activity
19
Community
31
Issues
21
Pull requests
20

+596 stars in the last 30 days

Project history

Daily GitHub snapshots since Oct 7, 2026. History covers stars and forks; health signals are not tracked historically.

Selected snapshot

Stars

10,105

Forks

2,308

Change since Nov 16, 2026: +19 stars·+4 forks

Overview

rag-from-scratch is an educational notebook series for learning how retrieval-augmented generation (RAG) works. It explores how retrieved documents can provide context to an LLM, helping ground answers in information outside the model’s training data.

The project is suited to people who want to understand RAG’s core stages and concepts. It accompanies a video playlist and is instructional material, not a packaged RAG service.

Key Features

  • Presents RAG concepts through Jupyter notebooks.
  • Builds understanding from core indexing, retrieval, and generation steps.
  • Connects the notebooks to an accompanying video playlist.
  • Focuses on learning the RAG approach from the ground up.

Use Cases

  • Developers new to RAG can follow the notebooks to learn its main building blocks.
  • Students can use the materials alongside the video playlist for a structured introduction.
  • LLM practitioners can use the series to refresh their understanding of indexing, retrieval, and generation.
  • Teams evaluating whether RAG suits a knowledge-grounding problem can use it as introductory learning material before choosing an implementation.

Getting Started

Browse the notebooks in the repository and follow the video playlist. See the README for project context and links.

Alternatives

  • rag-zero-to-hero-guide: It covers RAG from fundamentals through advanced techniques, evaluation, and tools, while rag-from-scratch teaches core building blocks through a notebook series.
ProjectLanguageLicenseStarsStatus
rag-from-scratchJupyter Notebook–9.4kNot checked yet
rag-zero-to-hero-guideJupyter NotebookApache-2.01.5kInactive

Considerations

  • This is a learning resource, not a turnkey application or deployment package.
  • The provided README does not specify installation steps, dependencies, or a license. Check the notebook contents and repository files before running or reusing the material.

Found this useful?

Share it with someone who would like rag-from-scratch.

Comparisons