Home › Certifications › GCP Professional ML Engineer › Pretrained APIs, Model Garden and Generative AI Tuning
19 multiple-choice questions and 14 flashcards on Pretrained APIs, Model Garden and Generative AI Tuning, about 6% of the GCP Professional ML Engineer bank. Every one carries a written rationale.
Pretrained APIs, Model Garden and Generative AI Tuning is one of 8 chapters in CoStudy's GCP Professional ML Engineer bank, and it holds 19 of the bank's 300 multiple-choice questions — roughly 6% of the total. That proportion is not arbitrary: chapters follow the certifying body's published exam outline, and the number of questions in each is set by that domain's published weight, so the share of your practice time this chapter takes matches the share of the real exam it accounts for.
Studying by chapter is worth doing once you have a diagnostic score. A single overall percentage tells you whether you are close; it does not tell you which domain is dragging. Working a weak chapter in isolation, and re-testing it in isolation, is the fastest way to move a score that has stalled — and it is why the mock exams in CoStudy report by domain rather than as one number.
10 questions drawn from this chapter, with the full rationale shown — the controlling principle behind the right answer, and why each wrong option tempts and fails.
A startup wants to fine-tune Gemini for a domain task with ~5,000 labeled examples. Best Vertex feature?
Answer: D — A supervised fine-tuning job on JSONL training examples
D) Correct — supervised fine-tuning on a JSONL set of prompt-response pairs is the supported path at this data size and needs no training code. A) Needs a reward model and far more preference data. B) Infeasible for a closed-weights model and vastly over budget. C) Useful first, but often short of domain accuracy once labeled data exists.
Which change to a prompt is LEAST likely to improve output consistency for a structured extraction task?
Answer: A — Raising the sampling temperature so the model explores more phrasings
A) Correct — higher temperature increases variability, which is the opposite of what a structured extraction task needs; near-deterministic decoding is the right setting. B) An explicit schema constrains the output shape and is standard practice for extraction. C) Few-shot examples are among the most reliable consistency levers. D) Instruction placement matters on long inputs, and leading with the task reliably improves adherence.
Vertex AI Studio is best described as:
Answer: B — A low-code surface for prompt design and tuning
B) Correct — it is the console surface where you draft prompts, compare parameters, launch tuning jobs and evaluate foundation-model output. A) Describes the pipeline service. C) Describes the managed notebook service. D) Describes the model registry.
A tuned model performs well on held-out examples but degrades badly on production prompts that arrive in a second language. The MOST likely cause is:
Answer: A — The tuning dataset was drawn from a single language and narrowed the model
A) Correct — tuning on a narrow distribution can erode capabilities the base model had outside that distribution, so a monolingual tuning set predictably degrades other languages. B) Decoding settings shift style and variability but do not explain a language-specific collapse. C) Current foundation models are multilingual out of the box, so blaming the base model misdiagnoses the regression. D) A fluency-weighted metric would hide accuracy problems generally, not produce a language-shaped failure.
For RAG over private documents on GCP, the recommended stack is:
Answer: B — Embed docs, index them, retrieve, then prompt
A) Ungrounded generation over private facts invites hallucination. B) Correct — embed the corpus, index the vectors in the managed vector search or enterprise search service, retrieve the top matches, and pass them to the model as context. C) Manual pasting does not scale or stay current. D) Tuning is costly and does not track documents that change.
A product needs a generative feature by the end of a two-week sprint, with fuzzy requirements likely to change. The team should FIRST:
Answer: C — Prototype with prompt engineering against a Model Garden model and iterate
C) Correct — with unstable requirements, prompting gives the fastest iteration loop and costs nothing to change; you tune only once the target behavior stops moving. A) Tuning against requirements that will change wastes the run and the dataset. B) Dataset construction is the expensive step and is premature before the behavior is defined. D) Optimizing serving cost before the feature exists is a classic sequencing error.
A team has 800 curated prompt-and-ideal-response pairs and wants a foundation model to adopt their in-house report style. Latency and cost per call must stay similar to the base model. The BEST approach is:
Answer: D — Supervised tuning of the base model on the 800 pairs
D) Correct — a modest set of high-quality input-output pairs teaching a consistent style is the textbook supervised tuning case, and the tuned model serves at roughly base-model cost. A) Reinforcement tuning suits preference data where no single ideal response exists; here ideal responses are already written. B) Distillation is for cutting the cost or size of an already-capable large model, not for teaching a style you have labeled examples for. C) Stuffing exemplars into every prompt does shift style, but it inflates token count on every call, which violates the cost constraint.
An assistant must answer from a 90,000-document internal policy corpus that changes weekly, and must cite sources. The MOST appropriate design is:
Answer: B — A retrieval-augmented design using RAG Engine over an indexed corpus
B) Correct — RAG Engine indexes the corpus, retrieves the relevant passages per question and supplies the provenance needed for citation, and refreshing the index is far cheaper than retraining. A) Tuning teaches behavior, not facts; weekly retunes are expensive and still cannot cite a source. C) 90,000 documents exceed any practical context window and would make every call ruinously slow. D) Distillation compresses capability, not a changing knowledge base, and memorized policy text cannot be attributed.
A finance team must extract line items, totals and vendor names from scanned supplier invoices in twelve formats. The MOST appropriate service is:
Answer: C — Document AI, using its invoice processor to return structured entities
C) Correct — Document AI ships processors specialized for invoices that return typed, structured entities with confidence scores, which is precisely this task. A) Vision text detection gives you characters with bounding boxes but no structure, so twelve layouts become twelve brittle regex sets. B) Prompting a multimodal model can work and is a reasonable fallback for exotic documents, but for a standard document type the purpose-built processor is more accurate and cheaper. D) Training a detector from scratch reinvents what the managed processor already does.
Vertex AI Model Garden vs Vertex AI Studio — correct distinction?
Answer: B — The catalog of models versus the prompt workbench
B) Correct — the model catalogue lists foundation, partner and open models you can inspect and deploy, while the studio is the prompt design, tuning and evaluation workbench built on top of them. A) They are distinct surfaces. C) The studio is prompt-centred, not a custom training service. D) The catalogue also supports discovery and comparison.
4 cards from the 14 in this chapter.
Fine-tune Gemini?
Supervised fine-tuning (SFT) with JSONL training data. Reinforcement learning (RLHF) via separate workflow.
What problem does Document AI solve that a general OCR call does not?
Document AI combines OCR with document structure understanding, returning typed entities, key-value pairs and tables from forms, invoices and contracts through specialized or custom processors. Plain OCR returns only unstructured text with coordinates, leaving extraction logic to you.
What is Model Garden, and which first-party generative models would you find for text, image and video?
Model Garden is the catalog for discovering, testing and deploying foundation models, including Google first-party, third-party and open models. Gemini covers multimodal text and reasoning, Imagen covers image generation and editing, and Veo covers video generation.
Cost-optimize Gemini API?
Use Flash for high-volume cheap tasks, Pro for complex. Context caching for repeated prompts. Batch mode for non-real-time.
These are a sample. The full Pretrained APIs, Model Garden and Generative AI Tuning chapter runs 33 items with per-chapter progress tracking, on the web and in the iOS app.
Open GCP Professional ML Engineer in CoStudy →