A company building a conversational agent wants to reduce the risk that an LLM will be manipulated by prompt attacks to do harmful things or reveal secrets. Which action helps mitigate that risk?
Choose an answer
Tap an option to check your answer.
Correct answer: Create prompt templates that teach the model to recognize and flag attack patterns..
Why this is the answer
Creating prompt templates that teach the model to recognize and flag attack patterns is a direct and effective mitigation strategy against prompt injection and other adversarial attacks. This method, often called "defensive prompting" or "prompt engineering for safety," trains the model to identify malicious intent or unusual requests and respond appropriately, such as refusing to answer or asking for clarification. Increasing the temperature parameter makes the output more random and creative, which doesn't directly address security vulnerabilities. Avoiding LLMs not in SageMaker is a vendor-specific restriction, not a general security mitigation for prompt attacks. Reducing input tokens might limit the complexity of an attack but doesn't inherently prevent manipulation.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed