{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/vaquill-ai/json-schema/vaquill-ai-matrix-cell-schema.json",
  "title": "MatrixCell",
  "description": "One answer. `answer is None` on a succeeded cell means \"not in this\ndocument\", which is a finding rather than a failure.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vaquill-ai-matrices-api-openapi.yml#/components/schemas/MatrixCell",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id",
      "description": "Public identifier for the cell, `cel_` followed by 32 hex characters."
    },
    "rowId": {
      "type": "string",
      "title": "Rowid",
      "description": "`row_` identifier of the row this cell sits in. Resolve it against the matrix's `rows`."
    },
    "columnId": {
      "type": "string",
      "title": "Columnid",
      "description": "`col_` identifier of the column this cell sits in. Resolve it against the matrix's `columns`."
    },
    "status": {
      "$ref": "#/$defs/OperationStatus",
      "description": "Extraction status for this one cell, using the same five public values as an operation."
    },
    "answer": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Answer",
      "description": "The extracted answer. Null on a SUCCEEDED cell means the answer is not in that document, which is a finding rather than a failure. Null on a non-terminal cell means it has not run yet."
    },
    "citations": {
      "items": {
        "$ref": "#/$defs/MatrixCitation"
      },
      "type": "array",
      "title": "Citations",
      "description": "Verified supporting quotes for the answer. An empty list on a succeeded cell with an answer means every candidate citation failed verification and was dropped."
    },
    "confidence": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Confidence",
      "description": "The extractor's confidence in the answer, 0 to 1."
    },
    "extractedAt": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Extractedat",
      "description": "When this cell was last extracted (RFC 3339)."
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "id",
    "rowId",
    "columnId",
    "status"
  ],
  "$defs": {
    "MatrixCitation": {
      "properties": {
        "quote": {
          "type": "string",
          "title": "Quote",
          "description": "The exact supporting text from the document. Verified to be a literal substring of the cited passage before the cell was saved, so a citation that appears here has been checked."
        },
        "page": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Page",
          "description": "Page the quote appears on, when the source format has pages."
        },
        "chunkId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Chunkid",
          "description": "Identifier of the retrieval chunk the quote came from."
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "quote"
      ],
      "title": "MatrixCitation",
      "description": "Where in the document the answer came from.\n\n`quote` is verified to be a literal substring of the cited passage before\nthe cell is persisted, and citations that fail that check are dropped. So a\ncitation present here has been checked, which is the property that makes it\nworth publishing at all."
    },
    "OperationStatus": {
      "type": "string",
      "enum": [
        "queued",
        "running",
        "succeeded",
        "failed",
        "cancelled"
      ],
      "title": "OperationStatus",
      "description": "The public five. There is no sixth, and there are no synonyms.\n\nInternal vocabularies spell terminal success `completed`, `ready`,\n`extracted`, `succeeded` and `fresh`; terminal failure `failed` and `error`;\nqueued `pending`, `queued` and `draft`. All of that is collapsed here by\n`app.workspace_api.adapters.status_map`, which refuses to guess."
    }
  }
}