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
- A. Create a prompt template that teaches the LLM to detect attack patterns.
- B. Increase the temperature parameter on invocation requests to the LLM.
- C. Avoid using LLMs that are not listed in Amazon SageMaker.
- D. Decrease the number of input tokens on invocations of the LLM.
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.