Agentic Chunking
AgenticChunking uses a model to pick natural breakpoints when splitting documents.
Agentic chunking is an intelligent method of splitting documents into smaller chunks by using a model to determine natural breakpoints in the text. Rather than splitting text at fixed character counts, it analyzes the content to find semantically meaningful boundaries like paragraph breaks and topic transitions.
| Parameter | Type | Default | Description |
|---|---|---|---|
model | Optional[Union[Model, str]] | None | The model to use for chunking. Accepts a Model instance or a model ID string. Defaults to OpenAIChat with gpt-5.4-mini when not set. |
max_chunk_size | Optional[int] | None | The maximum size of each chunk. Defaults to 5000 characters when not set. |
custom_prompt | Optional[str] | None | Personalized instructions for determining chunk breakpoints. |