Why this matters now: Chunking sits at the start of the RAG pipeline, before indexing, before embedding, and before any retrieval configuration. A chunk boundary that cuts a sentence in the wrong place, or a chunk size that forces the retrieval layer to return three partial answers instead of one complete one, degrades answer quality in a way that cannot be fixed by tuning the LLM or changing the prompt. Gartner's 2025 AI engineering survey found that 71% of enterprise RAG teams default to fixed-size chunking on their first deployment because it requires no corpus analysis and ships immediately. McKinsey found that chunk size is the parameter adjusted most often in the 90 days after RAG launch: 61% of teams change it at least once post-deployment. Forrester found that teams using semantic or hierarchical chunking from the start see 23% better context relevance scores compared to fixed-size teams working at the same chunk count. The difference between picking a chunking strategy at architecture time versus discovering the wrong one in production is roughly two weeks of indexing and retrieval work.

Why chunking is harder to get right than it looks

The chunking decision feels like a parameter choice: pick a size, split the documents, index the results. In practice it's an architecture decision that shapes every downstream component. The chunk size determines how much context each retrieved passage carries. The chunking method determines whether chunk boundaries respect meaning or cut across it. The overlap configuration determines how much content is duplicated between adjacent chunks to prevent boundary losses. And the choice of strategy determines whether the pipeline can be extended later with parent-child retrieval, contextual compression, or sentence-window expansion without re-indexing the full corpus.

The mismatch between corpus structure and chunking strategy is where most retrieval quality problems originate. A fixed-size strategy applied to a corpus of dense technical documentation, where a single paragraph may contain the only instance of a specific procedure, produces chunks that split the procedure across two or three passages. The retrieval layer returns partial context, the LLM synthesizes an incomplete answer, and the quality issue is attributed to the model rather than the chunking. A semantic strategy applied to a corpus of short FAQ entries, where each document is already a single coherent thought, produces unnecessary computation overhead for segmentation with no retrieval improvement over fixed-size. The right strategy depends on the corpus, and the corpus has to be analyzed before the strategy is chosen.

Chunk size also interacts with the embedding model in ways that teams often don't account for at selection time. Most embedding models have an input token limit, typically 512–8192 tokens depending on the model, and a performance window that's usually shorter than the maximum. A chunk that exceeds the model's effective encoding window gets truncated silently in most implementations. Chunks significantly shorter than the model's training distribution may not embed with enough semantic density to support reliable similarity search. The chunk size, the embedding model, and the retrieval k parameter all need to be tuned together, and changing any one of them after the corpus is indexed requires re-indexing.

"Chunking is the decision that's hardest to reverse after launch. Every other retrieval tuning choice can be adjusted without touching the index. A chunking change means re-processing the entire corpus."
71%
Of enterprise RAG teams use fixed-size chunking on their first deployment. It requires no corpus analysis and ships immediately. Only 34% still use it as their primary strategy at production maturity, when corpus-specific retrieval quality requirements have become clear (Gartner AI Engineering Survey 2025).
61%
Of RAG teams change their chunk size at least once within 90 days of initial deployment. Chunk size is the single most-adjusted parameter post-launch, more commonly changed than retrieval k, prompt templates, or the embedding model (McKinsey Enterprise AI 2025).
23%
Better context relevance scores for RAG pipelines using semantic or hierarchical chunking from the start, compared to fixed-size implementations at the same retrieved chunk count. The improvement is larger for domain-specific corpora with uneven document structure (Forrester Enterprise LLM Infrastructure 2025).

Five chunking strategies and where each one fits your corpus

Five strategies cover the realistic decision space for enterprise RAG: fixed-size, sentence-window, semantic, hierarchical (parent-child), and structure-aware. Each one has a corpus type it's well-suited for, implementation complexity it requires, and retrieval failure modes that appear when it's applied to the wrong corpus. The table below maps each strategy to the corpus characteristics that make it a good or poor fit, along with the retrieval risk if the mismatch isn't caught before indexing.

