
Google Cloud Vertex AI Embeddings
CertifiedGenerate text embeddings with Google Cloud Vertex AI
Google Cloud Vertex AI Embeddings
Generate text embeddings with Google Cloud Vertex AI
Generates vector embeddings for a single text or batch of texts using Vertex AI foundation models (e.g., text-embedding-005, text-multilingual-embedding-002). Supports downstream task types, document titles, and customizable output dimensionality for vector search and RAG workflows.
type: io.kestra.plugin.gcp.vertexai.EmbeddingsExamples
Generate an embedding for a single search query
id: gcp_vertexai_query_embedding
namespace: company.ai
tasks:
- id: embed_query
type: io.kestra.plugin.gcp.vertexai.Embeddings
projectId: my-gcp-project
region: us-central1
modelId: text-embedding-005
text: "How to configure GCS lifecycle policies?"
taskType: RETRIEVAL_QUERY
outputDimensionality: 768
Generate embeddings for batch document chunks
id: gcp_vertexai_batch_embeddings
namespace: company.ai
tasks:
- id: embed_chunks
type: io.kestra.plugin.gcp.vertexai.Embeddings
projectId: my-gcp-project
region: us-central1
modelId: text-embedding-005
taskType: RETRIEVAL_DOCUMENT
title: "GCS Architecture"
texts:
- "Cloud Storage is an object storage service."
- "Lifecycle rules automate transitions between storage classes."
Properties
region *string
Region
Vertex AI regional endpoint (e.g., us-central1, europe-west1).
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150autoTruncate booleanstring
trueAuto truncate
Whether to automatically truncate input text exceeding the model's token limit. Defaults to true.
impersonatedServiceAccount string
The GCP service account to impersonate
modelId string
text-embedding-005Model ID
Vertex AI embedding model identifier (e.g., text-embedding-005, text-multilingual-embedding-002).
outputDimensionality integerstring
Output dimensionality
Optional reduced dimension size (e.g., 256, 512, 768) supported by modern embedding models.
projectId string
The GCP project ID
scopes array
["https://www.googleapis.com/auth/cloud-platform"]The GCP scopes to be used
serviceAccount string
The GCP service account
taskType string
RETRIEVAL_QUERYRETRIEVAL_DOCUMENTSEMANTIC_SIMILARITYCLASSIFICATIONCLUSTERINGQUESTION_ANSWERINGFACT_VERIFICATIONTask type
Intended downstream use case for the embedding vector:
RETRIEVAL_QUERY: Specifies the given text is a query in a search/retrieval setting.RETRIEVAL_DOCUMENT: Specifies the given text is a document in a search/retrieval setting.SEMANTIC_SIMILARITY: Specifies the given text will be used for STS (semantic textual similarity).CLASSIFICATION: Specifies that the embeddings will be used for classification.CLUSTERING: Specifies that the embeddings will be used for clustering.QUESTION_ANSWERING: Specifies that the embeddings will be used for question answering.FACT_VERIFICATION: Specifies that the embeddings will be used for fact verification.
text string
Text
Single text string to generate an embedding for. Mutually exclusive with texts.
texts array
Texts
List of text strings to generate embeddings for in a batch (maximum 250 texts per request). Mutually exclusive with text.
title string
Document title
Optional title for the text, recommended when taskType is RETRIEVAL_DOCUMENT.
Outputs
count integer
Count
Total number of embedding vectors generated.
dimension integer
Dimension
Dimensionality size of the returned vectors.
embedding array
Single embedding vector
Convenience vector populated when a single text property is provided.
embeddings array
Generated embeddings
List of vector embeddings for each input text.
Metrics
embeddings.count counter
Number of embeddings generated.
token.count counter
Total number of tokens consumed by the embedding model.