Production use of this feature is only available on specific Maia plans. Contact our Sales team for more information.
Use case
This component lets you rate and rank rows of data in your transformation pipeline. For example, you can use it to:- Rate customer reviews or survey comments on a scale that you define—for example, by how positive they are.
- Rank rows by score and keep only the highest-scoring rows for the rest of your pipeline.
- Prioritize support tickets or emails—for example, by urgency.
The component calls the model once for each input row, except rows whose selected inputs are all NULL, so running it on large tables can incur significant inference costs. Usage is also subject to Google BigQuery’s generative AI quotas. To view these charges, read Track costs.
Prerequisites
The Google Cloud service account that calls the Gemini model must have the Agent Platform User role (roles/aiplatform.user). Which service account this is depends on the Agent platform connection property:
- Agent platform connection left blank: Google BigQuery calls the model as the Google Cloud service account that your Maia environment uses to access Google BigQuery. This is the service account in the cloud provider credentials associated with the environment or, for a Hybrid SaaS environment with no associated credentials, the Maia runner‘s own service account.
- Agent platform connection set: Google BigQuery calls the model as the service account of the Google BigQuery connection. To create a connection and grant its service account the required role, read Run generative AI queries with a Google BigQuery Connection.
Properties
string
required
A human-readable name for the component.
drop-down
required
Select the Gemini model to use. The following options are currently available:
gemini-3.5-flashgemini-3.1-flash-lite[Custom]: Use a Gemini model that isn’t listed here, which you name in Custom model.
gemini-3.5-flash and gemini-3.1-flash-lite only from multi-regional endpoints. Read the AI.SCORE documentation to learn which endpoint Google BigQuery uses for the location your query runs in.string
required
The name of the Gemini model to use—for example,
gemini-3.7-flash. Read the AI.SCORE documentation for the Gemini models that Google BigQuery supports.This property is only available when Model is set to [Custom].text editor
required
The criteria that the model rates each row against—for example,
Rate how positive this review is, from 1 to 10. The score has no fixed range, so state the range you want in your criteria.column editor
required
Select the source columns whose values are sent to the model with the scoring criteria. Select at least one column.A NULL input value is sent as empty text, except in
- Column Name: A column from the input table.
- Descriptive Name (Optional): An alternate descriptive name to better contextualize the column. Recommended if your column names are low-context.
#<name> heading followed by its value, with a blank line between inputs. <name> is the descriptive name if you’ve set one, or the column name otherwise. For example:STRUCT, ARRAY, and JSON columns, where it’s sent as null. Input values that aren’t text are converted to text before they’re sent: STRUCT, ARRAY, and JSON values are converted to JSON text, and other data types are cast to STRING. GEOGRAPHY columns aren’t supported.Toggle Text mode on at the bottom of the dialog to open a multi-line editor that lets you add items in a single block. For more information, read Text mode.To use grid variables, toggle Use Grid Variable on. For more information, read Grid variables.string
The Google BigQuery connection to use to call the model, in the format
<project_id>.<location>.<connection_id>—for example, myproject.us.myconnection. Leave this blank to call the model as the Google Cloud service account that your environment uses to access Google BigQuery.boolean
required
- Yes: Outputs both your source input columns and the new score column. This also includes input columns that aren’t selected in Inputs. This is the default setting.
- No: Only outputs the new score column.
string
required
The name of the column that holds the score for each row. The default is
score.When Include input columns is set to Yes, the name must be different from the names of the input columns, ignoring case.Explanation of output
The output contains the input columns (if Include input columns is set to Yes), followed by the score column, named by Result column name. The score column contains aFLOAT64 value.
If every selected input is NULL for a row, that row’s score is NULL.
A row whose model call fails doesn’t stop the run. Its score is NULL, and the output doesn’t show why the call failed, so a failed row looks the same as a row whose selected inputs are all NULL. The run fails only if the model call fails for every row.