{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/grafomem-com/json-schema/grafomem-com-decision-response-schema.json",
  "title": "DecisionResponse",
  "description": "Response model for a single decision record.",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/grafomem-com-openapi.json#/components/schemas/DecisionResponse",
  "properties": {
    "decision_id": {
      "type": "string",
      "title": "Decision Id"
    },
    "tenant_id": {
      "type": "string",
      "title": "Tenant Id"
    },
    "store_id": {
      "type": "string",
      "title": "Store Id"
    },
    "session_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Session Id"
    },
    "created_at": {
      "type": "string",
      "title": "Created At"
    },
    "query": {
      "type": "string",
      "title": "Query"
    },
    "retrieved_fact_refs": {
      "items": {
        "type": "integer"
      },
      "type": "array",
      "title": "Retrieved Fact Refs"
    },
    "retrieved_contents": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Retrieved Contents"
    },
    "retrieval_scores": {
      "items": {
        "type": "number"
      },
      "type": "array",
      "title": "Retrieval Scores"
    },
    "retrieval_options": {
      "additionalProperties": true,
      "type": "object",
      "title": "Retrieval Options"
    },
    "model_id": {
      "type": "string",
      "title": "Model Id"
    },
    "prompt_hash": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Prompt Hash"
    },
    "parameters": {
      "additionalProperties": true,
      "type": "object",
      "title": "Parameters"
    },
    "raw_output": {
      "type": "string",
      "title": "Raw Output"
    },
    "parsed_output": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Parsed Output"
    },
    "output_tokens": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Output Tokens"
    },
    "latency_ms": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Latency Ms"
    },
    "signature": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Signature"
    },
    "public_key": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Public Key"
    },
    "parent_decision_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Parent Decision Id"
    }
  },
  "type": "object",
  "required": [
    "decision_id",
    "tenant_id",
    "store_id",
    "created_at",
    "query",
    "model_id",
    "raw_output"
  ]
}