
Answer-first summary for fast verification
Answer: Host Llama Guard on Foundation Model API and use it to detect unsafe responses.
The question emphasizes implementing safety measures with the least amount of effort while using the Foundation Model API with provisioned throughput. Option B (Host Llama Guard on Foundation Model API) is optimal because Databricks' Foundation Model API has built-in support for Llama Guard, enabling out-of-the-box toxicity and safety checks without code changes. This aligns with the community consensus (75% support for B, with upvoted comments highlighting its efficiency and proactive blocking of unsafe content). Option C (adding LLM calls) requires custom development, increasing effort. Option A (user reporting) is reactive and unreliable for prevention. Option D (regex) is quick but ineffective for complex toxicity detection, making it unsuitable for production safety.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
A Generative AI Engineer is building a production-ready LLM system that uses the Foundation Model API with provisioned throughput to reply directly to customers. They need to prevent the LLM from generating toxic or unsafe responses with the least amount of effort.
Which approach should they use?
A
Ask users to report unsafe responses
B
Host Llama Guard on Foundation Model API and use it to detect unsafe responses.
C
Add some LLM calls to their chain to detect unsafe content before returning text
D
Add a regex expression on inputs and outputs to detect unsafe responses.
No comments yet.