Skip to content

< CollectionsStack

RAG, from chunk to citation.

Every stage of a RAG system in the order data flows through it, ending in an answer that cites its sources.

8 sections · 10 problems · 2 projects

0 of 12 done

Start Next: 01 Build a Document Chunker

Fig. 1. Each claim sends a thread to the passage words it shares. The claim whose thread finds nothing is flagged instead of shipped.

Section 01

Split

0 of 1

Cut the documents into pieces small enough to retrieve and whole enough to read.

  1. 01Build a Document Chunkerimplement · easy

Section 02

Embed

0 of 2

Turn each piece into a vector, and compare vectors.

  1. 02Generate Embeddings with Hugging Faceimplement · medium
  2. 03Calculate Embedding Similarityimplement · easy

Section 03

Retrieve

0 of 2

Find the nearest pieces, inside the filters the question sets.

  1. 04Build Top-K Semantic Searchimplement · easy
  2. 05Filter by Metadata Before You Rankimplement · medium

Section 04

Rerank

0 of 1

Put the best of them first.

  1. 06Rerank the Retrieved Chunksimplement · medium

Section 05

Generate

0 of 1

Answer from what was found.

  1. 07Build Your First RAG Pipelineharness · medium

Section 06

Ground

0 of 2

Cite a source for every claim, or say there is none.

  1. 08Answer With Citations, or Say You Can'timplement · medium
  2. 09Check Every Sentence Has a Sourceimplement · medium

Section 07

Measure

0 of 1

Score the retrieval, so a change can be judged.

  1. 10Measure Retrieval with Recall@k and MRRimplement · medium

Section 08

Build it

0 of 2

The whole system on real models.

  1. 11rag-systemproject
  2. 12jev-ragproject
All collections