Skip to content

Commit e251b8d

Browse files
JetterMcTedderrwestMSFT
authored andcommitted
Chunks no preview
1 parent fc08b54 commit e251b8d

3 files changed

Lines changed: 20 additions & 30 deletions

File tree

docs/includes/paragraph-content/preview-features.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
22
author: MikeRayMSFT
33
ms.author: mikeray
4-
ms.date: 08/14/2025
4+
ms.reviewer: randolphwest
5+
ms.date: 10/06/2025
56
ms.service: sql
67
ms.topic: include
78
---
@@ -10,7 +11,6 @@ The following table identifies features originally released as preview their cur
1011

1112
| Feature | Current status | Version of latest update | Description |
1213
| --- | --- | --- | --- |
13-
| [AI_GENERATE_CHUNKS](../../t-sql/functions/ai-generate-chunks-transact-sql.md) | Preview | RC 1 | Generate chunks of text from a given input text using an AI model. |
1414
| [Change event streaming](../../relational-databases/track-changes/change-event-streaming/overview.md) | Preview | RC 1 | Stream changes from SQL Server to Azure Event Hubs. |
1515
| [CREATE EXTERNAL MODEL](../../t-sql/statements/create-external-model-transact-sql.md) | Preview | RC 1 | Supports local ONNX models hosted directly on the SQL Server file system. |
1616
| [CREATE VECTOR INDEX](../../t-sql/statements/create-vector-index-transact-sql.md) | Preview | RC 1 | Create an approximate index on a vector column to improve performances of nearest neighbors search. |

