nerdexam
Amazon

AIF-C01 · Question #18

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…

The correct answer is A. Create a prompt template that teaches the LLM to detect attack patterns. Creating a prompt template that teaches the LLM to detect attack patterns is the most effective way to reduce the risk of the model being manipulated through prompt engineering.

Submitted by chen.hong· Mar 30, 2026

Question

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?

Options

  • ACreate a prompt template that teaches the LLM to detect attack patterns.
  • BIncrease the temperature parameter on invocation requests to the LLM.
  • CAvoid using LLMs that are not listed in Amazon SageMaker.
  • DDecrease the number of input tokens on invocations of the LLM.

How the community answered

(29 responses)
  • A
    69% (20)
  • B
    3% (1)
  • C
    10% (3)
  • D
    17% (5)

Explanation

Creating a prompt template that teaches the LLM to detect attack patterns is the most effective way to reduce the risk of the model being manipulated through prompt engineering.

Topics

#Prompt injection mitigation#LLM security#Prompt engineering#AI guardrails

Community Discussion

No community discussion yet for this question.

Full AIF-C01 Practice