Giuliocc's picture
Publish source-aware model SDK, forty-deliverable evidence and annotated-review tooling
1f5647a verified
Raw History Blame Contribute Delete
3.75 kB
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://tacitus.me/doxa/schemas/contextual-discourse-response-v0.2.0.json",
"title": "DOXA contextual discourse source-task response",
"type": "object",
"required": ["method", "model_id", "model_revision", "applied_rubric", "publication_status", "source_payloads_sent", "results"],
"properties": {
"method": {"const": "doxa-contextual-discourse-v0.2.0"},
"model_id": {"type": "string", "minLength": 1},
"model_revision": {"type": "string", "minLength": 1},
"applied_rubric": {"type": ["string", "null"]},
"publication_status": {"enum": ["qualified_release", "local_candidate_withheld"]},
"source_payloads_sent": {"const": false},
"reporter_endorsement": {"const": "unresolved"},
"speaker_stance_model": {"const": "not_qualified"},
"reference_span_prediction": {"const": "not_supported"},
"source_anchor": {
"oneOf": [
{"type": "null"},
{"type": "object", "required": ["document_id", "start", "end", "offset_unit", "sha256"], "properties": {
"document_id": {"type": "string", "minLength": 1},
"start": {"type": "integer", "minimum": 0},
"end": {"type": "integer", "minimum": 1},
"offset_unit": {"const": "unicode_codepoint"},
"sha256": {"type": "string", "pattern": "^[a-f0-9]{64}$"}
}}
]
},
"results": {"type": "array", "items": {"$ref": "#/$defs/taskResult"}},
"token_coverage": {"type": "object", "required": ["maximum_tokens", "target_tokens", "target_tokens_retained", "context_tokens_available", "context_tokens_retained", "actual_tokens"], "properties": {
"maximum_tokens": {"const": 256},
"target_tokens": {"type": "integer", "minimum": 1},
"target_tokens_retained": {"type": "integer", "minimum": 1},
"context_tokens_available": {"type": "integer", "minimum": 0},
"context_tokens_retained": {"type": "integer", "minimum": 0},
"actual_tokens": {"type": "integer", "minimum": 3, "maximum": 256}
}}
},
"$defs": {
"taskResult": {
"type": "object",
"required": ["task", "applied_rubric", "prediction_status", "suggested_decision", "model_score", "review_priority"],
"properties": {
"task": {"type": "string", "minLength": 1},
"applied_rubric": {"type": ["string", "null"]},
"prediction_status": {"enum": ["ok", "abstained", "unsupported_criterion", "missing_rubric", "out_of_evaluated_domain", "insufficient_context", "invalid_input", "no_qualified_model"]},
"suggested_decision": {"enum": ["present", "absent", null]},
"model_score": {"type": ["number", "null"], "minimum": 0, "maximum": 1},
"decision_threshold": {"type": ["number", "null"], "exclusiveMinimum": 0, "exclusiveMaximum": 1},
"abstention_margin": {"type": ["number", "null"], "minimum": 0, "maximum": 0.25},
"calibration": {"type": ["string", "null"]},
"reason": {"type": ["string", "null"]},
"review_priority": {"const": "unassigned"}
},
"allOf": [
{"if": {"properties": {"prediction_status": {"const": "ok"}}}, "then": {"properties": {"suggested_decision": {"enum": ["present", "absent"]}, "model_score": {"type": "number"}}}},
{"if": {"properties": {"prediction_status": {"enum": ["unsupported_criterion", "missing_rubric", "out_of_evaluated_domain", "insufficient_context", "invalid_input", "no_qualified_model"]}}}, "then": {"properties": {"suggested_decision": {"type": "null"}, "model_score": {"type": "null"}}}},
{"if": {"properties": {"prediction_status": {"const": "abstained"}}}, "then": {"properties": {"suggested_decision": {"type": "null"}}}}
]
}
}
}