AWS Certified AI Practitioner AIF-C01 Practice Question
A developer is testing a text-generation foundation model on Amazon Bedrock. They need to make sure the response never contains code snippets or URLs. Which prompt engineering technique should they add to the prompt to best meet this requirement?
Raise the temperature parameter to make the output more varied.
Increase the maximum output token limit so the model has room to elaborate.
Include a negative instruction like "Do not include code or URLs" in the prompt.
Define a stop sequence consisting only of punctuation characters.
Negative prompting adds explicit constraints such as "Do not include code or URLs" to the instruction portion of the prompt. The model then treats these constraints as requirements and avoids producing the specified content. Adjusting temperature, length settings, or stop sequences can influence style and termination but do not directly tell the model what content to avoid, so they are less reliable for blocking code or links.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a negative prompt in prompt engineering?
Open an interactive chat with Bash
How does adjusting the temperature parameter affect a model's output?
Open an interactive chat with Bash
What is a stop sequence in AI models like Amazon Bedrock?
Open an interactive chat with Bash
AWS Certified AI Practitioner AIF-C01
Applications of Foundation Models
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99 $11.99
$11.99/mo
Billed monthly, Cancel any time.
$19.99 after promotion ends
3 Month Pass
$44.99 $26.99
$8.99/mo
One time purchase of $26.99, Does not auto-renew.
$44.99 after promotion ends
Save $18!
MOST POPULAR
Annual Pass
$119.99 $71.99
$5.99/mo
One time purchase of $71.99, Does not auto-renew.
$119.99 after promotion ends
Save $48!
BEST DEAL
Lifetime Pass
$189.99 $113.99
One time purchase, Good for life.
Save $76!
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .