CourseRetrieval-Augmented Generation: The Complete Course · Module 3: Chunking · part 26 of 95
Part 26 · Module 3: Chunking

Lab: Build Hollin's chunker and measure it

22 min read·13 Oct 2026
Module 3 · Lab · About 70 minutes · Needs: lessons 1 to 4 of this module, and Module 2's lab (or the records cell in Step 1)

What you are building

HOLLIN/CHUNK: ONE RUN ON MODULE 2'S RECORDS records.jsonl 17 records from Module 2 split headings, table rows path, metadata and stable ID chunks.jsonl 22 chunks skipped: 1 copy recall@3 14 of 15 tests: 5 passed
The chunker (blue: your system) turns Module 2's 17 records into 22 chunks (green), skips the marked copy (grey), and proves itself with a recall score and five tests.

Module 2 ended with out/records.jsonl: 17 typed records, 16 to chunk. This lab adds hollin/chunk/, which turns each record into chunks that later modules embed, filter and cite. Each chunk keeps its headings as a header path, carries its record's access and status fields, and gets an ID made from its content, so re-running on unchanged text changes nothing. Then you measure recall@3 for three chunking choices on 15 labelled questions with the local BAAI/bge-small-en-v1.5 model. The result is a command, python -m hollin.chunk, and tests that fail if a chunk loses text, mixes documents or orphans a table row. No model key is needed.

The rest of this course is yours to keep

This course is bought on its own, once, and stays readable afterwards, including the parts added to it later.