File size: 2,686 Bytes
1e3bc19 | 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 | {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "grounded-answer.schema.json",
"title": "GroundedAnswer",
"description": "An answer whose every claim points at citations inside the authorized pack. A valid id proves only that the reference exists in the pack, not that it supports the claim; semantic support is judged by evidence and evaluation.",
"type": "object",
"additionalProperties": false,
"required": ["schema_version", "answer_id", "request_id", "pack_id", "claim_refs", "citation_refs", "abstentions", "tool_receipt_ids", "execution_receipt_id", "status"],
"properties": {
"schema_version": { "$ref": "common.schema.json#/$defs/schema_version" },
"answer_id": { "$ref": "common.schema.json#/$defs/id" },
"request_id": { "$ref": "common.schema.json#/$defs/id" },
"pack_id": { "$ref": "common.schema.json#/$defs/id" },
"claim_refs": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["claim_id", "text", "kind", "citation_ids"],
"properties": {
"claim_id": { "$ref": "common.schema.json#/$defs/id" },
"text": { "type": "string", "minLength": 1, "maxLength": 1200 },
"kind": { "enum": ["observed", "interpretation", "scenario"] },
"citation_ids": { "type": "array", "uniqueItems": true, "items": { "$ref": "common.schema.json#/$defs/id" } }
}
}
},
"citation_refs": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["citation_id", "evidence_id", "source_url"],
"properties": {
"citation_id": { "$ref": "common.schema.json#/$defs/id" },
"evidence_id": { "$ref": "common.schema.json#/$defs/id" },
"source_url": { "$ref": "common.schema.json#/$defs/https_url" },
"span": { "type": "string", "maxLength": 600 }
}
}
},
"abstentions": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["reason"],
"properties": {
"reason": { "enum": ["insufficient_evidence", "reserved_before_lock", "rights_refused", "stale_source", "tool_failed", "out_of_scope"] },
"detail": { "type": "string", "maxLength": 300 }
}
}
},
"tool_receipt_ids": { "type": "array", "items": { "$ref": "common.schema.json#/$defs/id" } },
"execution_receipt_id": { "type": ["string", "null"], "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$" },
"status": { "enum": ["complete", "partial", "insufficient", "interrupted", "error"] }
}
}
|