Study guide

4.2 Building & Tuning Solutions with Gemini, Imagen, Veo & MaaS

Google Cloud Professional Machine Learning Engineer PMLE

Track your progress as you read

Finished sections get a check mark.

1 Chapter 1: Exam Overview & the Agent Platform Map

1.1 PMLE Exam Facts, Policies & the June 2026 Blueprint 1.2 From Vertex AI to Gemini Enterprise Agent Platform: The Product Name Map

2 Chapter 2: Low-Code ML with BigQuery ML

2.1 Choosing, Training & Predicting with BigQuery ML Models 2.2 Feature Engineering & Feature Selection in BigQuery ML 2.3 Fine-Tuning & Evaluating Gemini Models from BigQuery

3 Chapter 3: AutoML & Google Cloud AI APIs

3.1 Training Models with Agent Platform AutoML 3.2 Building with Document AI, Vision, Translation & Other AI APIs

4 Chapter 4: Foundation Models in Model Garden

4.1 Evaluating & Selecting Models in Model Garden 4.2 Building & Tuning Solutions with Gemini, Imagen, Veo & MaaS 4.3 Optimizing Gemini Applications for Cost, Latency & Availability

5 Chapter 5: Exploring, Preprocessing & Protecting Data

5.1 Organizing & Exploring Tabular, Text & Image Data 5.2 Choosing a Preprocessing Tool: BigQuery, Dataflow, Spark or Python 5.3 Creating & Consolidating Features in Agent Platform Feature Store 5.4 Protecting PII & Sensitive Data in ML Workflows

6 Chapter 6: Notebooks, Prototyping & Experiment Tracking

6.1 Workbench vs. Colab Enterprise: Secure, Collaborative Notebooks 6.2 Prototyping with PyTorch, scikit-learn, JAX & Model Garden in Notebooks 6.3 Experiment Environments, Tracking & Lineage with Experiments and ML Metadata

7 Chapter 7: Evaluating Predictive & Generative AI Solutions

7.1 Evaluation Metrics for Predictive Models 7.2 Evaluating Gen AI: Computation Metrics, Rubrics & LLM-as-a-Judge

8 Chapter 8: Choosing the Modeling Approach

8.1 Choosing the Model Type: ARIMA, Trees, DNNs & LLMs 8.2 Choosing the Product & Deployment Strategy 8.3 Modeling Techniques for Interpretability Requirements

9 Chapter 9: Training Data & Training SDKs

9.1 Organizing & Ingesting Training Data from Cloud Storage & BigQuery 9.2 Custom Training on Agent Platform: Containers, Jobs & Worker Pools 9.3 Kubeflow on GKE, AutoML & Tabular Workflows as Training Choices

10 Chapter 10: Troubleshooting, Hyperparameter Tuning & Fine-Tuning

10.1 Troubleshooting ML Training Failures 10.2 Hyperparameter Tuning on Agent Platform 10.3 Fine-Tuning Foundation Models & When to Tune

11 Chapter 11: Training Hardware & Distributed Training

11.1 Choosing CPUs, GPUs & TPUs for Training 11.2 Distributed Training: Data & Model Parallelism

12 Chapter 12: Deploying Models for Inference

12.1 Batch vs. Online Inference on Agent Platform 12.2 Serving Beyond Agent Platform Endpoints: Model Garden, Cloud Run & GKE 12.3 Prebuilt & Custom Serving Containers

13 Chapter 13: Model Versions, Rollouts & Inference Logic

13.1 Organizing & Versioning Models in Model Registry 13.2 Rollout Strategies: A/B Tests, Canaries & Traffic Splits 13.3 Inference Preprocessing & Postprocessing

14 Chapter 14: Scaling Online Serving

14.1 Serving Features Online with Feature Store 14.2 Public, Dedicated & Private Endpoints 14.3 Serving Hardware & Autoscaling for Throughput 14.4 Tuning Models for Production Training & Serving

15 Chapter 15: End-to-End ML Pipelines

15.1 Validating Data & Models in Pipelines 15.2 Agent Platform Pipelines with KFP: Components, Templates & Caching 15.3 Ensuring Consistent Preprocessing Between Training & Serving

16 Chapter 16: Orchestration with Managed Airflow & Ray

16.1 Orchestrating ML Workflows with Managed Service for Apache Airflow 16.2 Ray on Agent Platform for Distributed ML Workloads

17 Chapter 17: Automating Retraining & CI/CD/CT

17.1 Choosing a Retraining Policy 17.2 CI/CD/CT for ML with Cloud Build

18 Chapter 18: Securing AI Systems, Responsible AI & Explainability

18.1 Protecting AI Systems from Data & Model Exfiltration 18.2 Defending Gen AI Apps: Safety Filters, Model Armor & Regex Guardrails 18.3 Responsible AI: Detecting & Monitoring Bias 18.4 Model Explainability on Agent Platform

19 Chapter 19: Monitoring AI Solutions

19.1 Configuring Model Monitoring on Agent Platform 19.2 Training-Serving Skew, Data Drift, Concept Drift & Attribution Drift 19.3 Monitoring, Testing & Evaluating Gen AI Solutions in Production

4.2 Building & Tuning Solutions with Gemini, Imagen, Veo & MaaS

Key Takeaways Explain This Topic AI

Grounding on Agent Platform can use Google Search, Google Maps, Agent Search, RAG Engine, Elasticsearch, or your own search API to anchor responses to verifiable sources.

Supervised fine-tuning for Gemini supports text, image, audio, video, and document data and typically needs hundreds of labeled examples.

Preference tuning learns from a prompt paired with a preferred and a dispreferred response, for subjective quality that is hard to label directly.

