Document processing
Document cracking vs chunking: how documents are cut up for retrieval
Document cracking is the Azure AI Search step that opens files and extracts their text. Chunking comes after: why, sizes, overlap, and strategies.
Oct 12, 2026 · Updated Nov 9, 20266 min read8 sources
Why it matters
On a procedure, a cut between a warning and its step returns an action without its hazard. A chunk with no source record cannot be checked.
The short version
- 1Document cracking is stage 1 of an Azure AI Search indexer: open the file and extract text, images, and metadata. Chunking is a later step that splits that text.
- 2Large documents are chunked so each piece fits the embedding model's input limit and gets its own focused vector. Text past the limit is truncated and lost.
- 3Start near 512 tokens with about 25 percent overlap, then test. Structure-aware cuts that follow headings, lists, and tables did best in an industrial-manual study.
Document cracking is the first stage of an Azure AI Search indexer: "the process of opening files and extracting content" (Azure AI Search indexer overview, Stage 1). For a PDF it pulls out text, images, and metadata. For a database record it pulls out the non-binary fields.
Cracking is not chunking. Cracking gets the text out of the file. Chunking cuts that text into passages so each one can be embedded and retrieved on its own.
Why are large documents divided into chunks before indexing? So each piece fits the embedding model's input limit and is not truncated, and so each vector stands for one focused topic (Azure chunking guide).
Document cracking vs chunking
| Document cracking | Chunking | |
|---|---|---|
| What it does | Opens the file and extracts content | Splits extracted text into passages |
| Input | A PDF, Office file, blob, or database row | Plain text from cracking or OCR |
| Output | Text, images, metadata, fields | Chunks of a set size or at set boundaries |
| Where in Azure AI Search | Stage 1 of the indexer | A skill, such as Text Split, in stage 3 skillset execution |
The four indexer stages are document cracking, field mappings, skillset execution, and output field mappings (indexer overview). Cracking can also be triggered again during skillset execution, for example to pull out images for image skills.
A cracking failure carries forward. A table extracted as a jumble stays a jumble in every chunk cut from it. For scanned files, see OCR on scanned manuals.
Why large documents are chunked
Two reasons, both from the Azure chunking guide:
- Input limits. Embedding models read a fixed number of tokens. The text-embedding-3-small model takes 8,191 tokens, about 6,000 words. The Sentence Transformers docs say longer text is truncated to the model's maximum, which is 256 tokens for all-MiniLM-L6-v2. Anything past the cutoff is never searchable.
- One vector, one topic. A page covering many sub-topics may fit the model, but the guide says you might get better results if you chunk at a finer grain.
A third reason concerns the model that reads the results. Language models do best when the relevant passage sits at the start or end of the context, and worse when it sits in the middle (Liu et al., Lost in the Middle). Short chunks let you pass a few focused passages instead of one long block.
The original retrieval-augmented generation paper split Wikipedia into disjoint 100-word chunks, 21 million in all (Lewis et al., section 3). For the bigger picture, see what retrieval-augmented generation is.
Automated document chunking
Automated chunking is chunking done by rules or models in code. These are the common methods (Azure chunking guide, Common chunking techniques):
| Method | How it cuts | Built-in Azure option |
|---|---|---|
| Fixed-size | Every N characters or tokens, with some overlap | Text Split skill, pages mode |
| Variable-size | At sentence ends, line breaks, or detected structure | Text Split skill, sentences mode; Content Understanding skill |
| Semantic | Where the meaning shifts across sentences and paragraphs | Content Understanding skill |
| Custom | A mix, such as variable chunks with the document title added to each | None |
In pages mode, the Text Split skill avoids breaking sentences. The pageOverlapLength must be less than half the maximum page length.
The setting changes the chunk count a lot. On a 200-page NASA e-book, the guide reports:
| Mode | Max length | Overlap | Chunks |
|---|---|---|---|
| pages | 1,000 characters | 0 | 172 |
| pages | 1,000 characters | 200 | 216 |
| pages | 2,000 characters | 0 | 85 |
| pages | 2,000 characters | 500 | 113 |
| sentences | n/a | n/a | 13,361 |
Document structure based chunking
Structure-based chunking cuts at the document's own boundaries: headings, sections, lists, and tables. The Azure guide notes that HTML and Markdown heading syntax can be used to chunk by section.
For technical manuals, this is the method with the best public evidence. A study of oil and gas documents compared fixed-size, recursive, semantic, and structure-aware chunking on manuals, table-heavy specifications, and piping and instrumentation diagrams. Structure-aware chunking gave the best overall retrieval and had significantly lower compute cost than semantic chunking. All four methods did poorly on the diagrams (Taiwo and Yusoff, abstract).
Three rules for manuals:
- Keep a warning in the same chunk as the step it governs. A cut between them returns an action without its hazard.
- Make a table its own chunk. If it must be split, repeat the header row in each piece.
- Carry the heading path with every chunk. "Table 3" means nothing once it leaves its section.
Chunk size and overlap
Microsoft recommends starting at 512 tokens, about 2,000 characters, with a 25 percent overlap of 128 tokens. The Text Split skill defaults are 2,000 characters with a 500-character overlap. Highly structured data may need less overlap, and narrative text more (Azure chunking guide).
The Chroma technical report tested chunkers on 5 corpora totaling 328,208 tokens:
| Chunker | Recall |
|---|---|
| LLM-based semantic chunker | 91.9 |
| Cluster semantic chunker, 400 tokens | 91.3 |
| Recursive splitter, 200 tokens, no overlap | 88.1 |
What it found about overlap:
- Less overlap raised intersection-over-union, because that metric penalizes repeated text.
- With the small all-MiniLM-L6-v2 model, overlap helped recall: a 250-token splitter rose from 77.1 with no overlap to 82.4 with 125 tokens of overlap.
- An 800-token chunk with 400 tokens of overlap had the lowest precision and intersection-over-union of the token splitters tested, 1.4 each.
Semantic vs fixed-size chunking
Semantic chunking rarely pays for itself. Qu, Tu, and Bao concluded that its "computational costs" are "not justified by consistent performance gains" (Is Semantic Chunking Worth the Computational Cost?). In the Chroma results, the best semantic chunker beat the 200-token recursive splitter by under 4 points of recall.
Keep a source record on every chunk
The model sees only the chunk, so a citation can point only as far as the chunk's record. The RAG paper calls provenance an open research problem for models that keep knowledge only in their weights (Lewis et al.). Store with each chunk:
- Document identifier and version
- Page number
- Heading path, from title down to section
- Character offsets of the chunk's text
The Azure guide also suggests adding the document title to chunks from the middle of a long document so context is not lost. To measure whether your chunking works, see retrieval metrics.
What to do next
- Check what your cracking step extracts. Open a few outputs and confirm tables and lists survived.
- Look up your embedding model's maximum input length and keep chunks under it.
- Start at about 512 tokens with 25 percent overlap, or a 200-token recursive splitter with none.
- Cut manuals by headings, steps, and tables. Keep each warning with its step.
- Store document, version, page, heading path, and offsets on every chunk.
- Test two or three settings on real questions before you index everything.
Azcuna's BABEL reads, translates, and searches foreign-language documents entirely on-device, with no cloud and no connection, and keeps every claim tied to the passage it came from.
The long read on air-gapped RAG goes further.
Questions people ask
What is document cracking?
Document cracking is a Microsoft Azure AI Search term. The indexer overview defines it as the process of opening files and extracting content. For a PDF with embedded images, the indexer extracts text, images, and metadata. For a database record, it extracts the non-binary fields. It is stage 1 of the indexer pipeline, before field mappings and skillset execution. It is not chunking.
Why are large documents commonly divided into chunks before they are indexed?
So each piece fits the embedding model's input limit and gets a focused vector. Microsoft's Azure AI Search guide says chunking helps meet input token requirements and prevents data loss due to truncation. The Sentence Transformers documentation says text longer than a model's maximum sequence length is cut off. The Azure guide adds that a page covering many sub-topics may retrieve better when chunked finer.
What is automated document chunking?
Chunking done by software instead of by hand. In Azure AI Search, the built-in Text Split skill cuts extracted text into pages of a set length with optional overlap, or into single sentences. Libraries such as LangChain text splitters do the same in your own code. Semantic chunkers go further and place cuts where the meaning shifts, sometimes by asking a language model.
What is document structure based chunking?
Chunking that cuts at the document's own boundaries, such as headings, sections, lists, and tables, instead of every fixed number of tokens. Microsoft's chunking guide notes that HTML and Markdown heading syntax can be used to chunk by section. A 2026 study of oil and gas manuals found structure-aware chunking ranked relevant chunks highest and cost less to compute than semantic chunking.
What chunk size and overlap should I use?
Microsoft's Azure AI Search guide recommends starting at 512 tokens, about 2,000 characters, with a 25 percent overlap of 128 tokens. Its Text Split skill defaults are 2,000 characters with a 500-character overlap. The Chroma evaluation found a 200-token recursive splitter with no overlap consistently high performing. Treat these as starting points and test on your own documents.
Is semantic chunking better than fixed-size chunking?
Not consistently. Qu, Tu, and Bao (2024) concluded that the computational costs of semantic chunking are not justified by consistent performance gains. In the Chroma technical report, an LLM-based semantic chunker scored 91.9 recall and a plain 200-token recursive splitter scored 88.1 at far lower cost. Start with fixed-size or structure-aware splitting and only add semantic chunking if testing shows a gain.
Sources
- 1Indexer overview - Azure AI Search · Microsoft Learn
- 2Chunk documents in vector search solutions - Azure AI Search · Microsoft Learn
- 3Computing Embeddings - Input Sequence Length · Sentence Transformers documentation
- 4Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks · arXiv (Lewis et al., NeurIPS 2020)
- 5Lost in the Middle: How Language Models Use Long Contexts · arXiv (Liu et al.)
- 6Evaluating Chunking Strategies for Retrieval · Chroma Technical Report (Smith and Troynikov, July 3, 2024)
- 7Is Semantic Chunking Worth the Computational Cost? · arXiv (Qu, Tu, and Bao)
- 8Evaluating Chunking Strategies For Retrieval-Augmented Generation in Oil and Gas Enterprise Documents · arXiv (Taiwo and Yusoff)
Where this shows up in our work
- TRACE, the offline S1000D and IETM viewer opens S1000D, MIL-STD-3001 and PDF technical manuals on a tablet with every marking intact.
- BABEL, offline multilingual translation and search translates and searches foreign-language documents on-device, every fact tied to its source passage.
