Overview
This node integrates with Google Vertex AI to generate text embeddings using specified models. It supports setting the output dimensionality of embeddings, which is useful for customizing the embedding size for downstream tasks. The node is designed to work well in scenarios where you want to convert text data into vector representations for use in AI workflows such as semantic search, document retrieval, classification, clustering, or similarity comparisons.
Practical examples include:
- Generating embeddings for documents to enable semantic search in a knowledge base.
- Creating query embeddings to find relevant documents based on user input.
- Producing vector representations for clustering similar texts or classifying content.
Properties
Name | Meaning |
---|---|
Project ID | The Google Cloud project ID where the Vertex AI model is deployed. This is required to authenticate and route requests correctly. |
Model Name | The name of the embedding model to use, e.g., text-embedding-004 or text-multilingual-embedding-002 . Different models may have different capabilities and output formats. |
Output Dimensions | Number of dimensions for the output embeddings. Set to 0 to use the model's default dimensionality. Only supported by certain models like text-embedding-004 . |
Options | Additional options including: - Region: The geographic region where the model is deployed (default: us-central1 ). - Task Type: The type of task for which embeddings are generated. Options: • Retrieval Document • Retrieval Query • Semantic Similarity • Classification • Clustering |
Output
The node outputs an array of embeddings under the json
field. Each embedding is a numeric vector representing the semantic content of the input text(s). The structure is:
[
[number, number, ..., number], // Embedding vector for first input
[number, number, ..., number], // Embedding vector for second input
...
]
If multiple inputs are provided, the output contains one embedding vector per input. The length of each vector corresponds to the model's output dimensionality or the specified Output Dimensions
.
No binary data output is produced by this node.
Dependencies
- Requires a valid Google Cloud API key credential with permissions to access Vertex AI and Cloud Resource Manager APIs.
- The node uses Google Auth Library to obtain OAuth tokens for authentication.
- Network access to Google Cloud endpoints (
aiplatform.googleapis.com
andcloudresourcemanager.googleapis.com
) is necessary. - The user must configure the Google Cloud project and deploy the desired embedding model in the specified region.
Troubleshooting
- Authentication errors: Ensure the provided API credentials have correct permissions and are properly configured. Check that the private key format is correct (newline characters replaced properly).
- API request failures: Errors from Google Vertex AI API will include HTTP status and message. Common causes include invalid model names, unsupported output dimensions, or incorrect region settings.
- Empty or missing embeddings: Verify that the input text is non-empty and that the model supports the requested task type.
- Project listing issues: If the node cannot fetch projects, check network connectivity and that the API key has permission to list projects.
- Batch size limits: The node sends requests in batches of up to 5 inputs for most models except
gemini-embedding-001
, which processes inputs individually. Large inputs might cause rate limiting or timeouts.