Chunkless RAG with Docling¶
Most RAG systems chunk the source document, embed the chunks, and retrieve by vector similarity. When the source is a single long document that Docling has already parsed into a real hierarchical tree, you can skip chunking and embeddings entirely and let the model navigate the structure directly.
In this lab we will build a chunkless RAG system over a Docling-parsed document, compare it to hybrid chunking on the same document, and discuss when each approach is the right tool.
Prerequisites¶
This lab is a Jupyter notebook. Please follow the instructions in pre-work to run the lab.
Lab 2. Chunking and Vectorization with Docling is a soft prerequisite — the final section of this lab compares chunkless retrieval against HybridChunker from Lab 2 and assumes some familiarity with how hybrid chunking works.
This lab requires either Replicate or Ollama to serve the Granite models, the same way Lab 3 does.
Lab¶
To run the notebook from your command line in Jupyter using the active virtual environment from the pre-work, run:
jupyter notebook notebooks/Chunkless_RAG.ipynb
The path of the notebook file above is relative to the docling-workshop folder from the git clone in the pre-work.