SnowPro Associate: Platform Question 324
Single answer● CLASSIFY_TEXT functionA support operations team stores incoming customer email bodies in a Snowflake table named SUPPORT_EMAILS with columns EMAIL_ID and EMAIL_TEXT. They want to automatically label each email into business categories such as "billing", "technical issue", or "account access" directly in SQL so analysts can route tickets faster. The team does not want to train a custom machine learning model, but they do want Snowflake to use a provided list of categories when classifying the text. Which approach best meets this requirement?
- A
Use the CLASSIFY_TEXT function on EMAIL_TEXT and provide the target category labels in the prompt or function input so Snowflake can assign the most appropriate label.
- B
Use the COMPLETE function because it is the only Snowflake Cortex function that can classify text into predefined categories in SQL.
- C
Use AI_FILTER on EMAIL_TEXT because it returns the best matching business category label from a supplied category list.
- D
Use SENTIMENT on EMAIL_TEXT and map positive, neutral, and negative outputs to the business categories after the query runs.
Show answer and explanation
Correct answer: A
Explanation
The best answer is to use CLASSIFY_TEXT because the scenario requires assigning each email to one category from a business-defined list directly in SQL, without training a custom model. Snowflake Cortex includes specialized functions for different AI tasks, and CLASSIFY_TEXT is the one intended for categorization of text. COMPLETE is more general-purpose, AI_FILTER is for condition-based filtering, and SENTIMENT is for emotional tone analysis rather than business-topic routing. This aligns with Snowflake best practice: choose the most task-specific Cortex function available instead of forcing a general-purpose function to do specialized work.
- A. Correct.
Correct. CLASSIFY_TEXT is intended for classifying text into categories using natural language instructions and/or provided labels. In this scenario, the team has unstructured email text and a known set of business categories, so CLASSIFY_TEXT is the Snowflake Cortex function that best fits the requirement. It allows classification directly in SQL without building or training a separate custom model.
- B. Incorrect.
Incorrect. COMPLETE is a general text generation and response function, not the primary purpose-built function for text classification into specified labels. While large language model prompting could sometimes be used to emulate classification, the requirement is to use the Snowflake function designed for this task. CLASSIFY_TEXT is the more accurate and maintainable choice.
- C. Incorrect.
Incorrect. AI_FILTER is used to filter rows based on whether content matches a condition expressed in natural language. It is not the function intended to return one label from a predefined set of categories. Someone might choose this option because filtering and classification can seem similar, but classification requires assigning category labels rather than simply evaluating a condition.
- D. Incorrect.
Incorrect. SENTIMENT analyzes emotional tone such as positive, negative, or neutral. Those outputs do not correspond to operational categories like billing or account access. This option reflects a common misconception that any text-analysis function can be repurposed for classification, but sentiment analysis solves a different problem.