bigframes.ml.llm.GeminiTextGenerator.score#

GeminiTextGenerator.score(X: DataFrame | Series | DataFrame | Series, y: DataFrame | Series | DataFrame | Series, task_type: Literal['text_generation', 'classification', 'summarization', 'question_answering'] = 'text_generation') DataFrame[source]#
Calculate evaluation metrics of the model. Only support

“gemini-1.5-pro-002”, “gemini-1.5-flash-002”, “gemini-2.0-flash-lite-001”, and “gemini-2.0-flash-001”.

Note

This product or feature is subject to the “Pre-GA Offerings Terms” in the General Service Terms section of the Service Specific Terms(https://cloud.google.com/terms/service-terms#1). Pre-GA products and features are available “as is” and might have limited support. For more information, see the launch stage descriptions (https://cloud.google.com/products#product-launch-stages).

Note

Output matches that of the BigQuery ML.EVALUATE function. See: https://cloud.google.com/bigquery/docs/reference/standard-sql/bigqueryml-syntax-evaluate#remote-model-llm for the outputs relevant to this model type.

Parameters:
Returns:

The DataFrame as evaluation result.

Return type:

bigframes.dataframe.DataFrame