AWS Certified AI Practitioner (AIF-C01) — Question 28

A company wants to use a large language model (LLM) to develop a conversational agent. The company needs to prevent the LLM from being manipulated with common prompt engineering techniques to perform undesirable actions or expose sensitive information.
Which action will reduce these risks?

Answer options

Correct answer: A

Explanation

Creating a prompt template that trains the LLM to identify attack patterns is effective in reducing the risk of manipulation by helping the model recognize and resist undesirable prompts. Increasing the temperature parameter may lead to more unpredictable outputs, which can actually increase the risk of undesired behavior. Avoiding certain LLMs or reducing input tokens does not directly address the issue of prompt manipulation.