SnowPro Specialty: Gen AI Question 21
Single answerGuardrailsA financial services company is building a customer-support chatbot in Snowflake using Cortex AI functions. The bot summarizes account-related questions and drafts responses, but the security team is concerned that prompts may contain personally identifiable information (PII) such as account numbers or SSNs, and that generated answers could include unsafe or noncompliant content. The team wants a solution that can inspect both incoming prompts and model outputs before the response is shown to users. Which approach best addresses this requirement?
- A
Implement Cortex Guard to evaluate user prompts and model responses against defined safety policies before returning the answer
- B
Use only role-based access control (RBAC) on the underlying tables, because RBAC prevents unsafe prompt content from reaching the model
- C
Rely on the LLM's system prompt to instruct the model not to reveal or generate sensitive information, because prompt instructions are sufficient guardrails
- D
Apply masking policies to the source tables and skip any output inspection, because masking fully protects against unsafe generated responses
Show answer and explanation
Correct answer: A
Explanation
The key requirement is dual inspection: validating both the incoming prompt and the generated response. In Snowflake Gen AI workflows, guardrails are the appropriate control for screening AI interactions for policy violations, sensitive content, or unsafe output. By contrast, RBAC and masking policies are foundational data-governance controls, but they operate at the data access and storage layers, not at the LLM interaction layer. Similarly, prompt engineering or system prompts can reduce risk but are not considered sufficient enforcement controls. Best practice is to combine governance controls such as RBAC and masking with guardrails for AI-specific input/output screening, especially in regulated environments such as financial services.
- A. Correct.
Correct. Guardrails are intended to help evaluate and filter AI interactions for safety and policy compliance. In this scenario, the requirement is to inspect both inputs and outputs for problematic content such as PII and unsafe responses before returning results to users. A guardrail-based approach is the best fit because it addresses risks at the AI interaction layer rather than only at data storage or access layers.
- B. Incorrect.
Incorrect. RBAC controls who can access Snowflake objects and data, which is important for security, but it does not inspect free-form prompt text entered by users or validate model-generated output for safety or compliance. A user with legitimate app access could still submit sensitive data in a prompt, and the model could still produce unsafe content.
- C. Incorrect.
Incorrect. System prompts can influence model behavior, but they are not a reliable enforcement mechanism for safety or compliance requirements. Models may still generate undesired output, and system prompts do not provide the same policy-driven inspection of both input and output that guardrails are designed to support.
- D. Incorrect.
Incorrect. Masking policies help protect sensitive values stored in Snowflake tables, but they do not address all prompt-based risks. Users can type PII directly into prompts, and generated responses can still contain unsafe or noncompliant content. Therefore, masking alone is not sufficient when output inspection is also required.