ARRAY(DOUBLE). Provide the model identifier, the plain-text input in INPUT_TEXT, and a LOCATION that holds AWS Bedrock credentials. Optionally specify the embedding DIMENSIONS and whether to return NULL on errors.
For setup guidance and end-to-end examples, see Getting started with AI.
Initially, this function uses Amazon Bedrock as its backend. The
LOCATION must reference a Bedrock LOCATION. For now, the only supported model is Amazon Titan Embeddings v2 for text: the MODEL must be 'amazon.titan-embed-text-v2:0'.Syntax
Parameters
| Parameter | Description | Supported input types |
|---|---|---|
MODEL | The embedding model to invoke. For now, must be 'amazon.titan-embed-text-v2:0'. The value is forwarded to Bedrock without further validation. | TEXT |
INPUT_TEXT | The plain-text content to embed. | TEXT |
DIMENSIONS | Optional. The number of dimensions for the generated embedding. For 'amazon.titan-embed-text-v2:0', must be one of 1024, 512, or 256. Defaults to the model’s default dimension if omitted. | INTEGER |
LOCATION | The name of the LOCATION to use for AWS credentials. Must be a literal constant. See CREATE LOCATION (Amazon Bedrock). | TEXT |
NULL_ON_ERROR | Optional. Whether to return NULL instead of raising an error when a Bedrock invocation error occurs. Default FALSE. Must be a literal constant. | BOOL |
Return type
ARRAY(DOUBLE)
- Returns the model’s generated embedding vector.
- If
INPUT_TEXTisNULL, the function returnsNULL.
LLM token budget
Queries executed withAI_EMBED_TEXT count towards your account’s daily LLM token budget. If your account exceeds its allotted token budget, invocations of AI_EMBED_TEXT will fail until the budget is increased or the daily limit resets. For details on setting and monitoring your token budget, see Set your LLM token budget and Check your LLM token quota usage.
LLM token budget accounting is not available in Firebolt Core.