SQL Flow Field Guide

AI_GENERATE_EMBEDDINGS

Catalog support for SQL Server 2025 (17.x)

calls an external embedding model

What changes

Input
text expression and an EXTERNAL MODEL (remote or local endpoint)
Output or change
vector
Return type
AI_GENERATE_EMBEDDINGS returns a single-column table whose rows are the generated embedding vector arrays returned as JSON. Return format The format of the returned JSON is as follows: [ 0.0023929428,

Syntax at a glance

AI_GENERATE_EMBEDDINGS ( source USE MODEL model_identifier [ PARAMETERS optional_json_request_body_parameters ] )

Work example

Create vector values from text using a configured SQL Server model.

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

Check your work Check the selected model, output dimensions, and endpoint behavior before accepting generated rows.

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