snowflake.snowpark.DataFrameAIFunctions.summarize_agg¶
- DataFrameAIFunctions.summarize_agg(input_column: Union[snowflake.snowpark.column.Column, str], *, output_column: Optional[str] = None) snowflake.snowpark.DataFrame[source]¶
Summarize a column of text data using AI.
This method aggregates and summarizes text data from multiple rows into a single comprehensive summary. It’s particularly useful for creating summaries from collections of reviews, feedback, transcripts, or other text content.
- Parameters:
input_column – The column (Column object or column name as string) containing the text data to summarize.
output_column – The name of the output column to be appended. If not provided, a column named
AI_SUMMARIZE_AGG_OUTPUTis appended.
- Returns:
A new DataFrame with a single row containing the summarized text.
Examples:
Note
This is an aggregation function that combines multiple rows into a single summary
For best results, provide clear and coherent text in the input column
The summary will capture the main themes and important points from all input rows
Unlike the
aggmethod which requires a task description,summarize_aggautomatically generates a comprehensive summary
This function or method is experimental since 1.39.0.