If you experience issues when you run the preceding commands, or if the
extension isn't updated to version 1.4.3 after you run the preceding
commands, contact AlloyDB support.
After you ensure that the version is current, install the preview
functionality by running the upgrade_to_preview_version procedure:
Access data in Cloud Storage to generate multimodal embeddings
To generate multimodal embeddings, refer to content in Cloud Storage using
a gs:// URI.
Access Cloud Storage content through your current project's
Vertex AI service agent. By default, the Vertex AI
service agent already has permission to access the bucket in the same project.
For more information, see IAM roles and permissions index.
To access data in a Cloud Storage bucket in another Google Cloud project,
run the following gcloud CLI command to grant the Storage Object Viewer role (roles/storage.objectViewer) to the Vertex AI service agent of your
AlloyDB project.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Generate multimodal embeddings\n\n| **Preview**\n|\n|\n| This feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n| **Note:** This experimental launch is a Pre-GA offering.\n\nThis page describes how to generate multimodal embeddings using the supported\nVertex AI multimodal model, `multimodalembedding@001`.\n\nYou can use the Vertex AI multimodal embedding models referred to\nin [Supported models](/vertex-ai/generative-ai/docs/embeddings/get-multimodal-embeddings#supported-models).\n\nThis page assumes that you're familiar with AlloyDB for PostgreSQL and\n[generative AI concepts](/docs/generative-ai). For more information about embeddings, see [What are embeddings](/alloydb/docs/ai/work-with-embeddings#what-are-embeddings).\n\nBefore you begin\n----------------\n\nBefore you use multimodal embeddings, do the following:\n\n- [Verify that the `google_ml_integration` extension is installed](/alloydb/docs/ai/configure-vertex-ai#verify-installed-extension).\n- [Verify that the `google_ml_integration.enable_model_support` flag is set to `on`](/alloydb/docs/instance-configure-database-flags).\n- [Integrate with Vertex AI](/alloydb/docs/ai/configure-vertex-ai).\n- [Access data in Cloud Storage to generate multimodal embeddings](#access-data-in-storage).\n\n### Integrate with Vertex AI and install the extension\n\n1. [Integrate with Vertex AI](/alloydb/docs/ai/configure-vertex-ai).\n2. Ensure that the latest version of `google_ml_integration` is installed.\n 1. To check the installed version, run the following\n command:\n\n ```bash\n SELECT extversion FROM pg_extension WHERE extname = 'google_ml_integration';\n extversion\n ------------\n 1.4.3\n (1 row)\n \n ```\n 2. If the extension isn't installed or if the installed version is\n earlier than 1.4.3, update the extension by running the following commands:\n\n ```bash\n CREATE EXTENSION IF NOT EXISTS google_ml_integration;\n ALTER EXTENSION google_ml_integration UPDATE;\n \n ```\n\n If you experience issues when you run the preceding commands, or if the\n extension isn't updated to version 1.4.3 after you run the preceding\n commands, contact AlloyDB support.\n 3. After you ensure that the version is current, install the preview\n functionality by running the `upgrade_to_preview_version` procedure:\n\n ```bash\n CALL google_ml.upgrade_to_preview_version();\n SELECT extversion FROM pg_extension WHERE extname = 'google_ml_integration';\n extversion\n ------------\n 1.4.4\n (1 row)\n \n ```\n | Note: The expected version is 1.4.4 or later.\n\n### Access data in Cloud Storage to generate multimodal embeddings\n\n- To generate multimodal embeddings, refer to content in Cloud Storage using a `gs://` URI.\n- Access Cloud Storage content through your current project's Vertex AI service agent. By default, the Vertex AI service agent already has permission to access the bucket in the same project. For more information, see [IAM roles and permissions index](/iam/docs/understanding-roles#aiplatform.serviceAgent).\n- To access data in a Cloud Storage bucket in another Google Cloud project,\n run the following gcloud CLI command to grant the [Storage Object Viewer role (`roles/storage.objectViewer`)](/storage/docs/access-control/iam-roles) to the Vertex AI service agent of your\n AlloyDB project.\n\n gcloud projects add-iam-policy-binding \u003cANOTHER_PROJECT_ID\u003e \\\n --member=\"serviceAccount:service-\u003cPROJECT_ID\u003e@gcp-sa-aiplatform.iam.gserviceaccount.com\" \\\n --role=\"roles/storage.objectViewer\"\n\n For more information, see [Set and manage IAM policies on buckets](/storage/docs/access-control/using-iam-permissions).\n\nTo generate multimodal embeddings, select one of the following schemas. \nai schema google_ml schema\n\nWhat's next\n-----------\n\n- [Register a model endpoint with model endpoint management](/alloydb/docs/ai/register-model-endpoint).\n\n- [Query using AI powered SQL operators](/alloydb/docs/ai/evaluate-semantic-queries-ai-operators)."]]