AI Intermediate · 22% of the exam

Google Vertex AI & Gemini: free practice questions

5 sample questions from our 163-question bank for this domain — answers and explanations included. These are the same scenario-based style as the real DataCertPrep exam.

1. An e-commerce company is building a real-time product recommendation chatbot that must respond in under 500 ms and handle 10,000 concurrent users. The use case requires moderate reasoning over short product descriptions. Which Gemini model on Vertex AI is MOST appropriate, and why?

  • A. gemini-1.5-pro, because it has the largest context window and highest reasoning capability, ensuring the best recommendation quality.
  • B. gemini-1.5-flash, because it is optimized for low latency and high throughput while still providing sufficient reasoning capability for this use case.✓ Correct
  • C. gemini-2.0, because it is the newest model and automatically provides the lowest latency across all use cases.
  • D. A fine-tuned PaLM 2 model from Model Garden, because fine-tuned models always outperform general-purpose Gemini models for domain-specific tasks.
Explanation

gemini-1.5-flash is specifically designed for speed and efficiency, making it ideal for high-throughput, latency-sensitive applications like real-time chatbots. It delivers sufficient reasoning for moderate tasks at a fraction of the cost and latency of larger models. Option A (gemini-1.5-pro) offers superior reasoning but at higher latency and cost, making it unsuitable for sub-500 ms response time requirements at scale. Option C is incorrect because model generation alone does not guarantee the lowest latency for all use cases; flash-tier models are still the latency champions. Option D is incorrect because PaLM 2 is a legacy model and the premise that fine-tuned models always outperform is a misconception.

2. A retail company is using Vertex AI Matching Engine (now part of Vertex AI Vector Search) to power a product recommendation system. An engineer notices that after adding 2 million new product embeddings, the approximate nearest neighbor (ANN) query latency has increased significantly. Which TWO actions are most likely to reduce query latency while maintaining acceptable recall? (Select TWO)

  • A. Increase the number of index shards to distribute the vector index across more nodes✓ Correct
  • B. Switch the distance measure from cosine similarity to Euclidean distance
  • C. Reduce the value of the 'approximateneighbors_count' (leafNodeEmbeddingCount) parameter to trade a small amount of recall for lower latency
  • D. Re-embed all products using a lower-dimensional embedding model to reduce the vector dimensionality
  • E. Enable streaming updates instead of batch index updates
  • F. Increase the number of deployed index replicas (horizontal scaling of the index endpoint)✓ Correct
Explanation

Option A is correct: increasing the number of shards distributes the ANN index across more nodes, reducing per-node query load and improving latency. Option F is correct: adding more replicas to the index endpoint enables horizontal scaling, distributing concurrent query traffic and reducing latency under load. Option B is incorrect: changing the distance measure does not materially affect ANN query latency; it changes which neighbors are returned. Option C is a common misconception — reducing leafNodeEmbeddingCount increases the number of leaf nodes visited, which can actually increase latency; the parameter to reduce for a latency-recall tradeoff is 'num_neighbors' or the tree depth configuration. Option D is incorrect: re-embedding with lower dimensionality would require re-indexing all vectors and may degrade recommendation quality; it also doesn't address the root cause of latency from additional vectors. Option E is incorrect: streaming updates affect index freshness, not query latency for an existing index.

3. A regulated financial institution is deploying a Gemini-powered application on Vertex AI that must meet the following requirements: (1) All data must remain within the EU region, (2) The application's service account must only be able to invoke Gemini endpoints and nothing else, (3) API calls must never traverse the public internet. Which combination of Google Cloud controls satisfies ALL three requirements?

  • A. Deploy to a Vertex AI endpoint in europe-west4; assign the service account the roles/aiplatform.user IAM role scoped to only the Vertex AI service; enable VPC Service Controls with a service perimeter that includes the Vertex AI API and configure Private Google Access✓ Correct
  • B. Deploy to a Vertex AI endpoint in us-central1 with CMEK enabled; assign the service account roles/owner scoped to the Vertex AI project; use Cloud Armor to block non-EU traffic
  • C. Deploy to europe-west4; assign the service account roles/aiplatform.admin; use a Cloud NAT gateway to route traffic through a static EU IP address before it exits to the public Vertex AI endpoint
  • D. Deploy to europe-west4 with data residency org policy constraints; assign the service account roles/aiplatform.user; use direct internet HTTPS calls from the application since Vertex AI endpoints are TLS-encrypted
