Skip to content
OATSCHEMA

Docs / Schemas / embedding / 0.5.0

Embedding 0.5.0

Store a vector and (optionally) the algorithm or embedding model which generated it. Supports both array (dense) and object (sparse) representations.

This is an older version of embedding.

The latest version is 0.8.0. Releases before 0.7.0 use the $id https://dorsalhub.com/schemas/open/embedding and are served by DorsalHub.

$id
https://dorsalhub.com/schemas/open/embedding
Latest
https://oatschema.org/embedding
Versions
Source
v0.5.0 on GitHub

Schema

embedding.json Raw
{    "x-license": {        "id": "Apache-2.0",        "notice": "Copyright 2025-2026 Dorsal Hub LTD",        "url": "https://github.com/dorsalhub/open-validation-schemas/blob/main/LICENSE"    },    "$schema": "https://json-schema.org/draft/2020-12/schema",    "$id": "https://dorsalhub.com/schemas/open/embedding",    "title": "Embedding",    "version": "0.5.0",    "description": "Store a vector and (optionally) the algorithm or embedding model which generated it. Supports both array (dense) and object (sparse) representations.",    "type": "object",    "properties": {        "model": {            "type": "string",            "description": "The model, tool or algorithm used to create this embedding.",            "maxLength": 1024        },        "target": {            "type": "string",            "description": "The name of or a reference to the variable, feature, or file being embedded.",            "maxLength": 256        },        "vector": {            "description": "The embedding vector data.",            "oneOf": [                {                    "title": "Array Representation",                    "type": "array",                    "description": "A flat list of numbers (typically used for dense vectors).",                    "items": {                        "type": "number"                    },                    "minItems": 1,                    "maxItems": 16384                },                {                    "title": "Object Representation",                    "type": "object",                    "description": "A coordinate list of indices and values (typically used for sparse vectors). Consumer must ensure arrays are equal length.",                    "properties": {                        "dimensions": {                            "type": "integer",                            "description": "The total size of the vector space (e.g. the vocabulary size).",                            "minimum": 1                        },                        "indices": {                            "type": "array",                            "description": "The positions of the non-zero elements.",                            "items": {                                "type": "integer",                                "minimum": 0                            },                            "minItems": 1,                            "maxItems": 100000,                            "uniqueItems": true                        },                        "values": {                            "type": "array",                            "description": "The values corresponding to the indices.",                            "items": {                                "type": "number"                            },                            "minItems": 1,                            "maxItems": 100000                        }                    },                    "required": [                        "dimensions",                        "indices",                        "values"                    ],                    "additionalProperties": false                }            ]        },        "attributes": {            "type": "object",            "description": "Arbitrary metadata relevant to this embedding.",            "maxProperties": 16,            "additionalProperties": {                "anyOf": [                    {                        "type": "string",                        "maxLength": 1024                    },                    {                        "type": "number"                    },                    {                        "type": "boolean"                    },                    {                        "type": "null"                    }                ]            }        }    },    "required": [        "vector"    ],    "additionalProperties": false}

Fields

  • model string

    The model, tool or algorithm used to create this embedding.

    • at most 1024 characters
  • target string

    The name of or a reference to the variable, feature, or file being embedded.

    • at most 256 characters
  • vector array of number | object required

    The embedding vector data.

    Exactly one of these forms:

    1. Array Representation array of number

      A flat list of numbers (typically used for dense vectors).

      • 1 to 16384 items
    2. Object Representation object

      A coordinate list of indices and values (typically used for sparse vectors). Consumer must ensure arrays are equal length.

      • dimensions integer required

        The total size of the vector space (e.g. the vocabulary size).

        • ≥ 1
      • indices array of integer required

        The positions of the non-zero elements.

        • 1 to 100000 items
        • items must be unique
        • each ≥ 0
      • values array of number required

        The values corresponding to the indices.

        • 1 to 100000 items
  • attributes object

    Arbitrary metadata relevant to this embedding.

    • at most 16 properties
    • * string | number | boolean | null

      Any other key.

      • string: at most 1024 characters

Copyright 2025-2026 Dorsal Hub LTD. Licensed under Apache-2.0.