Courseiva
Techniques to Improve Generative AI Model OutputeasyMultiple ChoiceObjective-mapped

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

A developer is using the Gemini API to build a chatbot. They want the model to always respond in a friendly, professional tone. Which prompt engineering technique should they use?

⚠ Common exam trap

Google Cloud often tests the distinction between controlling output style (system instructions) versus controlling output randomness (temperature) or length (max tokens), so the trap here is that candidates may confuse temperature or token limits with persona control, thinking that lowering creativity or capping length will enforce a specific tone.

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

Set system instructions to 'You are a friendly and professional assistant.'

Setting system instructions is the most direct and reliable way to define the model's persona and behavioral constraints. In the Gemini API, system instructions act as a persistent, top-level directive that influences every response, ensuring the chatbot consistently adopts a friendly and professional tone without requiring repeated examples or parameter tuning.

Answer analysis

Option-by-option breakdown

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

  • Set system instructions to 'You are a friendly and professional assistant.'

    Why this is correct

    System instructions define the assistant's behavior for the entire session.

  • Include a few-shot example in every user message.

    Why it's wrong here

    Few-shot examples help but don't guarantee persistent tone across all messages.

  • Set the temperature to 0.2.

    Why it's wrong here

    Temperature controls randomness, not tone.

  • Set max output tokens to 100.

    Why it's wrong here

    Max tokens only limits response length, not tone.

About these practice questions

This Generative AI Leader question is part of Courseiva's 683-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 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.