Courseiva
Serving and Scaling Models →mediumMultiple Choice

PMLE Serving and Scaling Models Practice Question

You need to query a Vertex AI Vector Search index for nearest neighbours. The index is deployed on an endpoint. Which API method should you use to perform the query?

⚠ Common exam trap

The exam often tests the distinction between model prediction endpoints and vector search endpoints, so the trap here is confusing the `predict` method (for model inference) with the `findNeighbors` method (for vector similarity search), leading candidates to incorrectly select option D.

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

✓

projects.locations.indexEndpoints.findNeighbors

The correct API method to query a deployed Vertex AI Vector Search index for nearest neighbors is `projects.locations.indexEndpoints.findNeighbors`. This method is specifically designed for vector similarity search against an index endpoint, returning the nearest neighbors for a given query vector. The other options either target the wrong resource (indexes instead of indexEndpoints) or use methods intended for different purposes like model prediction.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    projects.locations.indexEndpoints.findNeighbors

    Why this is correct

    findNeighbors is the IndexEndpoint method that queries a deployed index for nearest neighbours, accepting the query vector and returning neighbour IDs with distances. It is the correct API surface for querying an index already deployed to an endpoint.

  • ✗

    projects.locations.indexes.match

    Why it's wrong here

    No indexes.match method exists in the Vertex AI Vector Search API; the real methods are indexes.query and endpoints.predict. The name is tempting because 'match' suggests nearest-neighbour search, but the deployed-endpoint scenario requires endpoints.predict, not a non-existent index-level match call.

  • ✗

    projects.locations.indexes.query

    Why it's wrong here

    The indexes.query method targets an index resource directly and is used for batch or stream queries against an undeployed index; it cannot serve online requests to a deployed endpoint. Endpoint prediction is required once the index is deployed, making this method the wrong resource path for the scenario.

  • ✗

    projects.locations.endpoints.predict

    Why it's wrong here

    The predict method serves online inference requests against a deployed model, not vector similarity queries. It is tempting because the index sits on an endpoint, and predict would be correct for invoking a model deployed to that same endpoint for predictions rather than nearest-neighbour retrieval.

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 →

How Courseiva writes practice questions · Editorial policy

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.