| title | AI_SUMMARIZE (Transact-SQL) | ||
|---|---|---|---|
| description | The AI_SUMMARIZE function produces a concise summary of input text. | ||
| author | WilliamDAssafMSFT | ||
| ms.author | wiassaf | ||
| ms.reviewer | jovanpop | ||
| ms.date | 06/10/2026 | ||
| ms.service | sql | ||
| ms.subservice | t-sql | ||
| ms.topic | reference | ||
| ms.custom |
|
||
| f1_keywords |
|
||
| helpviewer_keywords |
|
||
| dev_langs |
|
||
| monikerRange | =fabric |
[!INCLUDE fabricdw]
AI_SUMMARIZE creates a concise summary of the input text.
Note
AI_SUMMARIZEis in preview.AI_SUMMARIZEis available only in [!INCLUDE fabric-se-short] and [!INCLUDE fabric-dw].
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions
AI_SUMMARIZE ( text )
An expression of a character type, for example nvarchar, varchar, nchar, or char.
Returns nvarchar containing the generated summary.
AI functions return NULL if the AI model can't process the text. Common reasons include:
- Responsible AI rules block inappropriate content in the input text.
- Input text exceeds token limits. The current model supports up to 15 KB of text.
SELECT ai_summarize('The hotel was clean and staff were friendly.') AS summary;Expected result: Clean hotel, friendly staff.
SELECT review_id,
ai_summarize(review_text) AS review_summary
FROM dbo.hotel_reviews;