Courseiva

AI-102 Implement generative AI solutions Practice Question

You need to generate a poem using Azure OpenAI. The poem should be about nature and have a cheerful tone. Which parameter should you adjust to influence the tone?

⚠ Common exam trap

Many candidates confuse parameters that control randomness (temperature, top_p) with those that control instruction-following and style (system message), leading them to incorrectly select temperature as the primary tone influencer.

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

✓

system message

The system message (D) is the correct parameter to influence the tone of a generated poem because it acts as a high-level instruction that sets the behavior, persona, and style of the model. By including a directive like 'You are a cheerful poet writing about nature,' you directly control the tone without altering randomness or output length.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    top_p

    Why it's wrong here

    top_p narrows the nucleus of tokens sampled, affecting diversity rather than cheerfulness; tone is set by prompt instructions. top_p is tempting because it is a common sampling control, and would be correct when balancing coherence against variety in the generated text.

  • ✗

    temperature

    Why it's wrong here

    Temperature controls sampling randomness, not emotional register; a cheerful tone comes from prompt wording such as instructions or examples. Temperature is tempting because it shapes output variability, and would be the right parameter when the goal is more creative or more deterministic text.

  • ✗

    max_tokens

    Why it's wrong here

    max_tokens caps the completion length, so it truncates the poem rather than setting its mood; tone is influenced through the prompt. It is tempting because it governs output size, and would be correct when the poem must fit a strict length limit.

  • ✓

    system message

    Why this is correct

    The system message sets the model's behavioural instructions and persona before the user prompt, so specifying a cheerful tone there reliably steers the generated poem's style. Temperature, max tokens and top_p affect randomness or length, not the requested emotional tone.

About these practice questions

This AI-102 question is part of Courseiva's 761-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.