docs/sql-server/what-s-new-in-sql-server-2025.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn about new features for SQL Server 2025 (17.x), which gives yo
44
author: MikeRayMSFT
55
ms.author: mikeray
66
ms.reviewer: wiassaf, randolphwest
7-
ms.date: 09/16/2025
7+
ms.date: 10/06/2025
88
ms.service: sql
99
ms.subservice: release-landing
1010
ms.topic: whats-new
@@ -88,7 +88,7 @@ The following sections identify features that are improved or introduced in [!IN
8888
| [Copilot in SQL Server Management Studio](/ssms/copilot/copilot-in-ssms-overview) | Ask questions. Get answers from your data. |
8989
| [Vector data type](../t-sql/data-types/vector-data-type.md) | Store vector data optimized for operations such as similarity search and machine learning applications. Vectors are stored in an optimized binary format but are exposed as JSON arrays for convenience. Each element of the vector can be stored either using a single-precision (4-byte) or half-precision (2-byte) floating-point value. |
9090
| [Vector functions](../t-sql/functions/vector-functions-transact-sql.md) | New scalar functions perform operations on vectors in binary format, allowing applications to store and manipulate vectors in the SQL Database Engine. |
91-
| [Vector index](../sql-server/ai/vectors.md#vector-search) | Create and manage approximate vector indexes to quickly and efficiently find similar vectors to a given reference vector.<br /><br />Query vector indexes from [sys.vector_indexes](../relational-databases/system-catalog-views/sys-vector-indexes-transact-sql.md). Requires [PREVIEW_FEATURES database scoped configuration](../t-sql/statements/alter-database-scoped-configuration-transact-sql.md#preview-features). |
91+
| [Vector index](ai/vectors.md#vector-search) | Create and manage approximate vector indexes to quickly and efficiently find similar vectors to a given reference vector.<br /><br />Query vector indexes from [sys.vector_indexes](../relational-databases/system-catalog-views/sys-vector-indexes-transact-sql.md). Requires [PREVIEW_FEATURES database scoped configuration](../t-sql/statements/alter-database-scoped-configuration-transact-sql.md#preview-features). |
9292
| [Manage external AI models](../t-sql/statements/create-external-model-transact-sql.md) | Manage external AI model objects for embedding tasks (creating vector arrays) accessing REST AI inference endpoints. |
9393

9494
## Developer
@@ -223,7 +223,7 @@ The [intelligent query processing (IQP)](../relational-databases/performance/int
223223
| [CREATE EXTERNAL MODEL](../t-sql/statements/create-external-model-transact-sql.md) | Creates an external model object that contains the location, authentication method, and purpose of an AI model inference endpoint. Requires [PREVIEW_FEATURES database scoped configuration](../t-sql/statements/alter-database-scoped-configuration-transact-sql.md#preview-features). |
224224
| [ALTER EXTERNAL MODEL](../t-sql/statements/alter-external-model-transact-sql.md) | Alters an external model object. |
225225
| [DROP EXTERNAL MODEL](../t-sql/statements/drop-external-model-transact-sql.md) | Drops an external model object. |
226-
| [AI_GENERATE_CHUNKS](../t-sql/functions/ai-generate-chunks-transact-sql.md) | Creates *chunks*, or fragments of text based on a type, size, and source expression. Requires [PREVIEW_FEATURES database scoped configuration](../t-sql/statements/alter-database-scoped-configuration-transact-sql.md#preview-features). |
226+
| [AI_GENERATE_CHUNKS](../t-sql/functions/ai-generate-chunks-transact-sql.md) | Creates *chunks*, or fragments of text based on a type, size, and source expression. |
227227
| [AI_GENERATE_EMBEDDINGS](../t-sql/functions/ai-generate-embeddings-transact-sql.md) | Creates embeddings (vector arrays) using a precreated AI model definition stored in the database. |
228228
| **Regular expressions** | |
229229
| [REGEXP_LIKE](../t-sql/functions/regexp-like-transact-sql.md) | Indicates if the regular expression pattern matches in a string. |
@@ -243,7 +243,7 @@ The [intelligent query processing (IQP)](../relational-databases/performance/int
243243
| [PRODUCT](../t-sql/functions/product-aggregate-transact-sql.md) | The `PRODUCT()` aggregate function calculates the product of a set of values. |
244244
| [CURRENT_DATE](../t-sql/functions/current-date-transact-sql.md) | Returns the current database system date as a date value. |
245245
| [EDIT_DISTANCE](../t-sql/functions/edit-distance-transact-sql.md) | Calculates the number of insertions, deletions, substitutions, and transpositions needed to transform one string to another. |
246-
| [EDIT_DISTANCE_SIMILARITY](../t-sql/functions/edit-distance-similarity-transact-sql.md) | Calculates a similarity value ranging from 0 (indicating no match) to 100 (indicating full match).|
246+
| [EDIT_DISTANCE_SIMILARITY](../t-sql/functions/edit-distance-similarity-transact-sql.md) | Calculates a similarity value ranging from 0 (indicating no match) to 100 (indicating full match). |
247247
| [JARO_WINKLER_DISTANCE](../t-sql/functions/jaro-winkler-distance-transact-sql.md) | Calculates the edit distance between two strings giving preference to strings that match from the beginning for a set prefix length. Returns **float**. |
248248
| [JARO_WINKLER_SIMILARITY](../t-sql/functions/jaro-winkler-similarity-transact-sql.md) | Calculates a similarity value ranging from 0 (indicating no match) to 100 (indicating full match). Returns **int**. |
249249
| - [BASE64_ENCODE](../t-sql/functions/base64-encode-transact-sql.md)<br />- [BASE64_DECODE](../t-sql/functions/base64-decode-transact-sql.md) | Convert binary data into a text format that's safe for transmission across various systems. It can be used in diverse ways as it ensures that your binary data, such as images or files, remains intact during transfer, even when passing through text-only systems. |

docs/t-sql/functions/ai-generate-chunks-transact-sql.md

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ description: The ai_generate_chunks table-valued function creates text chunks.
44
author: jettermctedder
55
ms.author: bspendolini
66
ms.reviewer: randolphwest
7-
ms.date: 08/11/2025
7+
ms.date: 10/06/2025
88
ms.service: sql
99
ms.subservice: t-sql
10-
ms.topic: "reference"
10+
ms.topic: reference
1111
ms.custom:
1212
- sql-ai
1313
- build-2025
@@ -17,7 +17,7 @@ f1_keywords:
1717
helpviewer_keywords:
1818
- "ai_generate_chunks"
1919
dev_langs:
20-
- "TSQL"
20+
- TSQL
2121
monikerRange: "=azuresqldb-current || >=sql-server-ver17 || >=sql-server-linux-ver17"
2222
---
2323
# AI_GENERATE_CHUNKS (Transact-SQL) (Preview)
@@ -26,9 +26,6 @@ monikerRange: "=azuresqldb-current || >=sql-server-ver17 || >=sql-server-linux-v
2626

2727
`AI_GENERATE_CHUNKS` is a table-valued function that creates "chunks", or fragments of text based on a type, size, and source expression.
2828

29-
> [!NOTE]
30-
> `AI_GENERATE_CHUNKS` in SQL Server 2025 is currently in **preview**. In order to use this feature, you must enable the `PREVIEW_FEATURES` [database scoped configuration](../statements/alter-database-scoped-configuration-transact-sql.md#preview-features).
31-
3229
#### Compatibility level 170
3330

3431
`AI_GENERATE_CHUNKS` requires the compatibility level to be at least 170. When the level is less than 170, the [!INCLUDE [ssde-md](../../includes/ssde-md.md)] is unable to find the `AI_GENERATE_CHUNKS` function.
@@ -153,41 +150,34 @@ CROSS APPLY
153150
The following example uses `AI_GENERATE_CHUNKS` to chunk a text column. It uses a `chunk_type` of `FIXED` and a `chunk_size` of 100 characters.
154151

155152
```sql
156-
SELECT
157-
c.chunk
158-
FROM
159-
docs_table t
153+
SELECT c.chunk
154+
FROM docs_table AS t
160155
CROSS APPLY
161-
AI_GENERATE_CHUNKS(source = text_column, chunk_type = FIXED, chunk_size = 100) c
156+
AI_GENERATE_CHUNKS (SOURCE = text_column, CHUNK_TYPE = FIXED, CHUNK_SIZE = 100) AS c;
162157
```
163158

164159
### B. Chunk a text column with overlap
165160

166161
The following example uses `AI_GENERATE_CHUNKS` to chunk a text column using overlap. It uses the chunk_type of FIXED, a chunk_size of 100 characters, and an overlap of 10 percent.
167162

168163
```sql
169-
SELECT
170-
c.chunk
171-
FROM
172-
docs_table t
164+
SELECT c.chunk
165+
FROM docs_table AS t
173166
CROSS APPLY
174-
AI_GENERATE_CHUNKS(source = text_column, chunk_type = FIXED, chunk_size = 100, overlap = 10) c
167+
AI_GENERATE_CHUNKS (SOURCE = text_column, CHUNK_TYPE = FIXED, CHUNK_SIZE = 100, OVERLAP = 10) AS c;
175168
```
176169

177170
### C. Use AI_GENERATE_EMBEDDINGS with AI_GENERATE_CHUNKS
178171

179172
This example uses `AI_GENERATE_EMBEDDINGS` with `AI_GENERATE_CHUNKS` to create embeddings from text chunks and then inserts the returned vector arrays from the AI model inferencing endpoint into a table.
180173

181174
```sql
182-
INSERT INTO
183-
my_embeddings (chunked_text, vector_embeddings)
184-
SELECT
185-
c.chunk,
186-
AI_GENERATE_EMBEDDINGS(c.chunk USE MODEL MyAzureOpenAiModel)
187-
FROM
188-
table_with_text t
175+
INSERT INTO my_embeddings (chunked_text, vector_embeddings)
176+
SELECT c.chunk,
177+
AI_GENERATE_EMBEDDINGS(c.chunk USE MODEL MyAzureOpenAiModel)
178+
FROM table_with_text AS t
189179
CROSS APPLY
190-
AI_GENERATE_CHUNKS(source = t.text_to_chunk, chunk_type = FIXED, chunk_size = 100) c
180+
AI_GENERATE_CHUNKS (SOURCE = t.text_to_chunk, CHUNK_TYPE = FIXED, CHUNK_SIZE = 100) AS c;
191181
```
192182

193183
## Related content

0 commit comments

Comments
 (0)