SnowPro Specialty: Gen AI Question 237
Single answer3.2 Set guardrails to filter out harmful or unsafe LLM responses.A financial services company is building a customer support assistant in Snowflake using Cortex AI. The assistant answers questions about account features and troubleshooting steps, but the compliance team is concerned that the model could occasionally return unsafe content, such as self-harm guidance, instructions for illegal activity, or toxic language copied from a malicious prompt. The team wants a solution that reduces the chance of harmful responses reaching end users while preserving legitimate support answers. Which approach should they implement?
- A
Add an output moderation step that evaluates the LLM response against safety categories before returning it to the user, and block, replace, or escalate flagged responses.
- B
Increase the model temperature so the assistant is less deterministic and therefore less likely to generate unsafe content.
- C
Rely only on prompt instructions such as "Do not provide harmful content" because system prompts are sufficient guardrails for production use.
- D
Store all model responses in a Snowflake table for later audit, but do not intervene before the response is shown to the user.
Show answer and explanation
Correct answer: A
Explanation
The best answer is to implement output guardrails that inspect generated content before it is presented to the user. For SnowPro Specialty: Gen AI, candidates should recognize that prompt design alone is not a complete safety strategy. In real-world LLM applications, especially in regulated environments like financial services, teams typically combine prompt controls with output moderation, policy-based filtering, and fallback handling. This aligns with general Snowflake Cortex AI best practices for safe generative AI application design: evaluate both inputs and outputs, apply policy enforcement around model calls, and use application logic to block or safely handle disallowed generations. Temperature tuning and auditing have value, but neither replaces guardrails that actively filter unsafe responses.
- A. Correct.
Correct. The most effective production-oriented guardrail in this scenario is to add a response filtering or moderation step on the model output before it is returned to the user. This directly addresses the requirement to filter harmful or unsafe LLM responses, including toxic, self-harm, or illegal-instruction content. In practice, guardrails are strongest when they validate the generated output itself and then block, redact, replace with a safe fallback message, or route to human review when policy violations are detected.
- B. Incorrect.
Incorrect. Temperature affects randomness and creativity, not safety compliance. Lowering or raising temperature may change phrasing, but it does not reliably prevent harmful or policy-violating output. This is a common misconception: generation settings can influence style and variability, but they are not substitutes for explicit guardrails or moderation controls.
- C. Incorrect.
Incorrect. Prompt instructions are helpful, but they are not sufficient as the sole protection in a production system. Users can attempt prompt injection or adversarial phrasing, and models can still produce unsafe responses despite instructions. Relying only on the prompt ignores the need for a separate enforcement mechanism that checks generated content before delivery.
- D. Incorrect.
Incorrect. Auditing responses after delivery may support compliance reviews, incident analysis, or model improvement, but it does not prevent unsafe content from reaching end users. The scenario specifically requires reducing the chance that harmful output is shown, which requires pre-delivery filtering or intervention, not just retrospective logging.