StrategyHow it worksBest corpus fitImplementation complexityRetrieval failure mode when mismatchedRetrieval risk if mismatched
Fixed-sizeSplits documents into chunks of N tokens with an overlap of M tokens. No corpus analysis required. Chunk boundaries fall wherever the token count is reached, with no regard for sentence or paragraph structureShort, uniform documents where content is densely packed and no single passage spans a complete procedure or argument. Support ticket corpora, product descriptions, changelog entries. Documents where every N tokens are roughly equally valuable contextLowChunk boundaries cut across sentences and paragraphs. Retrieved context is mid-thought. The LLM receives partial information and must either guess at completion or hedge. Answers contain the right topic but the wrong or incomplete details. This failure mode is invisible in low-volume testing, where queries happen to land on well-formed chunks, and surfaces at scale when the full query distribution hits boundary-split contentHigh for complex corpora
Sentence-windowIndexes individual sentences as the base unit but retrieves a window of surrounding sentences around each match. The embedding captures the sentence's specific meaning; the retrieval window provides surrounding context to the LLM. Window size is configurable (typically 3–7 sentences)Corpora where the key retrievable fact lives in a single sentence but needs 2–4 surrounding sentences to be interpretable: legal texts, compliance documents, policy manuals, technical specifications where individual clauses reference context from adjacent sentencesMediumWindow size misconfiguration: a window that's too narrow returns a sentence with insufficient context; a window that's too wide returns so much surrounding text that the LLM's attention is diluted and the specific answer loses prominence. The optimal window size varies by corpus and is difficult to set correctly without testing against a representative query setModerate
SemanticUses embedding similarity to identify topic boundaries within documents, then splits at those boundaries rather than at fixed token counts. Adjacent sentences with high cosine similarity stay in the same chunk; a drop in similarity signals a topic change and triggers a split. Produces variable-length chunks that correspond to coherent topicsLong-form documents with multiple distinct topics per document: research reports, white papers, annual reports, technical documentation with multiple sections. Any corpus where fixed-size chunking would routinely split across topic boundaries. Works poorly on short, uniform documents where embedding-based boundary detection finds no meaningful variationHighSimilarity threshold misconfiguration: a threshold that's too sensitive creates micro-chunks that lose paragraph-level context; a threshold that's too lenient creates chunks that span multiple unrelated topics. Calibration requires sampling documents from the corpus and validating that chunk boundaries align with actual topic changes. Computational cost is also higher than fixed-size, which matters at re-indexing timeModerate with calibration
Hierarchical (parent-child)Indexes small child chunks (precise, narrow context) for retrieval but returns the parent chunk (broader surrounding context) to the LLM. Retrieval precision comes from the small chunk's focused embedding; answer completeness comes from the parent's wider scope. Requires maintaining parent-child relationships in the vector store's metadataCorpora where precise retrieval and complete context are both required: product manuals, knowledge bases with procedure steps, legal contracts where the answer is a specific clause but the LLM needs the section containing it for complete interpretation. Works best in vector stores that support metadata filtering to traverse parent-child relationships at query timeHighParent chunk size misconfiguration: if the parent is too large, the LLM's context window fills with surrounding content that dilutes the answer. If the parent is too small, it's effectively the same as returning the child. Dependency on vector store metadata means the strategy is coupled to the selected database's filtering capabilities and breaks if the store changes. Pipeline complexity is higher: indexing, retrieval, and the context assembly step all need to handle the two-level structureLow with correct configuration
Structure-awareUses document structure signals (headers, section titles, list items, table rows, code blocks) to define chunk boundaries, rather than token count or embedding similarity. Requires document pre-processing to extract and preserve structure. Chunks correspond to semantically meaningful document units: a section, a procedure, a tableStructured corpora where document format encodes meaningful boundaries: Markdown documentation, HTML pages, PDF reports with consistent heading hierarchies, Word documents with defined section styles. Poor fit for unstructured text-heavy corpora where there are no consistent structural signals to use as boundariesHighStructure inconsistency in the corpus: if documents don't use consistent heading levels or formatting conventions, the boundary detection produces chunks of wildly varying size and coherence. A corpus that looks structured in sample documents may have 20–30% of documents with non-standard formatting that breaks the parser. Requires a corpus audit before committing to this strategyHigh for inconsistent corpora

Not sure which chunking strategy fits your corpus?

10decoders runs two-week RAG architecture assessments that analyze your corpus structure, benchmark candidate chunking strategies against your actual query patterns, and implement the selected pipeline with retrieval quality evaluation from day one.

Book a Free AI Assessment →

How corpus analysis drives the chunking decision

The chunking decision can't be made from a feature comparison table alone. It requires a corpus audit that answers four questions: How long are the documents, on average and at the extremes? Do documents have consistent internal structure (headers, sections, lists) or are they free-form text? Is knowledge distributed across many short passages or concentrated in long dense sections? And how varied is the document quality: are there formatting inconsistencies, scan artifacts, or encoding issues that would break structure-aware parsing?

A corpus audit for chunking purposes takes one to two days. Sample 200–300 documents across the full document length distribution, not just typical examples. Calculate the distribution of document lengths in tokens. Identify what percentage of documents have consistent structural markers. Note the average paragraph length and whether any content type (tables, code, lists) requires special handling. This analysis often reveals that the corpus has two or three distinct document types that would benefit from different chunking strategies, which is common in enterprise knowledge bases that aggregate content from multiple sources.

