End-to-end user journeys for generative AI models

This document describes the user journeys for BigQuery ML remote models, including the statements and functions that you can use to work with remote models. BigQuery ML offers the following types of remote models:

Remote model user journeys

The following table describes the statements and functions you can use to create, evaluate, and generate data from remote 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 ML.GENERATE_TEXT N/A
Remote model over an open text generation model3 CREATE MODEL ML.EVALUATE ML.GENERATE_TEXT Generate text with Gemma and public data
Remote model over a Google embedding generation model CREATE MODEL N/A ML.GENERATE_EMBEDDING
Remote model over an open embedding generation model3 CREATE MODEL N/A ML.GENERATE_EMBEDDING Generate text embeddings by using an open model and the ML.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 ML.TRANSLATE 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 Vertex AI Remote model over a custom model deployed to Vertex AI 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 Vertex AI Model Garden ID. BigQuery manages the Vertex AI resources of open models deployed in this way, and lets you interact with those Vertex AI 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. This feature is in Preview.