Breyta

AI functions (Transact-SQL)

Applies to: SQL Server 2025 (17.x) Azure SQL Database Azure SQL Managed Instance SQL analytics endpoint in Microsoft Fabric and Warehouse in Microsoft Fabric SQL database in Microsoft Fabric

The functions described in this article provide built-in support for AI and the creation of AI enabled applications.

Function Description Applies to
AI_ANALYZE_SENTIMENT Detect sentiment in input text (positive, negative, mixed, neutral) SQL analytics endpoint and Warehouse in Microsoft Fabric
AI_CLASSIFY Classify text into one of the provided labels SQL analytics endpoint and Warehouse in Microsoft Fabric
AI_EXTRACT Extract named values/entities from text as JSON SQL analytics endpoint and Warehouse in Microsoft Fabric
AI_FIX_GRAMMAR Correct grammar in input text SQL analytics endpoint and Warehouse in Microsoft Fabric
AI_GENERATE_CHUNKS Create chunks of text from text expressions based on size and overlap parameters SQL Server 2025 (17.x), Azure SQL Database, SQL database in Microsoft Fabric
AI_GENERATE_EMBEDDINGS Create embeddings (vector arrays) from text expressions SQL Server 2025 (17.x), Azure SQL Database, SQL database in Microsoft Fabric
AI_GENERATE_RESPONSE Generate response text from a prompt and optional context SQL analytics endpoint and Warehouse in Microsoft Fabric
AI_SUMMARIZE Summarize input text SQL analytics endpoint and Warehouse in Microsoft Fabric
AI_TRANSLATE Translate input text to a target language SQL analytics endpoint and Warehouse in Microsoft Fabric

For more info about the built-in support for AI in various platforms of the the Microsoft SQL Database Engine, review the following articles: