Summarize text per row via a registered chat model.
AI_SUMMARIZE(model_name, text)
AI_SUMMARIZE(text USE MODEL model_name)
## Overview Task sugar over AI_GENERATE: sends the row text with a canned instruction ('summarize concisely, respond with only the summary') composed AFTER the model's SYSTEM_PROMPT, so a governed persona and the task both apply. Shares AI_GENERATE's batching, dedup, response memo, and error semantics. The USE MODEL sugar form is accepted and rewritten to the leading-model-argument form.
| Name | Type | Description |
|---|---|---|
model_name | The registry name of a MODEL_TYPE = CHAT model. Must be constant within a query. | |
text | The text to summarize. NULL produces NULL without calling the provider. |
SELECT id, AI_SUMMARIZE('gpt5', article_body) AS abstract FROM news.silver.articles;
-- Materialize once instead of paying per query
CREATE TABLE news.gold.abstracts AS
SELECT id, AI_SUMMARIZE('gpt5', article_body) AS abstract FROM news.silver.articles;