GENERATIVE-AI-ENGINEER-ASSOCIATE · Question #51
A Generative AI Engineer is building a production-ready LLM system which replies directly to customers. The solution makes use of the Foundation Model API via provisioned throughput. They are…
The correct answer is C. Add some LLM calls to their chain to detect unsafe content before returning text. Adding LLM calls within the existing chain to detect unsafe or toxic content before returning a response is the lowest-effort approach given that the engineer is already using the Foundation Model API. They can add a guard call using the same API infrastructure they already…
Question
A Generative AI Engineer is building a production-ready LLM system which replies directly to customers. The solution makes use of the Foundation Model API via provisioned throughput. They are concerned that the LLM could potentially respond in a toxic or otherwise unsafe way. They also wish to perform this with the least amount of effort. Which approach will do this?
Options
- AAsk users to report unsafe responses
- BHost Llama Guard on Foundation Model API and use it to detect unsafe responses.
- CAdd some LLM calls to their chain to detect unsafe content before returning text
- DAdd a regex expression on inputs and outputs to detect unsafe responses.
How the community answered
(27 responses)- A4% (1)
- B11% (3)
- C78% (21)
- D7% (2)
Explanation
Adding LLM calls within the existing chain to detect unsafe or toxic content before returning a response is the lowest-effort approach given that the engineer is already using the Foundation Model API. They can add a guard call using the same API infrastructure they already have, requiring minimal new infrastructure. Option A (asking users to report) is reactive and does not prevent unsafe responses from reaching users. Option B (hosting Llama Guard via provisioned throughput) requires provisioning and managing an additional model endpoint - more effort. Option D (regex on inputs/outputs) is too brittle and will miss the wide variety of ways unsafe content can be expressed. Adding an LLM-based safety check reuses existing capabilities with the least additional setup.
Topics
Community Discussion
No community discussion yet for this question.