Explanation

Option A satisfies all three requirements: (1) Deploying to europe-west4 ensures EU data residency; (2) roles/aiplatform.user is the least-privilege IAM role for invoking Vertex AI prediction endpoints without granting broader permissions; (3) VPC Service Controls with a service perimeter around the Vertex AI API, combined with Private Google Access, ensures that API traffic is routed over Google's internal network and never traverses the public internet. Option B fails requirement 1 (us-central1 is not EU) and requirement 2 (roles/owner grants far more than just Vertex AI access); Cloud Armor does not prevent outbound internet traffic. Option C fails requirement 2 (roles/aiplatform.admin is over-privileged) and requirement 3 (Cloud NAT routes traffic out to the public internet rather than keeping it private). Option D fails requirement 3 because direct HTTPS calls traverse the public internet even if encrypted; VPC Service Controls + Private Google Access are needed to prevent this.

4. An ML engineer is designing a Vertex AI evaluation pipeline for a new RAG-based Q&A system. Management wants to know not only if the generated answers are correct, but also whether the answers are faithful to the retrieved context (i.e., not introducing information beyond what was retrieved). Which evaluation metric and approach on Vertex AI best addresses the faithfulness concern?

  • A. Use BLEU score between the generated answer and the ground-truth answer to measure faithfulness to the retrieved context
  • B. Use a pointwise Gemini-as-judge evaluation with a custom 'groundedness' criterion that checks whether the answer contains only information present in the provided context✓ Correct
  • C. Use pairwise evaluation between the RAG system and a baseline model to determine which is more faithful
  • D. Measure exact-match accuracy between the generated answer and the retrieved document chunks
Explanation

Using a pointwise Gemini-as-judge evaluation with a 'groundedness' criterion is the correct answer. Vertex AI Evaluation supports custom pointwise rubrics where Gemini evaluates a single response against a defined criterion—in this case, groundedness: whether the answer draws only from the retrieved context without hallucinating external information. This directly operationalizes the faithfulness concern. BLEU score measures n-gram overlap between the generated answer and a reference answer; it does not assess whether the answer is grounded in the retrieved context—a high BLEU score against a reference doesn't indicate the model didn't hallucinate additional context. Pairwise evaluation compares two systems for relative preference but does not provide an absolute faithfulness score; it would tell you which system is more faithful, not whether either is actually faithful. Exact-match accuracy between the answer and document chunks is too brittle—paraphrasing is normal and valid, so an exact-match approach would penalize perfectly faithful but reworded answers.

5. An organization is evaluating Gemini model distillation on Vertex AI. They have a large, capable teacher model producing high-quality outputs and want to create a smaller, faster student model for edge deployment. Which THREE statements accurately describe Vertex AI model distillation? (Select THREE)

  • A. The student model is trained to mimic the teacher model's output distribution, not just hard labels✓ Correct
  • B. Distillation on Vertex AI requires the teacher and student to share identical model architectures
  • C. Distillation can be used to transfer knowledge from a large Gemini model to a smaller, more efficient model✓ Correct
  • D. The distilled student model will always have higher accuracy than the teacher model on the target task
  • E. An unlabeled or lightly labeled dataset can be augmented with teacher-generated labels during distillation✓ Correct
  • F. Distillation is equivalent to supervised fine-tuning using only the original human-labeled training data
Explanation

Option A is correct: distillation trains the student on soft targets (the teacher's output probability distribution), which carries more information than hard labels. Option C is correct: a core use case is compressing a large Gemini model into a smaller, faster student model. Option E is correct: a teacher model can generate synthetic labels for an unlabeled dataset, which are then used to train the student — a key advantage of distillation. Option B is wrong: distillation does not require identical architectures; the student is typically smaller. Option D is wrong: the student is expected to be smaller and may sacrifice some accuracy for efficiency, not exceed the teacher. Option F is wrong: distillation is distinct from SFT on human labels; it uses teacher-generated soft labels, not just original human annotations.

158 more questions in this domain

Practice the full bank with instant grading, flashcards, and a timed mock exam.

Start practicing free
Google Vertex AI & Gemini — Free AI Intermediate Practice Questions | DataCertPrep — Certification Prep