Skip to main content
Invokes a large language model (LLM) endpoint and returns the generated text as a TEXT value. Provide the endpoint identifier, a plain‑text prompt in request, and a LOCATION that holds AWS Bedrock credentials. 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 Meta Llama 3.3 70B Instruct: the endpoint must contain the substring 'meta.llama3-3-70b-instruct-v1:0'.

Syntax

Parameters

Return Type

TEXT
  • Returns the model’s generated text.
  • If <request> is NULL, the function returns NULL.

LLM Token Budget

Queries executed with AI_QUERY count towards your account’s daily LLM token budget. If your account exceeds its allotted token budget, invocations of AI_QUERY 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):