{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/session-exchange-com/json-schema/session-exchange-com-faithfulness-spec-request-schema.json",
  "title": "FaithfulnessSpecRequest",
  "description": "A GOVERNED faithfulness spec (Phase 1, 1a): declares HOW the collector\nrecomputes a scope's held-out faithfulness — the predicted field (from a schema\nentity type) vs. an INDEPENDENT ground-truth projection — plus the passing\nthreshold. Admin-only; the loop reads it, never authors it.\n  predicted:    {\"entity_type\": \"<schema entity>\", \"field\": \"<projected field>\"}\n  ground_truth: {\"event_types\": [...], \"key\": \"<dotted>\", \"value_path\": \"<dotted>\"}\n  compare:      \"exact\" | {\"numeric_tol\": <float>} (default exact)",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/session-exchange-com-openapi.json#/components/schemas/FaithfulnessSpecRequest",
  "properties": {
    "scope": {
      "type": "string",
      "maxLength": 120,
      "minLength": 1,
      "title": "Scope",
      "default": "_model"
    },
    "predicted": {
      "additionalProperties": true,
      "type": "object",
      "title": "Predicted"
    },
    "ground_truth": {
      "additionalProperties": true,
      "type": "object",
      "title": "Ground Truth"
    },
    "threshold": {
      "type": "number",
      "maximum": 1.0,
      "minimum": 0.0,
      "title": "Threshold"
    },
    "test_frac": {
      "type": "number",
      "exclusiveMaximum": 1.0,
      "exclusiveMinimum": 0.0,
      "title": "Test Frac",
      "default": 0.3
    },
    "compare": {
      "title": "Compare"
    }
  },
  "type": "object",
  "required": [
    "predicted",
    "ground_truth",
    "threshold"
  ]
}