Method: locations.generateInstanceRubrics

Full name: projects.locations.generateInstanceRubrics

Generates rubrics for a given prompt. A rubric represents a single testable criterion for evaluation. One input prompt could have multiple rubrics This RPC allows users to get suggested rubrics based on provided prompt, which can then be reviewed and used for subsequent evaluations.

Endpoint

post https://aiplatform.googleapis.com/v1/{location}:generateInstanceRubrics

Path parameters

location string

Required. The resource name of the Location to generate rubrics from. Format: projects/{project}/locations/{location}

Request body

The request body contains data with the following structure:

Fields
contents[] object (Content)

Required. The prompt to generate rubrics from. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request.

predefinedRubricGenerationSpec object (PredefinedMetricSpec)

Optional. Specification for using the rubric generation configs of a pre-defined metric, e.g. "generic_quality_v1" and "instruction_following_v1". Some of the configs may be only used in rubric generation and not supporting evaluation, e.g. "fully_customized_generic_quality_v1". If this field is set, the rubricGenerationSpec field will be ignored.

rubricGenerationSpec object (RubricGenerationSpec)

Optional. Specification for how the rubrics should be generated.

Response body

Response message for EvaluationService.GenerateInstanceRubrics.

If successful, the response body contains data with the following structure:

Fields
generatedRubrics[] object (Rubric)

Output only. A list of generated rubrics.

JSON representation
{
  "generatedRubrics": [
    {
      object (Rubric)
    }
  ]
}