Courseiva
Fundamentals of Generative AIhardMultiple ChoiceObjective-mapped

Best Practice for Prompt Engineering on Vertex AI: Consistent Formatting and Delimiters

Which of the following is a best practice when using Vertex AI for prompt engineering?

Quick Answer

The answer is using consistent formatting and delimiters, as this is a core best practice for prompt engineering on Vertex AI. This technique works because large language models rely on attention mechanisms to parse input; clear delimiters like triple backticks, XML tags, or section headers create distinct structural boundaries that reduce ambiguity and help the model reliably separate instructions from context or data. On the Google Cloud Generative AI Leader exam, this concept tests your understanding of how structured prompts improve output predictability and accuracy, often appearing as a straightforward correct choice among distractors like “use the longest possible prompt” or “avoid any special characters.” A common trap is assuming models prefer natural, unstructured language, but Vertex AI’s architecture actually benefits from explicit formatting to minimize hallucination and misinterpretation. Remember the mnemonic “DAD” for Delimiters, Alignment, and Distinction—consistent delimiters are the first step to keeping your prompt’s logic clean and your model’s response on track.

⚠ Common exam trap

Google Cloud often tests the misconception that 'more is better' in prompts or that deterministic settings like temperature=0 are universally optimal, leading candidates to overlook the importance of structured, concise formatting.

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

Use consistent formatting and delimiters

Consistent formatting and delimiters (e.g., using triple backticks, XML tags, or clear section headers) help the model parse instructions and context reliably, reducing ambiguity and improving output quality. This is a core best practice in prompt engineering on Vertex AI because it leverages the model's attention mechanisms to focus on distinct prompt segments, leading to more predictable and accurate responses.

Answer analysis

Option-by-option breakdown

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

  • Always set temperature to 0

    Why it's wrong here

    Temperature 0 is useful for deterministic tasks but may reduce creativity; it's not always best.

  • Use consistent formatting and delimiters

    Why this is correct

    Consistent structure helps the model parse instructions and reduces errors.

  • Avoid using examples in the prompt

    Why it's wrong here

    Examples (few-shot) often improve model performance.

  • Use very long prompts to include all possible instructions

    Why it's wrong here

    Very long prompts can exceed context limits and dilute important instructions.

About these practice questions

One of 683 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

Same concept, more angles

1 more way this is tested on Generative AI Leader

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. Which TWO of the following are best practices for prompt engineering?

medium
  • A.Provide context and examples in the prompt
  • B.Append random noise to prompts to improve creativity
  • C.Use clear and specific instructions
  • D.Always use the maximum possible number of tokens
  • E.Use negative prompts to discourage undesired outputs

Why A: Clear and specific instructions help guide the model, and providing context and examples improves output quality. Options B, D, and E are not recommended.

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.