Skip to main content
Chunking turns normalized documents into retrieval-sized passages with IDs and metadata. In the full SDK workflow, rag.ingest() runs this stage for you. Use rag.chunk() directly when you need to inspect or transform chunks before embedding.

From Extraction Output

From Direct Markdown

Result

A chunk item is a plain dictionary:

Input Forms

For dict inputs, text is required. source, title, and metadata are preserved when present.

Parameters

Next Stage

Extraction

Create document inputs.

Embedding

Embed chunk outputs.