Skip to content

Professional Machine Learning Engineer · Domain 1: Architecting low-code AI solutions · 13% of the exam

Task 1.2: Building AI solutions using Google Cloud AI APIs or foundational models.

Selecting a model from Model Garden, building on Document AI, Vision and Translation, tuning Gemini, Imagen, Veo and models as a service for a use case, and keeping Gemini applications within cost, latency and availability targets.

Study it

Sample questions

Try each one before opening the answer. Every option is explained, with the Google Cloud documentation page that proves it.

Question 1 · choose 1

A city receives building-permit applications on its own six-page form. It needs about 25 named fields, such as the parcel number, contractor license and estimated cost, returned as structured entities. No Document AI pretrained parser exists for this form, and the team has only 30 sample applications and little time for labeling. Which processor should the ML engineer start with?

  1. AThe Form Parser, which returns the key-value pairs found on each page
  2. BThe pretrained Invoice Parser, run on the permit forms
  3. CA Custom Extractor using its generative AI training method
  4. DA Custom Classifier trained on the 30 sample applications
Show the answer and why
  • AThe Form Parser, which returns the key-value pairs found on each page

    Incorrect

    Form Parser returns generic key-value pairs and tables, not the city's 25 named fields as a defined schema.

  • BThe pretrained Invoice Parser, run on the permit forms

    Incorrect

    A pretrained parser extracts its own document type's fields; permit forms are not invoices.

  • CA Custom Extractor using its generative AI training method

    Correct

    The custom extractor is for document types with no pretrained processor, and its generative mode needs from zero to a few dozen documents.

  • DA Custom Classifier trained on the 30 sample applications

    Incorrect

    A classifier assigns a document to a class; it does not extract fields.

Document AI's custom extractor builds entity extraction for new document types that have no pretrained processor. Its generative AI (foundation model, optionally fine-tuned) method needs about 0 to 50 documents for production quality, while custom models and template-based models need more consistent layouts or more training documents.

Question 2 · choose 1

A legal assistant built on Gemini sends the same 300-page contract bundle with every question a lawyer asks, about 5,000 questions a day per bundle, and answers must come back within a few seconds. Token costs are high and the time to first token is slow. The bundle changes once a week. What should the ML engineer do first?

  1. ACollect the day's questions into one batch inference job and return the answers to the lawyers the next morning
  2. BBuy Provisioned Throughput for the model to keep the requests from ever being throttled
  3. CCache the bundle with explicit context caching and send each question with a reference to it
  4. DFine-tune the model on the contract bundle so it no longer has to be sent with each question
Show the answer and why
  • ACollect the day's questions into one batch inference job and return the answers to the lawyers the next morning

    Incorrect

    Batch inference is cheaper but asynchronous, which breaks the few-seconds answer requirement.

  • BBuy Provisioned Throughput for the model to keep the requests from ever being throttled

    Incorrect

    Provisioned Throughput guarantees capacity; it does not reduce the tokens billed for the repeated bundle.

  • CCache the bundle with explicit context caching and send each question with a reference to it

    Correct

    Caching the repeated content cuts the cost and latency of requests that reuse it, and the cache can be refreshed when the bundle changes.

  • DFine-tune the model on the contract bundle so it no longer has to be sent with each question

    Incorrect

    Tuning teaches style and behavior, not reliable recall of a contract that changes every week.

Context caching reduces the cost and latency of requests that contain repeated content. Implicit caching is automatic; explicit caching lets you declare the content to cache and refer to it from later prompts, which fits a large bundle reused thousands of times a day.

Question 3 · choose 1

A utility digitizes photos of handwritten field inspection sheets. Each sheet is full of dense text, and the downstream parser needs the text with its page, block and paragraph structure. Which Cloud Vision API feature should the ML engineer call?

  1. ADOCUMENT_TEXT_DETECTION
  2. BTEXT_DETECTION on each photo, which reads text in images
  3. CLABEL_DETECTION, which returns the general labels found in an image
  4. DOBJECT_LOCALIZATION, which finds and boxes the objects in each photo
