{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-ai-foundry/json-schema/azure-ai-foundry-decision-request-schema.json",
  "title": "DecisionRequest",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_superseded/azure-ai-foundry-decisions-api-openapi.yml#/components/schemas/DecisionRequest",
  "type": "object",
  "required": [
    "model",
    "state",
    "questions"
  ],
  "properties": {
    "model": {
      "type": "string",
      "description": "Your deployment name, not the underlying model name."
    },
    "state": {
      "description": "The input to decide about, as text or JSON.",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "object"
        }
      ]
    },
    "questions": {
      "type": "object",
      "description": "One or more questions keyed by name; answers come back under the same names.",
      "additionalProperties": {
        "$ref": "#/$defs/Question"
      }
    }
  },
  "$defs": {
    "Question": {
      "type": "object",
      "required": [
        "type",
        "instructions"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "noul",
            "choice",
            "score"
          ],
          "description": "noul = probability 0-1 that a condition is true; choice = one option from a fixed set; score = value on an ordered scale."
        },
        "instructions": {
          "type": "string",
          "description": "The question to answer about the state."
        },
        "criteria": {
          "description": "noul (optional) - object with \"true\" and \"false\" condition descriptions; choice - object mapping option name to description; score - array of levels ordered lowest to highest.",
          "oneOf": [
            {
              "type": "object",
              "additionalProperties": {
                "type": "string"
              }
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          ]
        }
      }
    }
  }
}