Document chunking

The Citead team, updated

In short. Document chunking splits documents into retrievable text units whose boundaries and overlap determine the context retained in each passage.

Definition: Document chunking splits a document into smaller text units for retrieval and processing. Chunk boundaries determine which surrounding sentences or sections remain together when a passage is retrieved.

Key facts

  • As of October 2026, Microsoft's chunking guide describes fixed size, structure based and semantic approaches, including splitting at HTML or Markdown headings.
  • Microsoft's RAG overview explains that chunking during indexing lets portions of a large document match a query independently.
  • The Text Split skill reference defines pages as configurable text chunks and also offers a sentences mode.
  • Anthropic's Contextual Retrieval article identifies chunk size, boundaries and overlap as factors affecting retrieval performance.

How do chunks enter an answer workflow?

Retrieval-augmented generation (RAG) supplies retrieved information to a language model when it prepares an answer. Microsoft's RAG overview places chunking in indexing, where source material becomes searchable, and describes handing search results to the model for answer formulation.

In the classic RAG pattern, the application sends a query to Azure AI Search and passes the results to the language model separately. The same overview describes the model formulating its answer from that result set. Chunking therefore determines which portions can enter the retrieved evidence independently.

What changes at a chunk boundary?

Microsoft's chunking guide gives a wiki page covering varied subtopics as a reason to split even when the whole page fits the model's input limit. Finer divisions can separate topics; larger chunks can preserve intact passages. Structure based splitting uses sentence endings or headings. Semantic chunking groups text by meaning and can cross page boundaries.

Overlap repeats text from the end of a chunk at the start of the next. It preserves continuity while duplicating content. Microsoft also describes appending a document title to chunks taken from its middle to retain context.

Anthropic's Contextual Retrieval method addresses missing context by adding a chunk-specific explanation before creating its search representations. Preserving sentence boundaries alone can still leave a passage dependent on information elsewhere in the document.

How can a chunking setup be inspected?

Microsoft's Text Split skill exposes length and overlap settings. This configuration fragment uses characters, with a maximum chunk length of 2,000 and an overlap of 500:

{
  "textSplitMode": "pages",
  "unit": "characters",
  "maximumPageLength": 2000,
  "pageOverlapLength": 500
}

The skill attempts to end chunks at sentence boundaries, so actual lengths can be smaller. Its textItems output contains the extracted text; offsets and ordinalPositions locate chunks in the source. Inspecting consecutive outputs shows the retained overlap and where a passage ends.

For a website's own retrieval system, these outputs provide a concrete check on whether headings and their explanatory text remain together. Microsoft's guide presents the character settings above as a starting point whose suitability depends on the content and use case.

FAQ

Should every chunk have the same length?

Microsoft's guide includes variable sized chunks based on document structure. You can use headings or sentence endings as boundaries when preserving a section matters.

Does the pages setting follow printed pages?

The Text Split reference defines a page through a configurable maximum text length. You can inspect textItems to see the resulting units.

Sources

  1. Microsoft, "Chunk large documents for RAG and vector search in Azure AI Search", 2 July 2026
  2. Microsoft, "Retrieval-augmented generation (RAG) in Azure AI Search", 4 August 2026
  3. Microsoft, "Text Split skill", 17 September 2026
  4. Anthropic, "Introducing Contextual Retrieval", 19 September 2024

Check how a page reads to answer engines. Open the GEO score analyzer

Test a page and see what to fix first

The analysis usually takes less than 10 seconds and needs no account.

400,000+ pages scored in the public benchmark