Veo on Agent Platform supports text-to-video, image-to-video, first-and-last-frame generation, reference images, extending videos, and editing videos.

For tuned Gemini models that support thinking, Google recommends setting the thinking budget to 0 or the thinking level to MINIMAL to improve performance and reduce cost.

Last updated: September 2026

Section 1.2 of the exam guide covers building solutions and tuning models for specific use cases with Gemini, Imagen, Veo, and models as a service in Model Garden. The exam tests the order of operations: prompt first, ground when facts matter, tune when behavior must change , and pick the media model that fits the output.

Start with Prompt Design

Technique What it does Example

System instructions Set role, tone, rules, and output constraints for every request "You are a claims assistant. Answer only from the provided policy."

Few-shot examples Show the input-output pattern Three sample tickets with their correct categories

Structured output (response schema) Forces valid JSON that matches a schema Extract {policy_id, loss_date, amount}

  • Function calling The model requests calls to your APIs or tools Look up order status in a database
  • Multimodal input Send images, PDFs, audio, or video with text Summarize a recorded inspection video
  • Long context Send whole documents instead of snippets Compare two 200-page contracts

Iterate on prompts with Agent Studio or the prompt optimizer, and keep an evaluation set so prompt changes are measured, not guessed.

Grounding and RAG

Grounding ties model output to verifiable sources. It reduces hallucinations and returns grounding metadata you can audit.

  • Grounding source Use when
  • Google Search Answers need current public information
  • Google Maps Answers need places and geospatial context
  • Agent Search (formerly Vertex AI Search) Your websites or document stores are indexed in a managed search app

RAG Engine You want a configurable managed RAG pipeline: corpus ingestion, parsing (including Document AI Layout Parser), chunking, embeddings, a vector database, and retrieval

Elasticsearch or your own search API You already have a search system

Scenario: An HR chatbot must answer from 4,000 policy PDFs that change monthly. Tuning would bake in stale policies. The right design is RAG Engine or Agent Search grounding , with citations shown to employees.

Image Generation: Gemini Image Models and Imagen

The exam guide names Imagen , Google's text-to-image model family. It supported generation, inpainting and outpainting edits, background replacement, and subject and style customization. On the current platform, Google marks the Imagen documentation pages as deprecated, and the image-generation docs center on Gemini image models (for example, gemini-3.1-flash-image , gemini-3-pro-image , and the high-volume gemini-3.1-flash-lite-image ). These models add:

  • Generation from text prompts
  • Conversational, turn-based editing
  • Multi-image fusion and character consistency across images

Design points: set safety settings for generated media, keep human review for brand-sensitive assets, and store prompts and outputs so you can audit them.

Video Generation with Veo

Veo (for example, veo-3.1-generate-001 and veo-3.1-fast-generate-001 ) generates video from:

  • Text prompts
  • A first-frame image (image to video)
  • First and last frames (the model fills in the motion)
  • Reference images (keeping subjects or style consistent)
  • Extending or editing existing videos

Fast variants trade some quality for speed and cost, which suits previews and drafts. Video generation starts a long-running operation that you poll for completion, and it can write output to a Cloud Storage bucket you specify, so design it as an asynchronous workflow. Veo versions retire too: veo-3.0-generate-001 listed June 30, 2026 as its retirement date, with veo-3.1-generate-001 as the replacement.

Partner and Open Models Through MaaS

MaaS exposes selected partner models (such as Anthropic Claude, Meta Llama, and Mistral) and open models through the same Agent Platform API and Google Gen AI SDK, with pay-per-use billing and no infrastructure. Enable the model's API from its Model Garden card. Choose MaaS when a specific non-Google model wins your evaluation and you still want serverless operations.

Choosing a Tuning Method

Tuning changes the model's behavior. It is not a reliable way to add frequently changing facts. Google recommends finding the best prompt first and tuning only if needed.

Method Training data Best for

Supervised fine-tuning (SFT) Hundreds of prompt → ideal response examples (JSONL). Supports text, image, audio, video, and document data Classification, extraction, summarization style, domain-specific formats, consistent tone

Preference tuning Prompt plus a preferred and a dispreferred response Subjective quality (helpfulness, brand voice) that is hard to express as one correct answer

Reinforcement learning fine-tuning (preview) Prompts plus a reward function you define Multi-step reasoning or decisions where outputs can be scored automatically

Open model tuning (full or LoRA ) Labeled examples on open models such as Gemma or Llama You need to own and self-deploy the tuned weights

Distillation A larger teacher generates responses that train a smaller student Cutting cost and latency while keeping reasoning quality

Parameter-efficient tuning (adapters such as LoRA) updates a small subset of parameters. It needs less compute and data than full fine-tuning , which updates every weight and can reach higher quality at higher cost. For Gemini SFT, you choose the adapter size (1, 2, 4, 8, or 16 on current models).

Example SFT record

Gemini supervised tuning data is JSON Lines in Cloud Storage. Each line holds a conversation: the user turn with the production-style prompt, and the model turn with the ideal answer. For example, a user turn containing "Classify this claim note: water damage in basement after storm" paired with a model turn containing {"category": "WATER_DAMAGE", "urgency": "HIGH"} . A separate validation file tracks overfitting during tuning.

Practical SFT notes

Training data should look like production prompts: same format, same context, same instructions.

Quality beats quantity. Find where the model fails before adding more examples.

Tuned models for thinking-capable Gemini versions work best with a thinking budget of 0 (Gemini 2.5 and earlier) or thinking level MINIMAL (Gemini 3 and later), because tuning teaches the task directly.

A tuned model has its own endpoint but shares quota with its base model .

Tuning and tuned-model serving are offered in specific regions per model, so check the model's tuning page against residency requirements.

Loading diagram... Prompt, Ground, or Tune?