Skip to main content

Chunking and Embedding

Pick a Chunking Strategy and an embedding model to balance recall and precision.

Chunking and embedding run automatically when you import data. Chunking sets the minimum retrieval unit; embedding sets the precision of semantic matching. Both are configured in the index-settings step of Import data and cannot be changed after creation.

Chunking methods

You can choose among the following chunking methods when importing data:
MethodHow it worksBest for
Smart Chunking (default)Detects chapter and paragraph boundaries from the document layout.Most documents.
Fixed-lengthSplits at equal token lengths.Cases with strict token-count requirements.
By pageSplits along PDF page boundaries.Documents where each page conveys an independent topic.
Heading-basedSplits along Markdown / HTML heading levels.Documents that use headings to separate topics.
By regexSplits at matches of a custom regular expression.Text with fixed delimiter markers.
By delimiterSplits at a specified separator.Documents whose content is distinguished by specific identifiers.
Max chunk length: default 600, range 10–6000 (tokens).
ScenarioRecommendedWhy
FAQ documentsFixed-length, 256 tokensQ&A pairs are short and self-contained.
Product manualsSmart Chunking, 600 tokens (default)Chapters are clearly structured.
Long reportsSmart Chunking, 2048 tokensPreserves more context.
Legal contractsHeading-based, 512 tokensClauses are hierarchically organized.

Embedding

After chunking, the system uses an embedding model to turn each Chunk into a vector and writes it to the index. The embedding model is chosen when you create the Knowledge Base and cannot be changed afterward. The fee details on the right of the import-data page show the embedding model and rerank model currently in use.

View and manage Chunks

After chunks are built, view and manage them in the Chunk details tab on the Knowledge Base detail page. See Document management.

API management

Chunk APIs:
With chunking and embedding configured, create a Knowledge Retrieval service to start federated retrieval.