AI-102 Implement generative AI solutions Practice Question
You are using Azure OpenAI Service to generate marketing copy. You have a requirement to reduce the cost of inference without significantly impacting output quality. Which parameter should you adjust?
⚠ Common exam trap
Microsoft often tests the misconception that temperature or top_p are cost-control parameters, when in fact they only affect output diversity and randomness, not token count or pricing; candidates mistakenly think lowering temperature reduces cost because it 'simplifies' output, but the real cost driver is token length.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Decrease the max_tokens.
Decreasing max_tokens directly reduces the number of tokens generated per API call, which lowers the compute cost because Azure OpenAI charges per token (both input and output). Since the requirement is to reduce inference cost without significantly impacting output quality, reducing max_tokens is the most direct and effective parameter. It caps the response length, preventing unnecessarily verbose output while preserving the model's ability to generate high-quality, concise copy.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Decrease the max_tokens.
Why this is correct
Lower max_tokens limits the output length, reducing tokens consumed and cost.
- ✗
Increase the frequency_penalty.
Why it's wrong here
Frequency penalty discourages repetition but may not reduce overall tokens significantly.
- ✗
Decrease the temperature.
Why it's wrong here
Temperature affects randomness, not the number of tokens generated.
- ✗
Increase the top_p.
Why it's wrong here
Top_p controls nucleus sampling, does not reduce token count.
Go deeper
Related to this question
About these practice questions
Courseiva writes every AI-102 question from scratch — 945 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AI-102 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AI-102 exam.