PMLE Serving and Scaling Models Practice Question
You are using Vertex AI Matching Engine for similarity search. Your index has 10 million embeddings of 512 dimensions. The query latency requirement is under 10ms for 99th percentile. Which index type should you choose?
⚠ Common exam trap
It's easy for candidates to assume brute-force is the only 'accurate' option and underestimate how severely the curse of dimensionality degrades tree-based and exact methods at 512 dimensions, leading them to pick A or D despite the explicit latency constraint.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Approximate Nearest Neighbor (ANN) index using the ScaNN algorithm.
The ScaNN (Scalable Nearest Neighbors) algorithm is specifically designed for high-dimensional, large-scale similarity search with strict latency requirements. With 10 million 512-dimensional embeddings, an ANN index like ScaNN can achieve sub-10ms query latency at the 99th percentile by trading a small amount of recall for dramatic speed improvements, which is exactly what Vertex AI Matching Engine optimizes for.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Brute-force index with cosine distance.
Why it's wrong here
Brute-force compares every query against all 10 million vectors, so latency scales linearly and cannot meet 10ms at the 99th percentile. It tempts because exact search guarantees perfect recall, and would be correct for small datasets where exhaustive comparison stays within budget.
- ✓
Approximate Nearest Neighbor (ANN) index using the ScaNN algorithm.
Why this is correct
ScaNN's approximate nearest neighbour index partitions and quantises vectors, avoiding exhaustive distance computation across all 10 million embeddings. This keeps 99th-percentile query latency under 10ms, which exact brute-force search could not achieve at this scale.
- ✗
A custom distance-based index using Cloud SQL.
Why it's wrong here
Cloud SQL is a relational OLTP database, not a vector index; it cannot execute approximate nearest-neighbour search over 10 million 512-dimension embeddings within 10ms at p99. It is tempting because Cloud SQL handles structured lookups well, and would suit storing embedding metadata alongside relational records rather than performing similarity search itself.
- ✗
A tree-based index from scikit-learn deployed as a custom container.
Why it's wrong here
scikit-learn tree indexes are approximate and single-node, lacking the distributed sharding and serving infrastructure needed for 10 million vectors at 10ms. It tempts because tree indexes are familiar and fast on modest data, and would suit small, in-memory datasets.
About these practice questions
This PMLE question is part of Courseiva's 775-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PMLE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PMLE exam.