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
posthttps://{service-endpoint}/v1beta1/{location}:generateInstanceRubrics
Where {service-endpoint} is one of the supported service endpoints.
Path parameters
locationstring
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:
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.
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.
Optional. Specification for how the rubrics should be generated.
Optional. Agent configuration, required for agent-based rubric generation.
metricResourceNamestring
Optional. The resource name of a registered metric. Rubric generation using predefined metric spec or LLMBasedMetricSpec is supported. If this field is set, the configuration provided in this field is used for rubric generation. The predefinedRubricGenerationSpec and rubricGenerationSpec fields will be ignored.
Response body
Response message for EvaluationService.GenerateInstanceRubrics.
If successful, the response body contains data with the following structure:
Output only. A list of generated rubrics.
| JSON representation |
|---|
{
"generatedRubrics": [
{
object ( |