Courseiva
Techniques to Improve Generative AI Model OutputeasyMultiple ChoiceObjective-mapped

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

Exhibit

User: Translate the following sentence to French: Hello, how are you?
Model: Bonjour, comment vas-tu?
Expected: Bonjour, comment allez-vous? (formal)

Refer to the exhibit. A user wants formal translations from a generative AI model, but the model outputs informal style inconsistently. Which prompt engineering technique would best ensure consistent formal translations?

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

Provide a few-shot example with formal and informal pairs

Providing a few-shot example that explicitly demonstrates the desired formal translation guides the model to follow that pattern. System instructions can help but are less direct.

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 context caching

    Why it's wrong here

    Caching does not alter model behavior.

  • Provide a few-shot example with formal and informal pairs

    Why this is correct

    Correct: Few-shot examples directly show the expected output format.

  • Use a longer system prompt with detailed rules

    Why it's wrong here

    While helpful, detailed rules may not be as effective as examples for style.

  • Set top_k to 1

    Why it's wrong here

    This makes output deterministic but does not enforce formal tone.

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

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.