A Gen AI Specialist wants to use a Snowflake Cortex LLM function to classify customer questions into two categories: support and food.
The Specialist created a table named QUERIES containing the following values:
Which command should be used?
The Snowflake Cortex CLASSIFY_TEXT function is called as SNOWFLAKE.CORTEX.CLASSIFY_TEXT(<text>, <category_list>), where the first argument is the text column to classify and the second argument is an array of string labels representing the possible categories. Passing query_text as the text argument and ['support', 'food'] as the category array correctly classifies each row into one of the two specified topics, consistent with the documented function signature in Snowflake Cortex LLM Functions reference.
Community Discussion