Menu

Glossary

Chunking

Chunking is the process of splitting a long document into smaller passages, called chunks, so an AI system can embed, index, and retrieve each piece independently. In commercial real estate document work, chunking breaks a 90-page lease or offering memorandum into passages small enough to search by meaning and feed to a language model.

How Does Chunking Work?

Chunking works by cutting a document into passages of a target size, usually measured in tokens, then embedding each passage as a separate vector for retrieval. A boundary rule decides where each cut falls, and an overlap setting repeats a slice of text across neighboring chunks so a clause split across a boundary still appears intact in at least one passage.

A common starting point is a recursive splitter set to 400 to 512 tokens with 10 to 20 percent overlap, per a 2025 practitioner guide from Firecrawl. The overlap keeps context from being lost at cut points. Strategies differ in where they place boundaries.

Strategy

How it cuts

Trade-off

Fixed-size

Every N tokens

Fast, but splits mid-clause

Recursive

On paragraph, then sentence, then word

Preserves structure, common default

Semantic

Where meaning shifts

Highest accuracy, highest cost

Page or section

On document layout

Keeps a full clause together

Why Chunking Matters

Chunking matters because retrieval quality caps answer quality, and chunk boundaries decide what a model sees. A chunk that splits a rent escalation clause in half hands the model an incomplete provision, and the answer inherits the gap. Chunk too small and context is lost; chunk too large and irrelevant text dilutes the match.

The size choice is measurable, not arbitrary. An NVIDIA technical analysis found semantic chunking can lift retrieval accuracy meaningfully over naive fixed-size baselines on some tasks, while a January 2026 systematic study cited by Firecrawl identified a "context cliff" near 2,500 tokens where response quality drops. For dense legal text like a lease, keeping a full clause inside one chunk is the practical priority, which favors recursive or section-aware splitting over blind fixed cuts.

Example

Chunking a lease is clearest with a worked count. A 90-page lease at roughly 500 words per page holds about 45,000 words, which at 1.33 tokens per word, the standard English ratio reported by llmtest.io, is about 59,850 tokens.

Input

Value

Pages

90

Words per page

500

Total words

45,000

Tokens per word

1.33

Total tokens

59,850

Chunk size

500 tokens

Overlap

15 percent (75 tokens)

With 500-token chunks and a 15 percent overlap, each chunk advances 425 net tokens. Dividing 59,850 by 425 gives about 141 chunks. Instead of feeding all 59,850 tokens to a model for one rent question, the system retrieves the few chunks nearest the query, cutting the text the model reads by more than 99 percent while keeping the relevant clause intact.

Variations and Edge Cases

Chunking behaves differently by document type, and CRE documents mix prose, tables, and forms in one file. The variants below matter when a rent roll table and a dense legal clause live in the same document.

Variant

Behavior

Table-aware chunking

Keeps a rent roll row set together instead of splitting a table

Overlapping windows

Repeats text across chunks so boundary clauses stay whole

Parent-child chunking

Retrieves a small chunk, then expands to its larger parent for context

Layout-based chunking

Cuts on headings and sections rather than token count

Metadata tagging

Attaches page and section labels so a citation can point back to the source

Chunking vs Tokenization

Chunking is often confused with tokenization, but they operate at different scales. Chunking splits a document into passages of many words for retrieval. Tokenization splits text into sub-word units a model reads one at a time.

Tokenization is the finer step: it breaks "escalation" into pieces a model processes and is measured in tokens per word. Chunking sits above it, grouping hundreds of tokens into a retrievable passage. Chunk size is defined in tokens, so tokenization is the unit chunking counts in, but the two answer different questions: tokenization asks how a model reads text, chunking asks how a document is divided for search.

Frequently Asked Questions

What is chunking in document AI?Chunking is the process of splitting a long document into smaller passages, called chunks, so an AI system can embed, index, and retrieve each piece independently. In commercial real estate it breaks a lease or offering memorandum into passages small enough to search by meaning and feed to a language model.

What chunk size and overlap should I use?A common starting point is 400 to 512 tokens with 10 to 20 percent overlap, per a 2025 Firecrawl practitioner guide, and 15 percent overlap performed best on the FinanceBench task at 1,024-token chunks. For dense lease clauses, keeping a full provision inside one chunk matters more than any fixed number.

Why does chunking affect extraction accuracy?Chunking affects accuracy because retrieval quality caps answer quality, and a chunk that splits a clause in half hands the model an incomplete provision. If the right passage is never retrieved intact, the model cannot answer from it, no matter how capable the model is.

Related Terms

  • Retrieval-Augmented Generation

  • Vector Embedding

  • Tokenization

  • Semantic Search

  • Extraction Accuracy