# Document chunking

Understand splitting documents into passages for retrieval and model use, with attention to context, structure, and connection to the source.

Canonical URL: https://thecompanybrain.com.br/en/glossary/document-chunking
Authors: Luiz Gardelin
Updated: 2026-11-14T22:28:47.809Z

Document chunking is the division of a document into passages that can be represented, indexed, and retrieved separately. Microsoft documentation describes splitting by size, structure, and meaningful units. Chunking can help meet model input limits or represent individual parts of a document that covers several subjects. The appropriate size depends on the content and its intended use. [Microsoft, document chunking](https://learn.microsoft.com/en-us/azure/search/vector-search-how-to-chunk-documents).

## Choosing the retrieval unit

Chunking determines what material can reach a person or model together. A short passage may locate a specific rule while separating it from its exception. A longer passage may preserve context while including less relevant material. The choice should reflect the document's structure and the questions that need answers, rather than turning a word count into a universal rule.

In a hypothetical example, a purchasing policy contains a general rule, a table of limits, and an exceptions section. Splitting the file after a fixed number of characters could place the rule in one passage and the exception in another. One design option would be to retain the section as a unit and associate its passages with the title, version, and position in the document. Testing should establish whether the query retrieves the condition that changes the guidance.

Chunking is different from summarization: its purpose is to define parts of the material for separate use. If a project also rewrites or summarizes content, that transformation needs to be identified and evaluated as another stage. A [source citation](/en/glossary/source-citation) should let the reader return to the document and understand where the passage fits.

## Preserving important relationships

Microsoft describes strategies that respect sentences, headings, or semantic relationships, as well as [chunk overlap](/en/glossary/chunk-overlap). None removes the need to test the resulting passages on the actual material. [Microsoft, chunking techniques and factors](https://learn.microsoft.com/en-us/azure/search/vector-search-how-to-chunk-documents).

In the hypothetical example, a table may depend on headings, notes, or units outside the retrieved cell. Keeping only a value would lose its interpretation. Source identification also needs to remain attached to each passage, and changes or withdrawals need to propagate. Chunking that is convenient for processing may be unsuitable for reading. Quality should be judged against the context required by the task, as well as the input size the system can accept.

## Sources

- [Chunk large documents for vector search solutions](https://learn.microsoft.com/en-us/azure/search/vector-search-how-to-chunk-documents): Presents chunking and overlap techniques; parameters need evaluation for the content and application.

## Related reading

- [Chunk overlap](/en/glossary/chunk-overlap)
- [Search index](/en/glossary/search-index)
- [Source citation](/en/glossary/source-citation)
- [Access control](/en/glossary/access-control)
- [Access permission](/en/glossary/access-permission)
- [Company Brain](/en/glossary/company-brain)