Show the answer and why
  • ADOCUMENT_TEXT_DETECTION

    Correct

    This feature is optimized for dense text and documents, including handwriting, and returns page, block, paragraph and word structure.

  • BTEXT_DETECTION on each photo, which reads text in images

    Incorrect

    TEXT_DETECTION reads text such as signs in images; the response is not optimized for dense documents.

  • CLABEL_DETECTION, which returns the general labels found in an image

    Incorrect

    Labels describe what an image shows, not the words written on it.

  • DOBJECT_LOCALIZATION, which finds and boxes the objects in each photo

    Incorrect

    Object localization returns objects and bounding boxes, not text.

The Vision API offers TEXT_DETECTION for text in general images and DOCUMENT_TEXT_DETECTION, whose response is optimized for dense text and documents (including handwriting) and includes page, block, paragraph, word and break information.

Question 4 · choose 2

A European insurer's claims assistant calls a Gemini model on Standard PayGo from the europe-west1 regional endpoint. During busy hours it gets many 429 errors. The data protection officer requires that ML processing of customer data stays inside the European Union. Which TWO changes should the ML engineer make? (Choose TWO.)

  1. ASend requests to the global endpoint
  2. BSend requests to the eu multi-region endpoint
  3. CRetry throttled requests with truncated exponential backoff
  4. DMove the workload to Flex PayGo
  5. ERaise the temperature parameter on each request
Show the answer and why
  • ASend requests to the global endpoint

    Incorrect

    The global endpoint has the most headroom but may process requests in any location, which breaks the EU requirement.

  • BSend requests to the eu multi-region endpoint

    Correct

    The jurisdictional eu endpoint keeps ML processing within EU member states while pooling capacity across data centers instead of one region.

  • CRetry throttled requests with truncated exponential backoff

    Correct

    On shared PayGo capacity a 429 signals temporary contention, and exponential backoff is the recommended way to absorb it.

  • DMove the workload to Flex PayGo

    Incorrect

    Flex PayGo is for latency-tolerant work and accepts more throttling, the opposite of what a live assistant needs.

  • ERaise the temperature parameter on each request

    Incorrect

    Temperature changes how random the output is; it has no effect on throughput or throttling.

Global endpoints give the most availability but may process requests anywhere, so they provide no data residency guarantee. Jurisdictional multi-region endpoints (us and eu) keep ML processing inside the boundary and pool capacity across several data centers. On Standard PayGo a 429 reflects temporary contention for shared resources, so the client should retry with truncated exponential backoff.

Question 5 · choose 1

A customer-facing assistant on Gemini is business critical, but its traffic is unpredictable, so a Provisioned Throughput commitment would often sit unused. On Standard PayGo, performance varies at busy times. Which consumption option should the ML engineer choose?

  1. AFlex PayGo, which is priced lower per token
  2. BPriority PayGo, which costs more per token than Standard PayGo
  3. CA one-month Provisioned Throughput commitment, sized for the peak, instead of Standard PayGo
  4. DBatch inference for all requests
Show the answer and why
  • AFlex PayGo, which is priced lower per token

    Incorrect

    Flex PayGo is for latency-tolerant work and accepts more throttling, the opposite of a live assistant's needs.

  • BPriority PayGo, which costs more per token than Standard PayGo

    Correct

    Priority PayGo gives more consistent performance than Standard PayGo without the upfront commitment of Provisioned Throughput.

  • CA one-month Provisioned Throughput commitment, sized for the peak, instead of Standard PayGo

    Incorrect

    Sizing a commitment for unpredictable peaks leaves capacity unused most of the time, which the team wants to avoid.

  • DBatch inference for all requests

    Incorrect

    Batch inference is asynchronous and cannot answer users in real time.

Priority PayGo is a consumption option that provides more consistent performance than Standard PayGo without Provisioned Throughput's upfront commitment, at a higher per-token rate. It suits business-critical workloads with fluctuating or unpredictable traffic.

Question 6 · choose 1

