187 lines
3.7 KiB
JSON
187 lines
3.7 KiB
JSON
|
|
{
|
||
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
|
|
"$id": "whetstone-rsa/gate-definition-v0",
|
||
|
|
"title": "GateDefinition",
|
||
|
|
"type": "object",
|
||
|
|
"additionalProperties": false,
|
||
|
|
"required": [
|
||
|
|
"gate_id",
|
||
|
|
"task_family",
|
||
|
|
"labels",
|
||
|
|
"slots",
|
||
|
|
"constraints",
|
||
|
|
"quality_target",
|
||
|
|
"escalation_policy"
|
||
|
|
],
|
||
|
|
"properties": {
|
||
|
|
"gate_id": {
|
||
|
|
"type": "string",
|
||
|
|
"minLength": 1
|
||
|
|
},
|
||
|
|
"task_family": {
|
||
|
|
"type": "string",
|
||
|
|
"minLength": 1
|
||
|
|
},
|
||
|
|
"description": {
|
||
|
|
"type": "string"
|
||
|
|
},
|
||
|
|
"labels": {
|
||
|
|
"type": "array",
|
||
|
|
"minItems": 1,
|
||
|
|
"items": {
|
||
|
|
"type": "string",
|
||
|
|
"minLength": 1
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"slots": {
|
||
|
|
"type": "array",
|
||
|
|
"items": {
|
||
|
|
"$ref": "#/$defs/slot"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"constraints": {
|
||
|
|
"type": "array",
|
||
|
|
"items": {
|
||
|
|
"$ref": "#/$defs/constraint"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"quality_target": {
|
||
|
|
"$ref": "#/$defs/qualityTarget"
|
||
|
|
},
|
||
|
|
"escalation_policy": {
|
||
|
|
"$ref": "#/$defs/escalationPolicy"
|
||
|
|
},
|
||
|
|
"metadata": {
|
||
|
|
"$ref": "#/$defs/metadata"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"$defs": {
|
||
|
|
"slot": {
|
||
|
|
"type": "object",
|
||
|
|
"additionalProperties": false,
|
||
|
|
"required": [
|
||
|
|
"name",
|
||
|
|
"type",
|
||
|
|
"required"
|
||
|
|
],
|
||
|
|
"properties": {
|
||
|
|
"name": {
|
||
|
|
"type": "string",
|
||
|
|
"minLength": 1
|
||
|
|
},
|
||
|
|
"type": {
|
||
|
|
"type": "string",
|
||
|
|
"enum": [
|
||
|
|
"enum",
|
||
|
|
"string",
|
||
|
|
"integer",
|
||
|
|
"boolean"
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"required": {
|
||
|
|
"type": "boolean"
|
||
|
|
},
|
||
|
|
"labels": {
|
||
|
|
"type": "array",
|
||
|
|
"items": {
|
||
|
|
"type": "string",
|
||
|
|
"minLength": 1
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"constraint": {
|
||
|
|
"type": "object",
|
||
|
|
"additionalProperties": false,
|
||
|
|
"required": [
|
||
|
|
"kind",
|
||
|
|
"description"
|
||
|
|
],
|
||
|
|
"properties": {
|
||
|
|
"kind": {
|
||
|
|
"type": "string",
|
||
|
|
"enum": [
|
||
|
|
"required_slot",
|
||
|
|
"label_slot_compatibility",
|
||
|
|
"custom"
|
||
|
|
]
|
||
|
|
},
|
||
|
|
"description": {
|
||
|
|
"type": "string",
|
||
|
|
"minLength": 1
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"qualityTarget": {
|
||
|
|
"type": "object",
|
||
|
|
"additionalProperties": false,
|
||
|
|
"required": [
|
||
|
|
"min_accuracy",
|
||
|
|
"max_latency_ms"
|
||
|
|
],
|
||
|
|
"properties": {
|
||
|
|
"min_accuracy": {
|
||
|
|
"type": "number",
|
||
|
|
"minimum": 0,
|
||
|
|
"maximum": 1
|
||
|
|
},
|
||
|
|
"max_latency_ms": {
|
||
|
|
"type": "number",
|
||
|
|
"minimum": 0
|
||
|
|
},
|
||
|
|
"max_ece": {
|
||
|
|
"type": "number",
|
||
|
|
"minimum": 0,
|
||
|
|
"maximum": 1
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"escalationPolicy": {
|
||
|
|
"type": "object",
|
||
|
|
"additionalProperties": false,
|
||
|
|
"required": [
|
||
|
|
"allow_abstain",
|
||
|
|
"targets"
|
||
|
|
],
|
||
|
|
"properties": {
|
||
|
|
"allow_abstain": {
|
||
|
|
"type": "boolean"
|
||
|
|
},
|
||
|
|
"targets": {
|
||
|
|
"type": "array",
|
||
|
|
"minItems": 1,
|
||
|
|
"items": {
|
||
|
|
"type": "string",
|
||
|
|
"enum": [
|
||
|
|
"retry_with_context",
|
||
|
|
"larger_specialist",
|
||
|
|
"slm",
|
||
|
|
"llm",
|
||
|
|
"human"
|
||
|
|
]
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"metadata": {
|
||
|
|
"type": "object",
|
||
|
|
"additionalProperties": false,
|
||
|
|
"properties": {
|
||
|
|
"output_cardinality": {
|
||
|
|
"type": "integer",
|
||
|
|
"minimum": 1
|
||
|
|
},
|
||
|
|
"requires_world_knowledge": {
|
||
|
|
"type": "boolean"
|
||
|
|
},
|
||
|
|
"requires_stateful_context": {
|
||
|
|
"type": "boolean"
|
||
|
|
},
|
||
|
|
"deterministic_fallback_available": {
|
||
|
|
"type": "boolean"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|