Skip to content

Research · Retrieval · Chunking

How agentic chunking works.

Updated

Agentic chunking uses an AI model to decide where a document should be cut before it is indexed for retrieval. Instead of cutting every few hundred words, the model groups sentences that belong together and gives each chunk a title and summary. Colidal uses it for documents where fixed cuts break the meaning.

cuts = by meaning · each chunk = title + summary + text · runs = once, at indexing

Agentic chunking is a way of preparing documents for retrieval in which an AI model decides where each passage starts and ends, and labels it, instead of cutting at a fixed length.

How it works

Cut small first. Then let a model put the pieces back together.

A RAG system can only find what a chunk contains. Agentic chunking spends a little AI up front so every chunk is one complete idea.

  1. The document is cleaned: headers, footers, and page numbers are removed.
  2. It is split into small pieces with recursive splitting and overlap.
  3. A chunking agent, an LLM, groups the pieces that belong together.
  4. Each chunk gets a title and a summary.
  5. The chunks go to an embedding model and are stored in a vector database.
How agentic chunking works: a document is cleaned and split into small pieces, an LLM groups the pieces that belong together into chunks and gives each a title and summary, and the chunks are embedded and stored for retrieval.

The pipeline

What happens to a document

  1. 01

    Clean the text.

    Text is extracted and the parts that are not content are removed: page numbers, headers, footers.

  2. 02

    Split it small.

    Recursive splitting breaks the text into small pieces without cutting sentences apart. A little overlap keeps context across each boundary.

  3. 03

    Group the pieces.

    An LLM reads the pieces in order and decides which belong together. Each group becomes one chunk.

  4. 04

    Label each chunk.

    The LLM writes a title and a short summary for the chunk. Both are stored with it.

  5. 05

    Embed and store.

    Each chunk goes through an embedding model into a vector database, as in any RAG system.

Why it matters

What the labels are for

The title and summary are searched along with the text. A chunk that never uses the word "refund" can still be found by a question about refunds, because its summary says what it is about.

The model also sees the labels when it answers, so it knows what a passage is and where it came from.

A chunk is a passage of a document, small enough to search precisely and large enough to make sense on its own.

Example

The same policy, cut two ways.

Where the cut falls decides whether a question finds the whole rule or half of it.

Fixed-size · cut every 30 words

Cut by size

chunk 1

Unopened items can be returned within 30 days for a full refund. Opened items can be returned within 14 days, and a restocking fee

chunk 2 · starts mid-sentence

of 10% applies. Shipping: orders placed before noon leave the same day. Orders over the free-shipping threshold ship at no charge.

Ask about the restocking fee and the search finds chunk 2: a fee with no item, mixed with shipping.

Agentic · cut where the topic changes

Cut by meaning

title: Returns · summary: return windows and the restocking fee

Unopened items can be returned within 30 days for a full refund. Opened items can be returned within 14 days, and a restocking fee of 10% applies.

title: Shipping · summary: dispatch times and free shipping

Orders placed before noon leave the same day. Orders over the free-shipping threshold ship at no charge.

The same question finds one chunk that holds the whole rule, and nothing else.

Example text, written for illustration.

Compare

Four ways to chunk a document.

Each method costs more than the one before it and keeps more of the meaning. Agentic chunking builds on the others: it starts from a recursive split.

MethodHow it cutsGood atWeak atCost
Fixed-sizeEqual blocks by character or token count, with overlapSpeed and simplicityCuts through sentences and ideasLowest
RecursiveBy paragraph, then sentence, then word, until each piece fitsDocuments with clear structureText with no clear separatorsLow
SemanticStarts a new chunk where the meaning shifts, using embeddingsFollowing the topicParagraphs that cover several topics; needs a well-set thresholdMedium
AgenticAn LLM groups small pieces into coherent chunks and labels each oneMixed documents; chunks that stand on their ownSpeed at indexing; still a young methodHighest: a model call per chunk

with contextual retrieval

Two uses of an LLM at indexing

Agentic chunking decides where to cut. Contextual retrieval adds a line saying where each chunk sits in its document. They can be used together.

with hybrid search

Labels help both searches

Titles and summaries give meaning search a clearer target and give keyword search the words people actually type.

with reranking

Cleaner candidates

A reranker scores whole chunks. Chunks that hold one complete idea are easier to score than fragments.

at runtime

No extra cost per question

All the extra work happens once, when a document is indexed. Answering a question costs the same.

Fit

When agentic chunking fits, and when it doesn't.

Use it when

  • Documents mix topics on one page: policies, contracts, manuals, long emails.
  • Answers come back half right because the passage was cut in the wrong place.
  • Documents arrive in many formats with no reliable headings.
  • The documents change slowly, so the indexing cost is paid once.

Skip it when

  • Documents already have clean headings and short sections. Recursive chunking is enough.
  • Millions of pages change every day. A model call per chunk adds up.
  • The whole knowledge base fits in one prompt. Then nothing needs chunking at all.
  • Nobody has measured retrieval yet. Measure first, then decide which method the documents need.

How Colidal builds it

Chunking chosen by test, not by default.

Colidal's RAG engine does not assume one chunking method. We try the candidates on your own documents and questions, and use agentic chunking where it measurably finds more of the right passages.

  • Tested on your documents. Each method is scored on real questions with known answers before one is chosen.
  • Mixed by document type. A clean handbook and a scanned contract do not need the same treatment.
  • Sanitized first. Sensitive data is masked before any model reads a document, including at indexing.
  • Re-indexed when documents change. A changed document is cut and labeled again, so answers stay current.
  • In your cloud account. Documents, chunks, and indexes stay where you control them.

Used in: Your documents · Repeat questions · colidal/rag

FAQ

Common questions.

What is agentic chunking, in one sentence?

Agentic chunking is a way of preparing documents for retrieval in which an AI model decides where each passage starts and ends, and gives it a title and summary.

How is agentic chunking different from semantic chunking?

Semantic chunking uses embeddings to detect where the meaning shifts. Agentic chunking has an LLM read the text and decide, and also label each chunk.

Does agentic chunking make answers slower?

No. The extra work happens once, when a document is indexed. Answering a question takes the same time as before.

Is agentic chunking the same as agentic RAG?

No. Agentic chunking prepares documents before any question is asked. Agentic RAG is an agent deciding what to retrieve while it answers. A system can use either, or both.

Keep reading

More from Colidal Research.

All research →

Next step

Request a 30-minute call.

Tell us what you need. We reply within one business day with times for a call, and you'll get a short agenda before we talk.

  1. 01

    Request a call

    Thirty minutes, by video. No preparation needed.

  2. 02

    Get times and a short agenda

    Within one business day, so the call is spent on your problem.

  3. 03

    Leave with a next step

    Usually Colidal AI Assessment, or an honest "AI isn't the answer here".