GENERATIVE-AI-ENGINEER-ASSOCIATE · Question #47
A Generative AI Engineer is developing an LLM application that users can use to generate personalized birthday poems based on their names. Which technique would be most effective in safeguarding the…
The correct answer is A. Implement a safety filter that detects any harmful inputs and ask the LLM to respond that it is. For an application exposed to arbitrary public input, implementing a safety filter that detects malicious or harmful inputs before they reach the LLM is the standard and most effective defense. This creates a hard gate-harmful inputs are intercepted and the system responds with…
Question
A Generative AI Engineer is developing an LLM application that users can use to generate personalized birthday poems based on their names. Which technique would be most effective in safeguarding the application, given the potential for malicious user inputs?
Options
- AImplement a safety filter that detects any harmful inputs and ask the LLM to respond that it is
- BReduce the time that the users can interact with the LLM
- CAsk the LLM to remind the user that the input is malicious but continue the conversation with the
- DIncrease the amount of compute that powers the LLM to process input faster
How the community answered
(44 responses)- A73% (32)
- B5% (2)
- C7% (3)
- D16% (7)
Explanation
For an application exposed to arbitrary public input, implementing a safety filter that detects malicious or harmful inputs before they reach the LLM is the standard and most effective defense. This creates a hard gate-harmful inputs are intercepted and the system responds with a controlled message rather than processing the bad input. Option B (limiting interaction time) does nothing to prevent harmful content from being processed. Option C (asking the LLM to acknowledge the malicious input but continue) actively allows the attack to proceed. Option D (more compute) improves throughput but provides zero security benefit. Input-level safety filtering is the correct architectural pattern.
Topics
Community Discussion
No community discussion yet for this question.