
Answer-first summary for fast verification
Answer: Implement a safety filter that detects any harmful inputs and ask the LLM to respond that it is unable to assist
Option A is the most effective technique because implementing a safety filter (guardrails) directly addresses the core security concern by detecting and blocking malicious inputs before they reach the LLM. This proactive approach prevents harmful content from being processed while maintaining a professional user experience by politely declining assistance. Option B (reducing interaction time) doesn't address malicious input detection and may degrade legitimate user experience. Option C (reminding but continuing) still exposes the LLM to potentially harmful inputs. Option D (increasing compute) is irrelevant to security and only addresses performance, not malicious input protection. The community discussion strongly supports A with 100% consensus and upvoted comments emphasizing that safety filters are the most effective protection technique.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A Generative AI Engineer is building an LLM application that allows users to generate personalized birthday poems using their names. Considering the risk of malicious user inputs, which technique is the most effective for securing the application?
A
Implement a safety filter that detects any harmful inputs and ask the LLM to respond that it is unable to assist
B
Reduce the time that the users can interact with the LLM
C
Ask the LLM to remind the user that the input is malicious but continue the conversation with the user
D
Increase the amount of compute that powers the LLM to process input faster