Skip to main content
Inverts the usual order: documents are retrieved first and chunked just before synthesis. Chunking late preserves context that pre-chunking discards, since a chunk is cut with knowledge of the query it is answering.
This example is a runnable notebook in the vectordb-recipes repository rather than a page here.

Open in Colab

Run it end to end in the browser.

View on GitHub

Read the source.