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

Key Takeaways

  • 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

TechniqueWhat it doesExample
System instructionsSet role, tone, rules, and output constraints for every request"You are a claims assistant. Answer only from the provided policy."
Few-shot examplesShow the input-output patternThree sample tickets with their correct categories
Structured output (response schema)Forces valid JSON that matches a schemaExtract {policy_id, loss_date, amount}
Function callingThe model requests calls to your APIs or toolsLook up order status in a database
Multimodal inputSend images, PDFs, audio, or video with textSummarize a recorded inspection video
Long contextSend whole documents instead of snippetsCompare 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 sourceUse when
Google SearchAnswers need current public information
Google MapsAnswers need places and geospatial context
Agent Search (formerly Vertex AI Search)Your websites or document stores are indexed in a managed search app
RAG EngineYou 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 APIYou 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.

MethodTraining dataBest for
Supervised fine-tuning (SFT)Hundreds of prompt → ideal response examples (JSONL). Supports text, image, audio, video, and document dataClassification, extraction, summarization style, domain-specific formats, consistent tone
Preference tuningPrompt plus a preferred and a dispreferred responseSubjective quality (helpfulness, brand voice) that is hard to express as one correct answer
Reinforcement learning fine-tuning (preview)Prompts plus a reward function you defineMulti-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 LlamaYou need to own and self-deploy the tuned weights
DistillationA larger teacher generates responses that train a smaller studentCutting 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?
Test Your Knowledge

An airline's customer assistant built on Gemini gives outdated baggage fees because fees change several times a year. What change best fixes the root cause?

A
B
C
D
Test Your Knowledge

A marketing team has thousands of pairs of ad copy in which reviewers marked one version as better and the other as worse, but no single correct answer exists. Which Gemini tuning method fits this data?

A
B
C
D
Test Your Knowledge

A studio has a storyboard with an approved opening frame and closing frame for a 6-second product shot and wants the model to generate the motion between them. Which capability fits?

A
B
C
D