GTM Engineering term, AI and agents

Chunking

Chunking is the step of splitting long documents into smaller, self-contained pieces so an AI system can embed, search and retrieve only the parts relevant to a question.

Also called: chunking, document chunking, text chunking, chunks, chunk size

Chunking sits under every stage: it's part of the data and systems the whole funnel runs on, near related terms like Retrieval-augmented generation, Embeddings and Vector database (the blue squares).

Chunking is the step of splitting long documents into smaller pieces, called chunks, before an AI system stores and searches them. It is the first step of most retrieval-augmented generation setups. Good chunks are small enough to match a specific question and complete enough to make sense alone. Bad chunking is the most common reason an internal AI assistant gives vague or wrong answers.

How it works

A retrieval system cannot search a 60-page PDF as one blob. It breaks the text into chunks, turns each chunk into embeddings, and stores them in a vector database. When someone asks a question, the system finds the chunks most similar to it and passes them to the model as context.

The main choices:

  • Chunk size: how long each piece is, usually measured in tokens. Smaller chunks match narrow questions. Larger chunks carry more surrounding context.
  • Overlap: a few sentences repeated between neighboring chunks so ideas are not sliced in half.
  • Split strategy: by fixed length, by sentence or paragraph, or by document structure like headings and sections. Structure-aware splitting usually works best for docs with clear headings.
  • Metadata: each chunk keeps tags like source file, section title, date and owner. Metadata lets you filter ("only current pricing docs") and cite sources.

Some teams also add a one-line summary of the parent document to each chunk. That way a chunk about "the discount policy" still knows it came from the 2027 partner agreement.

Example

A sales team loads 400 documents into an internal assistant: battlecards, pricing sheets, case studies and security answers (all numbers hypothetical). They test three chunking setups against 50 real rep questions.

Setup Chunk rule Questions answered correctly
A Fixed 2,000 tokens, no overlap 29 of 50
B Fixed 300 tokens, no overlap 34 of 50
C Split on headings, max 500 tokens, small overlap, section title in metadata 44 of 50

Setup A failed on "Do we support SSO on the starter plan?" The right sentence sat inside a giant chunk about plans and pricing, so the match was weak. Setup B found the sentence but cut off the table row that named the plan. Setup C kept the whole "Security features by plan" section together and returned it first.

By company size

Small business: Most owners use chunking without knowing it. Uploading a menu, policy doc or FAQ to an AI chatbot builder triggers default chunking. The practical move is clean source docs with clear headings, since the defaults split on structure.

Mid-market: A GTM engineer builds the assistant on a shared knowledge base and tunes chunking with a test set of real questions. Ownership matters, because stale docs produce confident wrong answers.

Enterprise: Chunking runs in a pipeline with access controls on every chunk, so a rep never retrieves a document they could not open directly. Re-chunking millions of pages after a strategy change is a real cost, so teams version their settings.

Chunking vs context windows

A large context window lets a model read a lot at once. Chunking decides which parts it should read. Even with huge windows, sending only the relevant chunks is cheaper, faster and easier to cite. The two work together.

Why it matters for GTM teams

When an internal AI tool gives a wrong answer about pricing or security, people stop trusting it fast. Most of those failures trace back to how documents were split and tagged, not to the model. We'd spend the first week of any internal assistant project on source cleanup and chunking tests, using 30 to 50 real questions from reps. We'd only change models after retrieval is clearly working.

Common mistakes

  • Using one fixed chunk size for every document type.
  • Splitting tables and lists across chunks so the rows lose their headers.
  • Dropping metadata, which makes filtering and citations impossible.
  • Loading outdated docs alongside current ones with no date tags.
  • Never testing retrieval on its own before judging the final answers.
  • Re-chunking constantly without a fixed test set to compare against.

FAQ

What is a good chunk size?

There is no single right size. Many teams start somewhere between a few hundred and about a thousand tokens per chunk with a small overlap, then adjust based on test questions. Short chunks are precise but lose context, and long chunks keep context but dilute the match.

What is chunk overlap?

Overlap repeats a little text from the end of one chunk at the start of the next. It keeps a sentence or idea that sits on a boundary from being cut in half. A small overlap is common, and too much just duplicates content and raises storage and search costs.

Do I need chunking if the model has a huge context window?

Often yes. Even when a whole document fits, sending everything on every question costs more, runs slower and can bury the relevant passage. Chunking plus retrieval sends only the parts that matter, and it lets you cite exactly where an answer came from.

See all AI and agents terms ↳