Google Cloud Vertex AI Embeddings

Google Cloud Vertex AI Embeddings

Certified

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.

yaml
type: io.kestra.plugin.gcp.vertexai.Embeddings

Generate an embedding for a single search query

yaml
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

yaml
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

Vertex AI regional endpoint (e.g., us-central1, europe-west1).

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.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

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

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
Defaulttrue

Auto truncate

Whether to automatically truncate input text exceeding the model's token limit. Defaults to true.

The GCP service account to impersonate

Defaulttext-embedding-005

Model ID

Vertex AI embedding model identifier (e.g., text-embedding-005, text-multilingual-embedding-002).

Output dimensionality

Optional reduced dimension size (e.g., 256, 512, 768) supported by modern embedding models.

The GCP project ID

SubTypestring
Default["https://www.googleapis.com/auth/cloud-platform"]

The GCP scopes to be used

The GCP service account

Possible Values
RETRIEVAL_QUERYRETRIEVAL_DOCUMENTSEMANTIC_SIMILARITYCLASSIFICATIONCLUSTERINGQUESTION_ANSWERINGFACT_VERIFICATION

Task 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

Single text string to generate an embedding for. Mutually exclusive with texts.

SubTypestring

Texts

List of text strings to generate embeddings for in a batch (maximum 250 texts per request). Mutually exclusive with text.

Document title

Optional title for the text, recommended when taskType is RETRIEVAL_DOCUMENT.

Count

Total number of embedding vectors generated.

Dimension

Dimensionality size of the returned vectors.

SubTypenumber

Single embedding vector

Convenience vector populated when a single text property is provided.

SubTypearray

Generated embeddings

List of vector embeddings for each input text.

Number of embeddings generated.

Total number of tokens consumed by the embedding model.