Skip to content
Book a conversation

Document chunking

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

Luiz GardelinUpdated Read in Markdown
All terms

A conversation about your organization.

Before recommending any tool, we talk with your teams and map how the work really happens.

Arrange a conversation
On this pageIntroduction

Also used as: document splitting into chunks.

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.

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 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. None removes the need to test the resulting passages on the actual material. Microsoft, chunking techniques and factors.

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

  1. Chunk large documents for vector search solutions Microsoft

    Presents chunking and overlap techniques; parameters need evaluation for the content and application.

Written by

Luiz Gardelin

Founder and lead consultant at The Company Brain

Luiz Gardelin is the founder and lead consultant at The Company Brain, an AI organizational transformation consultancy based in Brazil. He also founded Webinhood and Tropk.ai.

See all content by this author

A conversation about your organization.

Before recommending any tool, we talk with your teams and map how the work really happens.

Arrange a conversation

Related terms

Continue reading

All resources