visual-answerability / schemas /intervention_group.schema.json
sungguk's picture
Release visual answerability benchmark v1.0.0
e1ced61 verified
Raw History Blame Contribute Delete
8.83 kB
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://explicit-learning.local/schemas/intervention_group.schema.json",
"title": "Question-preserving visual intervention group",
"type": "object",
"additionalProperties": false,
"required": [
"schema_version",
"group_id",
"base_id",
"source",
"source_revision",
"source_native_id",
"split",
"subject",
"question",
"question_sha256",
"choices",
"choices_sha256",
"full_answer_raw",
"full_answer_canonical",
"answer_type",
"views",
"provenance",
"quality"
],
"properties": {
"schema_version": {"const": 2},
"group_id": {"$ref": "#/$defs/sha256"},
"base_id": {"$ref": "#/$defs/sha256"},
"source": {"type": "string", "minLength": 1},
"source_revision": {"type": "string", "pattern": "^[a-f0-9]{40}$"},
"source_native_id": {"type": "string", "minLength": 1},
"split": {"type": "string", "enum": ["train", "validation", "certified_eval"]},
"subject": {"type": ["string", "null"]},
"question": {"type": "string", "minLength": 1},
"question_sha256": {"$ref": "#/$defs/sha256"},
"choices": {
"type": "array",
"items": {"$ref": "#/$defs/choice"}
},
"choices_sha256": {"$ref": "#/$defs/sha256"},
"full_answer_raw": {"type": ["string", "number", "boolean"]},
"full_answer_canonical": {"type": ["string", "number", "boolean"]},
"answer_type": {
"type": "string",
"enum": ["multiple_choice", "integer", "number", "expression", "short_text", "boolean"]
},
"dependency_depth": {"type": ["integer", "null"], "minimum": 0},
"views": {
"type": "array",
"minItems": 2,
"items": {"$ref": "#/$defs/view"}
},
"provenance": {
"type": "object",
"additionalProperties": false,
"required": [
"resource_manifest_sha256",
"pipeline_code_commit",
"pipeline_config_sha256",
"renderer_version",
"answer_normalizer_version"
],
"properties": {
"resource_manifest_sha256": {"$ref": "#/$defs/sha256"},
"pipeline_code_commit": {"type": "string", "pattern": "^[a-f0-9]{40}$"},
"pipeline_config_sha256": {"$ref": "#/$defs/sha256"},
"renderer_version": {"type": "string", "minLength": 1},
"answer_normalizer_version": {"type": "string", "minLength": 1},
"dependency_proposal_id": {"type": ["string", "null"]},
"license_gate": {"type": ["string", "null"]}
}
},
"quality": {
"type": "object",
"additionalProperties": false,
"required": [
"full_verified",
"question_choices_unchanged",
"decontaminated",
"pixel_audit_passed",
"artifact_free",
"label_source",
"certificate_valid",
"model_agreement_is_gold"
],
"properties": {
"full_verified": {"const": true},
"question_choices_unchanged": {"const": true},
"decontaminated": {"const": true},
"pixel_audit_passed": {"const": true},
"artifact_free": {"const": true},
"label_source": {"const": "executor_certificate"},
"certificate_valid": {"const": true},
"model_agreement_is_gold": {"const": false},
"reference_executor_agreement": {"type": "boolean"}
}
}
},
"allOf": [
{
"if": {
"properties": {"split": {"const": "certified_eval"}},
"required": ["split"]
},
"then": {
"properties": {
"quality": {
"required": ["reference_executor_agreement"],
"properties": {
"reference_executor_agreement": {"const": true}
}
}
}
}
}
],
"$defs": {
"sha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"choice": {
"type": "object",
"additionalProperties": false,
"required": ["key", "text"],
"properties": {
"key": {"type": "string", "minLength": 1},
"text": {"type": "string", "minLength": 1}
}
},
"image": {
"type": "object",
"additionalProperties": false,
"required": ["image_index", "path", "sha256", "width", "height"],
"properties": {
"image_index": {"type": "integer", "minimum": 0},
"path": {"type": "string", "minLength": 1},
"sha256": {"$ref": "#/$defs/sha256"},
"width": {"type": "integer", "minimum": 1},
"height": {"type": "integer", "minimum": 1},
"diff_mask_path": {"type": ["string", "null"]},
"diff_mask_sha256": {
"anyOf": [{"$ref": "#/$defs/sha256"}, {"type": "null"}]
}
}
},
"region": {
"type": "object",
"additionalProperties": false,
"required": ["region_id", "image_index", "bbox_xyxy", "source"],
"properties": {
"region_id": {"type": "string", "minLength": 1},
"image_index": {"type": "integer", "minimum": 0},
"bbox_xyxy": {
"type": "array",
"prefixItems": [
{"type": "number"},
{"type": "number"},
{"type": "number"},
{"type": "number"}
],
"minItems": 4,
"maxItems": 4
},
"source": {
"type": "string",
"enum": [
"source_annotation",
"structured_renderer",
"paddleocr_vl_1_6",
"classic_cv"
]
}
}
},
"automatedAudit": {
"type": "object",
"additionalProperties": false,
"required": [
"proposer_label_id",
"verifier_label_id",
"certificate_id",
"reconciliation"
],
"properties": {
"proposer_label_id": {"type": ["string", "null"]},
"verifier_label_id": {"type": ["string", "null"]},
"certificate_id": {"$ref": "#/$defs/sha256"},
"reconciliation": {
"const": "executor_certificate_confirmed"
}
}
},
"view": {
"type": "object",
"additionalProperties": false,
"required": [
"view_id",
"role",
"state",
"operator",
"images",
"question_sha256",
"choices_sha256",
"target_raw",
"target_canonical",
"regions",
"render_manifest_sha256",
"certificate_id",
"certification_tier",
"automated_audit"
],
"properties": {
"view_id": {"type": "string", "minLength": 1},
"role": {
"type": "string",
"enum": ["POSITIVE", "TARGET_EVIDENCE", "TARGET_REFERENT", "CONTROL", "SUBSTITUTE"]
},
"state": {
"type": "string",
"enum": ["FULL", "A_SAME", "A_CHANGED", "U_MISSING", "U_INVALID"]
},
"operator": {
"type": "string",
"enum": [
"NONE",
"REDACT_SOLID_V1",
"REDACT_BLUR_V1",
"CLEAN_DELETE_V1",
"SUBSTITUTE_V1",
"CONTROL_MATCHED_V1"
]
},
"images": {
"type": "array",
"minItems": 1,
"items": {"$ref": "#/$defs/image"}
},
"question_sha256": {"$ref": "#/$defs/sha256"},
"choices_sha256": {"$ref": "#/$defs/sha256"},
"target_raw": {"type": ["string", "number", "boolean"]},
"target_canonical": {"type": ["string", "number", "boolean"]},
"regions": {
"type": "array",
"items": {"$ref": "#/$defs/region"}
},
"render_manifest_sha256": {"$ref": "#/$defs/sha256"},
"certificate_id": {"$ref": "#/$defs/sha256"},
"certification_tier": {
"type": "string",
"enum": ["C1_SOURCE_NATIVE", "C2_DUAL_COMPILED"]
},
"automated_audit": {"$ref": "#/$defs/automatedAudit"},
"executor_name": {"type": ["string", "null"]},
"executor_result_sha256": {
"anyOf": [{"$ref": "#/$defs/sha256"}, {"type": "null"}]
},
"held_out_renderer": {"type": "boolean"}
},
"allOf": [
{
"if": {
"properties": {"state": {"const": "FULL"}},
"required": ["state"]
},
"then": {
"properties": {
"role": {"const": "POSITIVE"},
"operator": {"const": "NONE"}
}
}
},
{
"if": {
"properties": {
"state": {"enum": ["U_MISSING", "U_INVALID"]}
},
"required": ["state"]
},
"then": {
"properties": {
"target_raw": {"const": "<UNANSWERABLE>"},
"target_canonical": {"const": "<UNANSWERABLE>"}
}
}
}
]
}
}
}