QuestionQ81

Snowflake Gen AI & LLM Functions

A company is organizing an event and asked participants about their food restrictions. The responses have been saved in a table named EVENT_REGISTRATIONS:

Question Image

Which query will compile a list of foods that should not be served?

  • A
  • B
  • C
  • D
Explanation

Snowflake Cortex's COMPLETE function is a general-purpose large language model function that accepts a custom prompt and generates free-form text output, making it suitable for interpreting restriction descriptions (such as 'allergic to nuts' or 'no gluten') and producing a derived list of foods to avoid. In contrast, SENTIMENT only returns a numeric sentiment score, CLASSIFY_TEXT assigns text to a predefined fixed set of category labels rather than generating new content, and SUMMARIZE condenses existing text rather than inferring and listing new information not explicitly present verbatim. Only the COMPLETE-based query correctly asks the model to synthesize a list of foods that must be avoided based on the customer-provided restrictions.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!