QuestionQ84

Snowflake Gen AI & LLM Functions

Which Cortex functions support a parameterized option that can be used to filter unsafe and harmful responses from LLMs?

Choose two
  • A TRANSLATE()
  • B CLASSIFY_TEXT()
  • C SUMMARIZE()
  • D TRY_COMPLETE()
  • E COMPLETE()
Explanation

Both the COMPLETE (SNOWFLAKE.CORTEX) and TRY_COMPLETE (SNOWFLAKE.CORTEX) functions accept an options object that includes a 'guardrails' setting. When set to TRUE, this parameter activates Cortex Guard, which evaluates the LLM's response before it is returned and filters out content associated with categories such as violent crimes, hate, sexual content, and self-harm, replacing it with a filtered-response message. This capability is documented specifically for COMPLETE and TRY_COMPLETE because they are the functions that generate free-form chat/completion responses from a language model; TRANSLATE(), CLASSIFY_TEXT(), and SUMMARIZE() perform different, more constrained NLP tasks and do not expose a guardrails option.

Learn more

Community Discussion

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