End-to-end user journeys for generative AI models

You can use remote or hosted generative AI models in BigQuery ML to integrate advanced AI capabilities directly into BigQuery. Exploring these end-to-end user journeys lets you discover the specific SQL statements and functions required to create, evaluate, and generate data from Gemini models, Cloud AI services, and custom open models. BigQuery ML offers the following types of remote models:

Remote or hosted model user journeys

The following table describes the statements and functions you can use to create, evaluate, and generate data from remote or hosted models:

Model category Model type Model creation Evaluation Inference Tutorials
Generative AI remote models Remote model over a Gemini text generation model1 CREATE MODEL ML.EVALUATE
Remote model over a partner text generation model CREATE MODEL ML.EVALUATE AI.GENERATE_TEXT N/A
Remote model over an open text generation model3 CREATE MODEL ML.EVALUATE AI.GENERATE_TEXT Generate text with Gemma and public data
Remote model over a Google embedding generation model CREATE MODEL N/A AI.GENERATE_EMBEDDING
Remote model over an open embedding generation model3 CREATE MODEL N/A AI.GENERATE_EMBEDDING Generate text embeddings by using an open model and the AI.GENERATE_EMBEDDING function
Cloud AI remote models Remote model over the Cloud Vision API CREATE MODEL N/A ML.ANNOTATE_IMAGE Annotate images
Remote model over the Cloud Translation API CREATE MODEL N/A Translate text
Remote model over the Cloud Natural Language API CREATE MODEL N/A ML.UNDERSTAND_TEXT Understand text
Remote model over the Document AI API CREATE MODEL N/A ML.PROCESS_DOCUMENT
Remote model over the Speech-to-Text API CREATE MODEL N/A ML.TRANSCRIBE Transcribe audio files
Remote model over a custom model deployed to Gemini Enterprise Agent Platform Remote model over a custom model deployed to Gemini Enterprise Agent Platform CREATE MODEL ML.EVALUATE ML.PREDICT Make predictions with a custom model

1 Some Gemini models support supervised tuning.

2 This function calls a hosted Gemini model, and doesn't require you to create a model separately using the CREATE MODEL statement.

3 You can automatically deploy an open model when you create the BigQuery ML remote model by specifying the model's Hugging Face or Agent Platform Model Garden ID. BigQuery manages the Agent Platform resources of open models deployed in this way, and lets you interact with those Agent Platform resources by using the BigQuery ML ALTER MODEL and DROP MODEL statements. It also lets you configure automatic undeployment of the model. For more information, see Automatically deployed models.

4 This function calls the Cloud Translation API directly, and doesn't require you to create a model separately by using the CREATE MODEL statement.