A software company wants its help articles translated in the same tone and phrasing its human translators use. It has 20,000 approved sentence pairs from past translations but no ML team, and it does not want to train or manage a model. What should the ML engineer use?

  1. AA glossary that maps each product name to its translation
  2. BA Gemini model fine-tuned on the sentence pairs and served from an endpoint
  3. CDocument translation for the articles, which keeps their layout
  4. DAdaptive translation with the sentence pairs as an example dataset
Show the answer and why
  • AA glossary that maps each product name to its translation

    Incorrect

    A glossary fixes individual terms; it does not carry over tone and phrasing from whole sentences.

  • BA Gemini model fine-tuned on the sentence pairs and served from an endpoint

    Incorrect

    Tuning and serving a model is the training and management work the company wants to avoid.

  • CDocument translation for the articles, which keeps their layout

    Incorrect

    Document translation preserves formatting; it does not adapt the wording to the company's style.

  • DAdaptive translation with the sentence pairs as an example dataset

    Correct

    Adaptive translation uses example translations to tailor responses, selecting the most similar reference sentences for each request.

With adaptive translation, Cloud Translation uses example translations to customize its output. With a dataset of sentence pairs (TSV or TMX), it automatically picks the five reference sentences most similar to each source sentence; no model has to be trained.

Question 7 · choose 1

A team builds semantic search over 2 million support articles with a Gemini embedding model. Which embedding task types should it use for the indexed articles and for the users' search queries?

  1. ARETRIEVAL_DOCUMENT for the articles and RETRIEVAL_QUERY for the queries
  2. BSEMANTIC_SIMILARITY for both the articles and the queries
  3. CCLUSTERING for the articles and CLASSIFICATION for the queries
  4. DRETRIEVAL_QUERY for the articles and RETRIEVAL_DOCUMENT for the users' queries
Show the answer and why
  • ARETRIEVAL_DOCUMENT for the articles and RETRIEVAL_QUERY for the queries

    Correct

    Retrieval is an asymmetric use case: documents and queries are embedded with their own task types.

  • BSEMANTIC_SIMILARITY for both the articles and the queries

    Incorrect

    SEMANTIC_SIMILARITY is for text similarity and is not intended for retrieval use cases.

  • CCLUSTERING for the articles and CLASSIFICATION for the queries

    Incorrect

    These task types are for grouping and labeling texts, not for matching queries to documents.

  • DRETRIEVAL_QUERY for the articles and RETRIEVAL_DOCUMENT for the users' queries

    Incorrect

    This reverses the roles; documents use RETRIEVAL_DOCUMENT and queries use RETRIEVAL_QUERY.

Embedding task types optimize embeddings for a use case. Search retrieval is asymmetric: embed the documents with RETRIEVAL_DOCUMENT and the queries with RETRIEVAL_QUERY. SEMANTIC_SIMILARITY, CLASSIFICATION and CLUSTERING are symmetric, single-input task types.

Question 8 · choose 1

A call center transcribes recorded calls with Cloud Speech-to-Text, and analysts need each part of the transcript attributed to the agent or the customer. The calls are recorded on a single mixed channel. Which feature should the ML engineer enable?

  1. AAutomatic language detection for each call
  2. BWord-level confidence scores returned with each word
  3. CSpeaker diarization in the recognition request
  4. DProfanity filtering on the transcripts
Show the answer and why
  • AAutomatic language detection for each call

    Incorrect

    Language detection picks the spoken language; it does not separate the speakers.

  • BWord-level confidence scores returned with each word

    Incorrect

    Confidence scores show how sure the recognizer is about each word, not who said it.

  • CSpeaker diarization in the recognition request

    Correct

    Diarization detects when speakers change and labels the voices by number in the transcript.

  • DProfanity filtering on the transcripts

    Incorrect

    Profanity filtering masks words; it does not attribute them to speakers.

Cloud Speech-to-Text can recognize multiple speakers in the same audio. With speaker diarization enabled in the request, it detects speaker changes and labels each word with a speaker number.

Practice domain 1 →Practice all domains →