File size: 8,524 Bytes
e1ced61
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://explicit-learning.local/schemas/dependency_proposal.schema.json",
  "title": "Dependency proposal for one verified FULL problem",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema_version",
    "proposal_id",
    "base_id",
    "question_sha256",
    "choices_sha256",
    "model",
    "referents",
    "evidence_nodes",
    "dependency_edges",
    "control_candidates",
    "intervention_candidates"
  ],
  "properties": {
    "schema_version": {"const": 1},
    "proposal_id": {"type": "string", "minLength": 16},
    "base_id": {"$ref": "#/$defs/sha256"},
    "question_sha256": {"$ref": "#/$defs/sha256"},
    "choices_sha256": {"$ref": "#/$defs/sha256"},
    "model": {
      "type": "object",
      "additionalProperties": false,
      "required": ["resource_name", "repo_id", "revision", "request_sha256"],
      "properties": {
        "resource_name": {"const": "qwen35_9b"},
        "repo_id": {"const": "Qwen/Qwen3.5-9B"},
        "revision": {"$ref": "#/$defs/gitRevision"},
        "request_sha256": {"$ref": "#/$defs/sha256"},
        "response_sha256": {"$ref": "#/$defs/sha256"}
      }
    },
    "problem_family": {
      "type": "string",
      "enum": [
        "geometry",
        "algebra",
        "chart",
        "table",
        "document",
        "physics",
        "engineering",
        "chemistry",
        "biology",
        "medicine",
        "map",
        "music",
        "professional_other",
        "other"
      ]
    },
    "answer_operation": {
      "type": "string",
      "enum": [
        "select",
        "read_attribute",
        "read_text",
        "relate",
        "order",
        "count",
        "exist",
        "compare",
        "arithmetic",
        "argmax",
        "multi_step",
        "other"
      ]
    },
    "referents": {
      "type": "array",
      "items": {"$ref": "#/$defs/referent"},
      "uniqueItems": true
    },
    "evidence_nodes": {
      "type": "array",
      "minItems": 1,
      "items": {"$ref": "#/$defs/evidenceNode"}
    },
    "dependency_edges": {
      "type": "array",
      "items": {"$ref": "#/$defs/dependencyEdge"}
    },
    "control_candidates": {
      "type": "array",
      "items": {"$ref": "#/$defs/controlCandidate"}
    },
    "intervention_candidates": {
      "type": "array",
      "items": {"$ref": "#/$defs/interventionCandidate"}
    },
    "dependency_depth": {
      "type": ["integer", "null"],
      "minimum": 0
    },
    "uncertainties": {
      "type": "array",
      "items": {"type": "string", "minLength": 1}
    }
  },
  "$defs": {
    "sha256": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "gitRevision": {
      "type": "string",
      "pattern": "^[a-f0-9]{40}$"
    },
    "regionHint": {
      "type": "object",
      "additionalProperties": false,
      "required": ["image_index", "kind"],
      "properties": {
        "image_index": {"type": "integer", "minimum": 0},
        "kind": {
          "type": "string",
          "enum": ["source_box", "text", "formula", "point", "box", "object", "line", "panel"]
        },
        "text": {"type": ["string", "null"]},
        "bbox_xyxy": {
          "type": ["array", "null"],
          "prefixItems": [
            {"type": "number"},
            {"type": "number"},
            {"type": "number"},
            {"type": "number"}
          ],
          "minItems": 4,
          "maxItems": 4
        },
        "point_xy": {
          "type": ["array", "null"],
          "prefixItems": [{"type": "number"}, {"type": "number"}],
          "minItems": 2,
          "maxItems": 2
        },
        "description": {"type": "string", "minLength": 1}
      }
    },
    "referent": {
      "type": "object",
      "additionalProperties": false,
      "required": ["referent_id", "description", "question_span", "region_hints"],
      "properties": {
        "referent_id": {"type": "string", "pattern": "^ref-[A-Za-z0-9_-]+$"},
        "description": {"type": "string", "minLength": 1},
        "question_span": {"type": "string", "minLength": 1},
        "region_hints": {
          "type": "array",
          "items": {"$ref": "#/$defs/regionHint"}
        }
      }
    },
    "evidenceNode": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "node_id",
        "description",
        "role",
        "necessity",
        "region_hints",
        "redundancy_group"
      ],
      "properties": {
        "node_id": {"type": "string", "pattern": "^ev-[A-Za-z0-9_-]+$"},
        "description": {"type": "string", "minLength": 1},
        "role": {
          "type": "string",
          "enum": [
            "referent",
            "operand",
            "attribute",
            "relation",
            "label",
            "structure",
            "constraint",
            "derived_intermediate",
            "answer"
          ]
        },
        "necessity": {
          "type": "string",
          "enum": ["necessary", "redundant", "supporting", "unknown"]
        },
        "visible_value": {"type": ["string", "number", "boolean", "null"]},
        "region_hints": {
          "type": "array",
          "items": {"$ref": "#/$defs/regionHint"}
        },
        "redundancy_group": {"type": ["string", "null"]},
        "referent_ids": {
          "type": "array",
          "items": {"type": "string", "pattern": "^ref-[A-Za-z0-9_-]+$"},
          "uniqueItems": true
        }
      }
    },
    "dependencyEdge": {
      "type": "object",
      "additionalProperties": false,
      "required": ["from_node", "to_node", "relation"],
      "properties": {
        "from_node": {"type": "string", "pattern": "^ev-[A-Za-z0-9_-]+$"},
        "to_node": {"type": "string", "pattern": "^ev-[A-Za-z0-9_-]+$"},
        "relation": {
          "type": "string",
          "enum": ["required_for", "combined_with", "disambiguates", "derives", "duplicates"]
        }
      }
    },
    "executor": {
      "type": "object",
      "additionalProperties": false,
      "required": ["kind", "specification", "deterministic"],
      "properties": {
        "kind": {
          "type": "string",
          "enum": ["sympy", "table_program", "chart_program", "circuit", "source_renderer", "none"]
        },
        "specification": {"type": ["string", "object", "null"]},
        "deterministic": {"type": "boolean"}
      }
    },
    "controlCandidate": {
      "type": "object",
      "additionalProperties": false,
      "required": ["candidate_id", "description", "region_hints", "why_non_required"],
      "properties": {
        "candidate_id": {"type": "string", "pattern": "^control-[A-Za-z0-9_-]+$"},
        "description": {"type": "string", "minLength": 1},
        "region_hints": {
          "type": "array",
          "minItems": 1,
          "items": {"$ref": "#/$defs/regionHint"}
        },
        "why_non_required": {"type": "string", "minLength": 1},
        "matched_to_evidence_node": {
          "type": ["string", "null"],
          "pattern": "^ev-[A-Za-z0-9_-]+$"
        }
      }
    },
    "interventionCandidate": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "candidate_id",
        "operator_family",
        "target_evidence_nodes",
        "target_referents",
        "region_hints",
        "rationale",
        "executor"
      ],
      "properties": {
        "candidate_id": {"type": "string", "pattern": "^int-[A-Za-z0-9_-]+$"},
        "operator_family": {
          "type": "string",
          "enum": ["REDACT", "CLEAN_DELETE", "SUBSTITUTE", "CONTROL"]
        },
        "target_evidence_nodes": {
          "type": "array",
          "items": {"type": "string", "pattern": "^ev-[A-Za-z0-9_-]+$"},
          "uniqueItems": true
        },
        "target_referents": {
          "type": "array",
          "items": {"type": "string", "pattern": "^ref-[A-Za-z0-9_-]+$"},
          "uniqueItems": true
        },
        "region_hints": {
          "type": "array",
          "minItems": 1,
          "items": {"$ref": "#/$defs/regionHint"}
        },
        "substitute_value": {"type": ["string", "number", "boolean", "null"]},
        "rationale": {
          "type": "string",
          "description": "Proposal rationale only. This is never a gold state label.",
          "minLength": 1
        },
        "executor": {"$ref": "#/$defs/executor"}
      }
    }
  }
}