DAA-C01 Question 101
Single answerAI functionsA retail analytics team stores customer product reviews in a Snowflake table and wants analysts to classify each review into one of five business-defined categories (Shipping, Product Quality, Pricing, Customer Service, Other) directly in SQL. The team needs a solution that minimizes custom model management and works natively inside Snowflake for ad hoc analysis. Which approach should the analyst use?
- A
Use SNOWFLAKE.CORTEX.CLASSIFY_TEXT with the review text and the five category labels to return the best matching label.
- B
Use SNOWFLAKE.CORTEX.COMPLETE and assume the model output will always match one of the five categories exactly without additional prompt design or validation.
- C
Use AI_EMBED and assign the review to a category by selecting the largest numeric value in the embedding vector.
- D
Use AI_SUMMARIZE_AGG across all reviews first, then classify the single aggregated summary into one of the five categories for row-level reporting.
Show answer and explanation
Correct answer: A
Explanation
For native AI-driven text classification in Snowflake SQL, the best fit is SNOWFLAKE.CORTEX.CLASSIFY_TEXT, which is intended for assigning text to predefined labels. This aligns with the scenario's requirement for minimal model management and direct use inside Snowflake. While SNOWFLAKE.CORTEX.COMPLETE can sometimes be used for prompt-based classification, it is a generative function and usually requires stricter prompt engineering and output validation to make results reliable for production analytics. AI_EMBED is for vector representations used in semantic similarity workflows, and AI_SUMMARIZE_AGG is for summarization across rows rather than row-level labeling. These distinctions follow Snowflake Cortex AI function best practices: use task-specific functions when available, and reserve general generation functions for cases that need free-form output or custom prompting.
- A. Correct.
Correct. SNOWFLAKE.CORTEX.CLASSIFY_TEXT is designed for text classification tasks in SQL where you provide the input text and a set of candidate labels. This is the most direct native approach for mapping each review to one of a fixed set of business categories without building and hosting a custom model pipeline.
- B. Incorrect.
Incorrect. SNOWFLAKE.CORTEX.COMPLETE can generate text and could be prompted to classify reviews, but treating its output as guaranteed to match one of the five labels exactly is risky. Generative output may vary in wording, formatting, or confidence unless carefully constrained and post-validated. For a fixed-label classification use case, CLASSIFY_TEXT is the more appropriate built-in function.
- C. Incorrect.
Incorrect. AI_EMBED generates vector embeddings that represent semantic meaning, but the embedding values themselves are not category IDs and cannot be classified by simply choosing the largest number in the vector. Embeddings are typically used for similarity search, clustering, or retrieval workflows, not direct label assignment in this way.
- D. Incorrect.
Incorrect. AI_SUMMARIZE_AGG is an aggregation function that summarizes multiple rows into a combined summary. Using it before classification would lose row-level detail and would not support assigning a category to each individual review, which is required for analyst reporting.