SnowPro Advanced: Security Engineer Question 406
Single answerImplement content moderation and safety using Cortex Large Language Model (LLM) functions:A company is building an internal assistant in Snowflake that summarizes employee-submitted incident reports and answers follow-up questions using Cortex LLM functions. Security requires that the solution reduce the risk of generating harmful or policy-violating output, while preserving an auditable review process for blocked responses. Which approach BEST meets these requirements?
- A
Call a Cortex generation function directly on the incident text and rely on role-based access control alone, because RBAC prevents unsafe model output from being shown to unauthorized users.
- B
Use a two-step SQL workflow: first run the user input and/or proposed model output through a Cortex content moderation/safety function, then only invoke or return the generation result when the moderation result is acceptable; otherwise store the flagged content and moderation result in a review table.
- C
Mask sensitive columns with a masking policy before sending prompts to the model, because masking policies fully address unsafe or harmful generated content.
- D
Use network policies and private connectivity for all Snowflake access, because restricting network paths is the primary control for LLM safety and content moderation.
Show answer and explanation
Correct answer: B
Explanation
For Snowflake Cortex LLM implementations, content moderation and safety should be enforced as part of the application flow, not delegated to unrelated controls such as RBAC, masking alone, or network restrictions. A practical enterprise pattern is to evaluate prompts and/or model responses with Cortex safety or moderation functions, conditionally allow the response, and log blocked or flagged content for review and auditing. This aligns with defense-in-depth: use RBAC, masking policies, and network controls for access, privacy, and connectivity security, but use LLM-specific moderation controls to address harmful or policy-violating content. Snowflake best practices for secure AI workloads emphasize combining governance and access controls with application-layer safeguards when using Cortex AI functions.
- A. Incorrect.
Incorrect. RBAC controls who can access data and objects in Snowflake, but it does not evaluate whether LLM prompts or outputs contain harmful, abusive, unsafe, or policy-violating content. This option reflects a common misconception that access control alone solves generative AI safety concerns.
- B. Correct.
Correct. The strongest design is to place content moderation/safety checks around the LLM workflow itself. In practice, that means evaluating content with Cortex safety/moderation capabilities before allowing generation or before returning generated text to the user, and persisting flagged cases for human review. This addresses both prevention and auditability, which are key security requirements in enterprise AI implementations.
- C. Incorrect.
Incorrect. Masking policies help protect sensitive data exposure in prompts and outputs, which is valuable for data security and privacy, but they do not by themselves determine whether generated content is toxic, abusive, or otherwise unsafe. This option confuses data protection controls with content safety controls.
- D. Incorrect.
Incorrect. Network policies and private connectivity are important platform security controls, but they do not moderate prompt or response content. They reduce exposure at the network layer, not the application or model-output safety layer.