When the corpus contains multiple document types, a hybrid approach is often the right answer. Short FAQ-style documents get fixed-size chunking because their content is already compact and uniform. Long technical manuals get hierarchical chunking to preserve both retrieval precision and answer completeness. Legal or policy documents get sentence-window chunking where clause-level precision matters. The chunking layer becomes a routing step that applies the appropriate strategy based on document metadata, which adds pipeline complexity but produces better retrieval quality than forcing a single strategy across a structurally diverse corpus.

Stage 1
Where most teams start

Default Fixed-Size Chunking

Fixed-size chunking applied to the full corpus with default parameters (typically 512 tokens, 50-token overlap). No corpus analysis. The strategy ships in a day. Retrieval quality issues surface gradually as the query distribution reveals boundary-split content. The chunk size gets adjusted post-launch (61% of teams make this change within 90 days). The adjustment requires re-indexing the full corpus, which in large enterprise corpora takes several hours to days and interrupts any production query traffic against the index during the rebuild. Teams at this stage often attribute quality problems to the LLM or prompt rather than the chunking, which delays the diagnosis.

Stage 2
The required step

Corpus-Analyzed Strategy Selection

Corpus audit completed before any indexing begins: document length distribution calculated, structural consistency assessed, content type inventory produced. Chunking strategy selected based on corpus characteristics, not default behavior. For uniform corpora, fixed-size with tuned parameters. For structured corpora, structure-aware or hierarchical. For mixed corpora, a routing approach that applies the appropriate strategy by document type. A 10–20% corpus sample is indexed with the candidate strategy, retrieval quality is scored against a representative query set, and the configuration is validated before full indexing. The evaluation query set is retained as the retrieval quality baseline for ongoing monitoring.

Stage 3
Production-grade

Continuously Monitored Chunking Architecture

Chunking strategy documented with the corpus analysis that justified it. Chunk boundary quality monitored via periodic spot-checks on new documents added to the corpus. Retrieval quality scores tracked against the evaluation baseline, with alerting when context relevance drops more than 10% from the established baseline. Corpus growth monitored for new document types that may fall outside the original chunking strategy's design assumptions. Re-evaluation triggered when the corpus composition changes significantly (more than 20% new content from a new source) or when retrieval quality metrics show sustained degradation. Chunking configuration treated as a versioned artifact that changes alongside corpus changes.

Chunking strategy readiness checklist

Chunking Strategy Readiness Checklist
Corpus length distribution analyzed before strategy selectionSample at least 200 documents across the full length distribution of your corpus: the shortest 10%, the median, and the longest 10%. Calculate the token count at each percentile. This tells you whether your corpus is dominated by short uniform documents (FAQ, tickets, product descriptions) or long heterogeneous ones (reports, manuals, contracts). The answer determines whether fixed-size is adequate or whether a more structure-sensitive strategy is worth the implementation overhead. A corpus where 80% of documents are under 500 tokens behaves very differently from one where 20% of documents exceed 10,000 tokens, and applying the same chunking strategy to both produces predictably different retrieval quality outcomes.
Structural consistency of the corpus assessed before committing to structure-aware chunkingIf structure-aware chunking is a candidate, audit the corpus for structural consistency before building the parser. Sample 100 documents and check: what percentage use consistent heading levels (H1, H2, H3 or equivalent)? What percentage have non-standard formatting, missing headers, or encoding issues that would produce malformed chunks? If more than 20% of documents fall outside the expected structure, the parser will produce unpredictable chunk boundaries on a meaningful fraction of the corpus. Either build fallback handling for non-standard documents or choose a strategy that doesn't depend on structural consistency. Discovering the inconsistency after building the parser costs more time than the audit.
Chunk size validated against the embedding model's effective encoding windowCheck the selected embedding model's documentation for its maximum input length and, separately, the token range where it performs best. These are not always the same number. A model that accepts 8,192 tokens may have been trained on documents averaging 512–1024 tokens, and chunks at the upper limit may embed with lower semantic fidelity than shorter chunks. Index a sample of your corpus at two or three chunk sizes and measure context relevance scores on your representative query set. The chunk size that maximizes scores against your queries is the right one for your corpus and model combination, not the one that maximizes the model's theoretical capacity.
Overlap configuration tested for boundary-straddling content, not set to a defaultChunk overlap exists to handle content that would otherwise be split across a boundary. The default overlap in most frameworks (50–100 tokens) is calibrated for generic corpora. For corpora where key facts frequently appear at the end of one paragraph and the beginning of the next (which is common in technical documentation structured as "here is why, here is how"), a larger overlap may be needed. Test by identifying 20–30 examples of boundary-sensitive content in your corpus and checking whether they're fully captured within at least one chunk. If more than a third of them are split across boundaries, increase overlap and retest. Overlap that's too large increases index size and can produce duplicate retrievals; the right value is the minimum that preserves content integrity for your specific corpus structure.
Special content types handled with explicit chunking rules, not inherited from the default strategyTables, code blocks, numbered lists, and mathematical formulas are the content types most commonly damaged by fixed-size chunking. A table split across two chunks is retrievable as neither the correct context for its header nor the correct data for a query about its values. Identify every special content type in your corpus and decide, for each, whether it should be treated as an atomic chunk (never split), extracted and indexed separately, or converted to a text representation before chunking. This doesn't require a complex solution: in many corpora, adding a simple rule that prevents splits within a code block or table boundary is enough to eliminate a large category of retrieval errors.
A 10–20% corpus sample indexed and evaluated before full indexingRun the chosen chunking configuration on a 10–20% sample of your corpus, spanning the full document type and length distribution. Index the sample and run your representative query set against it. Score context relevance on the annotated subset of the query set. Check: are there document types where retrieved chunks are consistently partial or incoherent? Are there query types where retrieved chunks miss the relevant content? These signals point to chunking configuration issues that need to be fixed before full indexing. Finding them on 10% of the corpus costs 10% of the re-indexing time of finding them on 100%.
Chunking configuration documented and version-controlled alongside the corpusThe chunking configuration (strategy, chunk size, overlap, special content handling rules) should be version-controlled as part of the pipeline definition. When the corpus changes significantly, or the embedding model is updated, the chunking configuration needs to be reviewed against the new corpus or model characteristics. Without version control on the configuration, re-indexing decisions get made without a clear record of what the original choices were or why they were made. Document the corpus analysis that justified each configuration parameter, not just the parameter values. That context is what makes future configuration reviews fast rather than starting from scratch.
"The teams who re-index once at launch, and then leave it alone, didn't get lucky. They analyzed the corpus before writing the chunking code. That's the whole difference."

