SQL Flow Field Guide

AI_GENERATE_CHUNKS

Catalog support for SQL Server 2025 (17.x)

splits text into chunks

What changes

Input
text expression, chunk options
Output or change
rowset of chunks
Return type
AI_GENERATE_CHUNKS returns a table with the following columns: Column name Data type Description chunk Same as source expression data type Returned text that was chunked from the source expression. ch

Syntax at a glance

AI_GENERATE_CHUNKS (SOURCE = text_expression , CHUNK_TYPE = FIXED [ , CHUNK_SIZE = numeric_expression ] [ , OVERLAP = numeric_expression ] [ , ENABLE_CHUNK_SET_ID = numeric_expression ] )

Work example

Split source text into bounded passages before a search or embedding workflow.

Use synthetic text in an isolated lab. Confirm model endpoint, data handling, and cost before real records leave the database.

Check your work Check chunk size and overlap on synthetic text, then confirm every fragment fits the downstream limit.

Open Microsoft Learn for full syntax, permissions, and details for your version.