INTEGRITY Cloudflare Docs

Chunking

Chunking is the process of splitting large data into smaller segments before embedding them for search. AI Search uses recursive chunking, which breaks your content at natural boundaries (like paragraphs or sentences), and then further splits it if the chunks are too large.

What is recursive chunking

Recursive chunking tries to keep chunks meaningful by:

This way, chunks are easy to embed and retrieve, without cutting off thoughts mid-sentence.

Chunking controls

AI Search exposes two parameters to help you control chunking behavior:

These settings apply during the indexing step, before your data is embedded and stored in your search index.

Choosing chunk size and overlap

Chunking affects both how your content is retrieved and how much context is passed into the generation model. Try out this external chunk visualizer tool to help understand how different chunk settings could look.

Additional considerations: