Skip to main content

Overview

Chunking is the process of breaking large documents into smaller, semantically meaningful pieces so AI models can understand, retrieve, and reason over them more effectively. Instead of forcing a model to process an entire report, slide deck, or knowledge base at once, chunking creates manageable units, each with its own context, that improve search accuracy, reduce hallucinations, and make RAG workflows far more reliable.

Contextual AI Chunking Modes

Contextual AI offers four distinct chunking modes to support a wide range of document types and use cases:

Hierarchy Depth

Chunks are created using the document’s structural depth (for example, section, subsection, and subsubsection). This is our default and most robust method, since it treats a document as an intricately layered structure. It works especially well on structured documents like academic papers or technical manuals.

Hierarchy Heading

This strategy makes chunks based on section headings, but without enforcing strict structural depth. It’s useful when the document doesn’t have a strong or helpful hierarchy (for instance, flat formats like chat logs or contracts, where hierarchical chunking might even be counterproductive).

Static Length

Chunks are created by cutting the document at fixed token intervals. We include this mostly as a baseline; it’s not the strategy we recommend for most real-world use cases.

Page Level

This splits the document one chunk per page. It makes sense for content like slide decks or executive summary reports — where each page is semantically distinct, and we don’t want a single chunk crossing between slides or sections.

Additional controls include:

  • Max Chunk Length sets the upper token limit per chunk.
  • Min Chunk Length sets the lower bound (ignored if using Page Level).
These settings let users fine-tune chunk size and structure to match the semantics of their documents, whether it’s a flat contract, a dense academic paper, or a multi-page SEC filing.