> For the complete documentation index, see [llms.txt](https://docs.datasaur.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.datasaur.ai/assisted-labeling/ml-assisted-labeling/google-vertex-ai.md).

# Google Vertex AI

Enable your integration with models from Google Vertex AI.

{% hint style="info" %}
**Supported labeling types**: Row labeling.
{% endhint %}

**ML-assisted labeling** supports models from Vertex AI. If you already have data and training pipelines in Vertex AI, you can utilize your trained model to enhance the performance.

### Enable ML-assisted labeling

To use the models from Vertex AI, select **Google Vertex AI** as the service provider.

<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>

Once selected, you will see the following fields:

* **Target text**: Select the input text used as reference.
* **Target question**: Select the output column to predict.
* **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`
* **Faster prediction speed**: Enables faster predictions by processing requests on the backend.

### Setup your model

You can view the endpoint URL by clicking its name after 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 the Datasaur Service Account access as Vertex AI Administrator. Follow the steps below:

1. Navigate to the project where your model is located.
2. Go to **IAM & Admin**.
3. Click on the **IAM** 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></figcaption></figure>
6. In the role field, select **Vertex AI Administrator**.
7. Click **Save** to complete the setup.

### Start prediction

After configuring the settings above, copy the endpoint URL and paste it into the **API URL** field. Click **Predict labels** to generate and retrieve predictions from your model.

<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>
