flexeval.schema.rubric_schema#
- pydantic model flexeval.schema.rubric_schema.Rubric[source]#
Bases:
BaseModel
Show JSON schema
{ "title": "Rubric", "type": "object", "properties": { "prompt": { "description": "Prompt for the rubric.", "title": "Prompt", "type": "string" }, "choice_scores": { "additionalProperties": { "anyOf": [ { "type": "integer" }, { "type": "number" } ] }, "description": "Choices.", "title": "Choice Scores", "type": "object" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Optional name of the rubric.", "title": "Name" }, "notes": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Optional notes.", "title": "Notes" } }, "required": [ "prompt" ] }
- Fields:
- Validators:
- validator check_non_empty » choice_scores[source]#
- pydantic model flexeval.schema.rubric_schema.RubricsCollection[source]#
Bases:
BaseModel
Collection of rubrics that can be used as
RubricItem
s.Show JSON schema
{ "title": "RubricsCollection", "description": "Collection of rubrics that can be used as :class:`~flexeval.schema.eval_schema.RubricItem`\\s.", "type": "object", "properties": { "rubrics": { "additionalProperties": { "$ref": "#/$defs/Rubric" }, "description": "Mapping of rubric names to Rubrics. The rubric names are used for matching metrics to specific rubrics.", "title": "Rubrics", "type": "object" } }, "$defs": { "Rubric": { "properties": { "prompt": { "description": "Prompt for the rubric.", "title": "Prompt", "type": "string" }, "choice_scores": { "additionalProperties": { "anyOf": [ { "type": "integer" }, { "type": "number" } ] }, "description": "Choices.", "title": "Choice Scores", "type": "object" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Optional name of the rubric.", "title": "Name" }, "notes": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Optional notes.", "title": "Notes" } }, "required": [ "prompt" ], "title": "Rubric", "type": "object" } } }