Microsoft Azure AI Engineer Associate AI-102 Practice Question
You are configuring a prompt flow in Azure AI Foundry that calls the Azure OpenAI gpt-4o model to generate an ARM template snippet. The responses sometimes include explanatory sentences before the code block, which breaks downstream parsing. Which prompt change is most likely to make the model return only the template code and nothing else?
Raise the temperature parameter to 1.2 to make the model focus on code generation.
Modify the user message to read "Explain each step and then provide the ARM template."
Insert a system message such as "You are an assistant that returns only the requested ARM template JSON inside one markdown code block-no extra text."
Send the prompt as a function call message with a name like "return_template" without changing the system instructions.
Adding a system message that explicitly instructs the assistant to output only the desired artifact narrows the response format. System messages establish the assistant's behavior across the entire conversation, so telling the model to return just the code in a single markdown block greatly reduces narration. Increasing temperature encourages more varied text, not less. A function-calling role could constrain the schema but requires additional parameter definitions and isn't necessary here, while asking for explanations invites even more non-code output.
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 an ARM template in Azure?
Open an interactive chat with Bash
What does the 'temperature parameter' do in Azure OpenAI Service?
Open an interactive chat with Bash
What is the role of a system message in prompt engineering?
Open an interactive chat with Bash
Microsoft Azure AI Engineer Associate AI-102
Implement generative AI solutions
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
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .