Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Auf dieser Seite wird beschrieben, wie Sie multimodale Einbettungen mit dem unterstützten multimodalen Vertex AI-Modell multimodalembedding@001 generieren.
Sie können die multimodalen Vertex AI-Einbettungsmodelle verwenden, auf die in Unterstützte Modelle verwiesen wird.
Auf dieser Seite wird davon ausgegangen, dass Sie mit AlloyDB for PostgreSQL und generativen KI-Konzepten vertraut sind. Weitere Informationen zu Einbettungen finden Sie unter Was sind Einbettungen?.
Hinweise
Bevor Sie multimodale Einbettungen verwenden, müssen Sie Folgendes tun:
Wenn die Erweiterung nicht installiert ist oder die installierte Version älter als 1.4.3 ist, aktualisieren Sie die Erweiterung mit den folgenden Befehlen:
Wenn beim Ausführen der vorherigen Befehle Probleme auftreten oder die Erweiterung nach dem Ausführen der vorherigen Befehle nicht auf Version 1.4.3 aktualisiert wird, wenden Sie sich an den AlloyDB-Support.
Nachdem Sie sichergestellt haben, dass die Version aktuell ist, installieren Sie die Vorschaufunktion, indem Sie die Prozedur upgrade_to_preview_version ausführen:
Auf Daten in Cloud Storage zugreifen, um multimodale Einbettungen zu generieren
Wenn Sie multimodale Einbettungen generieren möchten, verweisen Sie mit einem gs://-URI auf Inhalte in Cloud Storage.
Über den Vertex AI-Dienst-Agent Ihres aktuellen Projekts auf Cloud Storage-Inhalte zugreifen. Standardmäßig hat der Vertex AI-Dienst-Agent bereits die Berechtigung, auf den Bucket im selben Projekt zuzugreifen.
Weitere Informationen finden Sie im Index für IAM-Rollen und -Berechtigungen.
Wenn Sie auf Daten in einem Cloud Storage-Bucket in einem anderen Google Cloud Projekt zugreifen möchten, führen Sie den folgenden gcloud CLI-Befehl aus, um dem Vertex AI-Dienst-Agent Ihres AlloyDB-Projekts die Rolle „Storage-Objekt-Betrachter“ (roles/storage.objectViewer) zuzuweisen.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 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)."]]