> For the complete documentation index, see [llms.txt](https://docs.codatum.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.codatum.com/best-practices/ai-generated-summary/vertex-ai-setup.md).

# Setting Up Vertex AI

## How to Set Up

Perform the following operations in the BigQuery console:

* Add an External connections
  * Add `Vertex AI > BigQuery federation` from Add data in Explorer
* Add access credentials to the External connection
  * Grant access permissions from IAM and admin
    * Enter the Service account ID of the added External connection in Add principals
    * Assign the `Vertex AI User` role
* Add the following role to the Codatum connection:
  * `BigQuery Connection User`
  * There are two ways to add:
    * Add a principal to the External conneciton
      * Enter the Service account used for the Codatum connection in Add principals
    * Add a role to the Service account set for the Codatum connection
* Create a dataset
  * Create a dataset to register the model
* (Optional) Add a model
  * Add a model from the BigQuery query editor. Reference:：<https://cloud.google.com/bigquery/docs/generate-text-tutorial-gemini>
  * You can add models on Codatum


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.codatum.com/best-practices/ai-generated-summary/vertex-ai-setup.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
