Courseiva

Generative AI Leader Practice Question: Techniques to Improve Generative AI Model Output

A developer is using the Gemini API to generate creative product taglines. The taglines are often bland and uncreative. The developer wants more variety and novelty in the outputs. Which parameter adjustment would most effectively increase the diversity of the generated taglines?

⚠ Common exam trap

Many exam-takers confuse temperature with top_p, incorrectly assuming that lowering top_p increases diversity, when in fact it restricts the token pool and reduces variety.

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

✓

Increase temperature from 0.2 to 0.9.

Increasing temperature from 0.2 to 0.9 raises the randomness of token sampling, which directly increases the diversity and novelty of generated text. A low temperature (e.g., 0.2) makes the model highly deterministic, always picking the most probable next token, leading to bland outputs. A higher temperature (e.g., 0.9) allows less probable tokens to be selected more often, producing more creative and varied taglines.

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 top_p from 1.0 to 0.5.

    Why it's wrong here

    Lower top_p restricts the sampling pool, making outputs less diverse.

  • ✗

    Set frequency_penalty to 2.0.

    Why it's wrong here

    Frequency_penalty penalises tokens by how often they have already appeared, which curbs verbatim repetition rather than broadening creative choice; taglines can stay bland while repetition drops. It tempts because it is the obvious anti-repetition knob, and it would help when outputs loop the same phrases — a different problem from novelty.

  • ✓

    Increase temperature from 0.2 to 0.9.

    Why this is correct

    Temperature scales the sampling distribution's randomness; raising it from 0.2 to 0.9 flattens the probability curve, so lower-probability tokens are selected more often. That directly increases tagline variety and novelty rather than reinforcing the bland high-probability output.

  • ✗

    Decrease temperature from 0.7 to 0.2.

    Why it's wrong here

    Reducing temperature sharpens the probability distribution toward the most likely tokens, producing safer, more repetitive text and worsening blandness. It tempts because temperature is the best-known diversity control, and lowering it is right when you need consistent, reproducible, low-variance output such as structured extraction or classification.

About these practice questions

Courseiva writes every Generative AI Leader question from scratch — 1,008 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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This Generative AI Leader practice question is part of Courseiva's free Google Cloud 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 Generative AI Leader exam.