Courseiva

Generative AI Leader Fundamentals of Generative AI Practice Question

A prompt engineer wants to improve the model's adherence to a specific output format (e.g., always start with a greeting). Which technique should they try first?

⚠ Common exam trap

Google Cloud often tests the misconception that hyperparameter tuning (like temperature) can enforce structural output rules, when in fact it only controls randomness, not format adherence.

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

✓

Include a system instruction at the beginning of the prompt that specifies the desired format.

System instructions are the most direct and efficient method to enforce output formatting in large language models. By placing a clear directive at the beginning of the prompt (e.g., 'Always start your response with a greeting'), the model's attention mechanism is guided to prioritize this rule during generation, without requiring retraining or hyperparameter changes.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Use a lower temperature to make the output more deterministic.

    Why it's wrong here

    Temperature scales sampling randomness; lowering it makes token choice more deterministic but does not instruct the model to emit a greeting, so format adherence stays unreliable. It tempts because determinism feels like control, and it would be correct when you need reproducible outputs rather than a prescribed structure.

  • ✗

    Fine-tune the model on many examples of the desired format.

    Why it's wrong here

    Fine-tuning adjusts model weights and demands substantial labelled data and compute, which is disproportionate before trying prompt-level instruction. It tempts because fine-tuning reliably bakes in behaviour, and it would be correct once few-shot examples and explicit formatting instructions have demonstrably failed.

  • ✓

    Include a system instruction at the beginning of the prompt that specifies the desired format.

    Why this is correct

    System instructions are processed as high-priority context that conditions every response, making them the most direct control for enforcing a consistent output format such as an opening greeting. This precedes few-shot examples or post-processing in effort and reliability.

  • ✗

    Modify the model's tokenizer to encode the format rules.

    Why it's wrong here

    Tokenisers map text to token IDs and are fixed at pre-training; they cannot encode behavioural rules like starting with a greeting. Format adherence is steered through prompt instructions or fine-tuning. Modifying the tokeniser is tempting because it genuinely controls how text is segmented, which matters when adapting a model to a new language or domain vocabulary.

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.