What to do this week

01 Analyze your corpus before touching any chunking configuration

If you're starting a new RAG project, don't set up the chunking pipeline until you've spent a day analyzing the corpus. Pull 200 documents across the length distribution. Calculate the token count percentiles. Note what percentage have consistent structural markers. Identify every special content type (tables, code, lists) that will need explicit handling. This analysis produces a one-page summary that makes the chunking strategy decision almost obvious: uniform short documents point to fixed-size, structured long documents point to hierarchical or structure-aware, mixed corpora point to a routing approach. The decision still needs to be validated against a query set, but the analysis gets you to the right two or three candidates before any indexing work starts.

02 Audit your current chunking configuration if you're already in production

If you have a RAG system running, pull 50 recent retrieved contexts and read them. Look for patterns: chunks that start or end mid-sentence, chunks that contain the topic label (a heading) but not the content it heads, table fragments without their column headers, code blocks split across two chunks. Each pattern points to a specific chunking configuration problem. If you find more than 10% of retrieved contexts showing at least one of these patterns, the chunking configuration is contributing to retrieval quality issues. Quantify the frequency before making changes: run your representative query set, score context relevance, and record the baseline. Changes to chunking require re-indexing, so you want the data to justify it before you commit to the work.

03 Test two chunk sizes against your representative query set before setting one

Pick the two chunk sizes that bracket what feels right for your corpus: one smaller (256–384 tokens) and one larger (768–1024 tokens). Index a 10% corpus sample at each size. Run your representative query set and score context relevance. The size that scores better on your queries is the right starting point. More often than not, one size performs noticeably better on the query types that matter most for the use case. This test costs one to two hours of indexing time and produces a data-backed parameter choice rather than a guess that gets revisited post-launch.

04 Identify your special content types and add explicit handling before indexing

Walk through a sample of 50–100 documents and list every content type that appears: prose paragraphs, numbered lists, bullet lists, tables, code blocks, mathematical formulas, captions, footnotes. For each type, decide: can it be split at a token boundary, or does splitting it destroy the information it contains? Tables and code blocks almost always need atomic treatment. Numbered procedure steps often need to stay together. Identify the content types that need special handling and add the rules to the chunking pipeline before indexing begins. This is a two to four hour task that prevents an entire category of retrieval errors from appearing in production.

Let 10decoders design your RAG chunking architecture

We analyze your corpus structure, benchmark candidate chunking strategies against your query patterns, and implement the configuration with retrieval quality evaluation built in from day one. No post-launch re-indexing surprises.