{
  "$defs": {
    "ChunkingStrategy": {
      "description": "Supported chunking strategies.",
      "enum": [
        "recursive",
        "sentence_window",
        "late",
        "raptor"
      ],
      "title": "ChunkingStrategy",
      "type": "string"
    }
  },
  "description": "A chunk of a document, optionally embedded.\n\nAttributes:\n    id: Deterministic chunk ID (Qdrant point ID).\n    document_id: Parent document ID.\n    index: Ordinal position within the document.\n    text: The chunk text that gets embedded/indexed.\n    context: Optional wider context (sentence-window neighbours) stored but\n        not embedded \u2014 used to enrich the LLM prompt at retrieval time.\n    metadata: Provenance + strategy metadata.\n    embedding: The dense vector, once computed.\n    strategy: The chunking strategy that produced this chunk.\n    parent_id: For RAPTOR, the summary node above this chunk.\n    level: For RAPTOR, the tree level (0 = leaf).",
  "properties": {
    "id": {
      "title": "Id",
      "type": "string"
    },
    "document_id": {
      "title": "Document Id",
      "type": "string"
    },
    "index": {
      "title": "Index",
      "type": "integer"
    },
    "text": {
      "title": "Text",
      "type": "string"
    },
    "context": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Context"
    },
    "metadata": {
      "additionalProperties": true,
      "title": "Metadata",
      "type": "object"
    },
    "embedding": {
      "anyOf": [
        {
          "items": {
            "type": "number"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Embedding"
    },
    "strategy": {
      "anyOf": [
        {
          "$ref": "#/$defs/ChunkingStrategy"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "parent_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Parent Id"
    },
    "level": {
      "default": 0,
      "title": "Level",
      "type": "integer"
    }
  },
  "required": [
    "id",
    "document_id",
    "index",
    "text"
  ],
  "title": "Chunk",
  "type": "object"
}
