# Chunking

URL: https://www.getdynamiq.ai/glossary/chunking

> Splitting a document into smaller pieces before it is embedded and indexed, so retrieval returns focused passages instead of whole files.

Splitting a document into smaller pieces before it is embedded and indexed, so retrieval returns focused passages instead of whole files.

Chunking decides the unit of retrieval. A document can be split by character count, by word, by sentence, by page, by paragraph, or by heading, and each chunk keeps a link back to the document it came from. Smaller chunks match a query more precisely but lose surrounding context; larger chunks carry more context but dilute what any single vector represents.

The chunking strategy, decided once when a knowledge base is set up, shapes every answer that base ever produces. A policy document chunked badly returns fragments that are technically related but not actually the answer, which is a worse failure mode in a compliance search than returning nothing.

A long policy manual chunked by section heading returns one complete, citable rule when queried, instead of a paragraph that starts mid-sentence and ends before the rule's exception clause.

**In Dynamiq**, Knowledge Bases default to a configurable splitter, by character, word, sentence, page, paragraph or title, with adjustable overlap between chunks, and structure- or meaning-aware splitters, a markdown header splitter, a semantic splitter, a recursive character splitter, are available when you customize the ingestion workflow directly.

## See it in Dynamiq

-   [Knowledge](https://www.getdynamiq.ai/product/knowledge-rag)

## Related terms

-   [Retrieval-augmented generation (RAG)](https://www.getdynamiq.ai/glossary/retrieval-augmented-generation)
-   [Embeddings](https://www.getdynamiq.ai/glossary/embeddings)
-   [Vector database](https://www.getdynamiq.ai/glossary/vector-database)
-   [Reranking](https://www.getdynamiq.ai/glossary/reranking)

## See an agent on your own workflow.

Bring a process and its documents. Our engineers will show you how Dynamiq runs it, in your environment or ours.

[Start free](https://app.getdynamiq.ai/signup) · [Talk to the team](https://www.getdynamiq.ai/book-a-demo)
