Snowflake integrates Cortex Guard—an automated safety filtering layer built on Llama Guard—to intercept and filter unsafe or harmful model outputs before they are returned to the caller.
Cortex Guard is enabled by setting `'guardrails': true` inside the optional configuration object argument. This option is supported exclusively on general-purpose completion functions:
1. `SNOWFLAKE.CORTEX.COMPLETE()`
2. `SNOWFLAKE.CORTEX.TRY_COMPLETE()`
Because these functions generate open-ended natural language completions from arbitrary user prompts, they carry the risk of producing harmful, unsafe, or policy-violating content. Enabling guardrails on either function routes the generated output through the safety filter.
In contrast, task-specific functions—such as `TRANSLATE()`, `CLASSIFY_TEXT()`, and `SUMMARIZE()`—run on constrained, specialized models designed for specific transformations and do not expose the `guardrails` configuration parameter.
References & Study Guide Topics:
* Snowflake Gen AI Functions: Cortex Guard Safety Integration
* Content Moderation: Parameterized Guardrails in `COMPLETE` and `TRY_COMPLETE`
===============
Submit