AWS Certified AI Practitioner AIF-C01 Practice Question
A developer adds the line "You are a security analyst who answers in JSON." at the start of every LLM request. In prompt engineering, what is the main purpose of including this role statement?
Override built-in safety filters so the model can include restricted content.
Guide the model's persona and output format so responses stay consistent with the intended task.
Lower the model's randomness by implicitly reducing the temperature parameter.
Increase the prompt's token count to encourage the model to produce longer answers.
In prompt engineering, an explicit role or persona statement is placed at the beginning of the prompt to set context for the language model. By telling the model it is a "security analyst" and how it should respond (in JSON), the developer guides tone, perspective, and output format, leading to more consistent and relevant answers. Simply adding tokens does not by itself improve quality, temperature is a separate parameter that controls randomness, and role statements do not bypass safety filters.
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.
Why does defining a role in prompt engineering improve model responses?
Open an interactive chat with Bash
What is the difference between a role statement and other prompt parameters like temperature?
Open an interactive chat with Bash
Can a role statement bypass the model's safety filters?
Open an interactive chat with Bash
AWS Certified AI Practitioner AIF-C01
Fundamentals of Generative AI
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 .