Courseiva

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

A developer is using the Gemini API to generate creative marketing copy. They want the output to be more diverse and unexpected. Which parameter should they increase?

⚠ Common exam trap

A common pitfall is confusing 'diversity' with 'avoiding repetition.' Increasing temperature or top-p increases randomness and diversity, while presence and frequency penalties reduce repetition. Candidates may incorrectly choose presence or frequency penalties thinking they increase diversity.

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

✓

Temperature.

Increasing the temperature parameter makes the model's output probabilities more uniform, encouraging it to sample less likely tokens and produce more diverse, unexpected, and creative text. A higher temperature (e.g., >1.0) flattens the probability distribution, so the model is more likely to choose surprising word combinations rather than the most probable ones.

Answer analysis

Option-by-option breakdown

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

  • ✓

    Temperature.

    Why this is correct

    Temperature controls sampling randomness by scaling the probability distribution over candidate tokens before selection. Raising it flattens that distribution, so lower-probability tokens are chosen more often, directly producing the diverse, unexpected marketing copy the developer wants.

  • ✗

    Presence penalty.

    Why it's wrong here

    Presence penalty discourages tokens already used anywhere in the text, pushing the model away from repeated vocabulary. It is tempting for variety, but it operates on token reuse, not on the probability distribution. It would suit output that keeps recycling the same words rather than one needing genuinely unexpected ideas.

  • ✗

    Top-p.

    Why it's wrong here

    Top-p truncates the token pool at a cumulative probability threshold, so raising it widens sampling and increases diversity; however, the question asks which parameter to increase for more unexpected output, and temperature controls randomness directly. Top-p suits scenarios needing controlled vocabulary breadth rather than raw unpredictability.

  • ✗

    Frequency penalty.

    Why it's wrong here

    Frequency penalty reduces repetition of identical tokens, which curbs verbatim loops rather than broadening topic choice. It is tempting because repetition and diversity feel related, but it would be the right parameter when output keeps echoing the same words or phrases, not when you want unexpected subject matter.

About these practice questions

One of 1,008 original Generative AI Leader practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.