# Google Vertex AI

**Supported Labeling Types**: `Row labeling`

We have made it easy for you to connect our system with [**Vertex AI**](https://cloud.google.com/vertex-ai). If you already have data and training pipelines in Vertex AI, you can use your trained model to improve it.

### Extension Menu

To use the Vertex AI model, you must select Google Vertex AI in the Settings option. Once selected, you will see the following menu.

<figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-fc599366268fcead57b609868d7ee207d6b92c08%2FExtension%20-%20ML-assisted%20Labeling%20-%20Row%20labeling%20-%20Google%20Vertex%20AI%20-%20highlight.png?alt=media" alt="Image of ML Assisted with Google Vertex AI"><figcaption><p><strong>ML-assisted labeling</strong> with Google Vertex AI</p></figcaption></figure>

1. **Target text**: Pick which text to use as input for reference.
2. **Target question**: Decide which output column to predict.
3. **API URL**: The endpoint from Google Vertex AI. The format will follow the sample below:

   `https://<REGION>-aiplatform.googleapis.com/ui/projects/<PROJECT-ID>/locations/<REGION>/endpoints/<ENDPOINT-ID>:predict`
4. **Faster prediction speed**: Toggle this option to run predictions faster via the backend.

### Setup Your Model

You can view the endpoint URL by clicking on the endpoint's name after the successful deployment.

<figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-44498370556cf4a0259166bd06d638fbb26483cd%2FExtension%20-%20ML-assisted%20Labeling%20-%20Span%20labeling%20-%20Google%20Vertex%20AI%20-%20endpoint.png?alt=media" alt="Image of Endpoint page from Google Vertex AI"><figcaption><p>Endpoint page from Google Vertex AI</p></figcaption></figure>

To allow **ML-assisted labeling** to run your model, you need to grant access Datasaur Service Account as Vertex AI Administrator. Below are the steps:

1. Navigate to your selected project where your model is located.
2. Go to **IAM & Admin**.
3. Click on the **IAM** option in the left sidebar.

   <figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-d8e41a08f4f92fcc9a955a0de8ff7a4d564ebd2c%2FExtension%20-%20ML-assisted%20Labeling%20-%20Span%20labeling%20-%20Google%20Vertex%20AI%20-%20permission%20for%20project.png?alt=media" alt="Image of IAM page menu"><figcaption><p>IAM page menu</p></figcaption></figure>
4. Click **Grant Access**.
5. In the **New Principals** field, fill in the **Service Account Email**:

   <integrator@datasaur-gcp.iam.gserviceaccount.com>

   <figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-f543b76287032d216fd03680494bdb971abcaa47%2FExtension%20-%20ML-assisted%20Labeling%20-%20Span%20labeling%20-%20Google%20Vertex%20AI%20-%20grant%20access.png?alt=media" alt="Image of Grant Access Menu"><figcaption><p>Grant access to the selected project</p></figcaption></figure>
6. In the role field, select **Vertex AI Administrator**.
7. Click **Save** to finish setting up permissions.

### Use the Model in ML-Assisted Labeling

After configuring all the settings above, you can copy the endpoint URL and paste it into the API URL field. You can predict the labels and obtain the predicted labels from your own model by clicking **Predict labels**.

<figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-497b8791ede73a42ed80b4897d7b51f6e3d348f1%2FExtension%20-%20ML-assisted%20Labeling%20-%20Row%20labeling%20-%20Google%20Vertex%20AI%20-%20project.png?alt=media" alt="Image of Prediction result"><figcaption><p>Prediction result</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.datasaur.ai/assisted-labeling/ml-assisted-labeling/google-vertex-ai.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
