Skip to main content
Generates a vector embedding for the provided input text using an embedding model and returns it as an 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 DIMENSION 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

Return type

ARRAY(DOUBLE)
  • Returns the model’s generated embedding vector.
  • If INPUT_TEXT is NULL, the function returns NULL.

LLM token budget

Queries executed with AI_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.

Example

Returns (example):