Skip to main content

Schema Reference

The following is the complete JSON Schema for llmo.json v0.1.0. Use this to validate truth pack artifacts.
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://llmo.org/schema/v0.1.0/llmo.json",
  "title": "LLMO Truth Pack",
  "description": "A machine-readable artifact declaring the canonical claims of an entity.",
  "type": "object",
  "required": ["llmo_version", "entity", "claims", "sources", "metadata"],
  "properties": {
    "llmo_version": {
      "type": "string",
      "description": "The LLMO protocol version.",
      "pattern": "^\\d+\\.\\d+\\.\\d+$"
    },
    "entity": {
      "$ref": "#/$defs/entity"
    },
    "claims": {
      "type": "array",
      "items": { "$ref": "#/$defs/claim" },
      "minItems": 1
    },
    "sources": {
      "type": "array",
      "items": { "$ref": "#/$defs/source" },
      "minItems": 1
    },
    "supersession_log": {
      "type": "array",
      "items": { "$ref": "#/$defs/supersession_entry" }
    },
    "metadata": {
      "$ref": "#/$defs/metadata"
    }
  },
  "$defs": {
    "entity": {
      "type": "object",
      "required": ["id", "type", "canonical_name", "description", "last_verified"],
      "properties": {
        "id": {
          "type": "string",
          "description": "Stable unique identifier, typically the domain."
        },
        "type": {
          "type": "string",
          "enum": ["company", "person", "product", "service", "institution", "concept"],
          "description": "The entity type."
        },
        "canonical_name": {
          "type": "string",
          "description": "The authoritative name of the entity."
        },
        "aliases": {
          "type": "array",
          "items": { "type": "string" },
          "description": "Known alternative names."
        },
        "description": {
          "type": "string",
          "description": "One-line factual description."
        },
        "last_verified": {
          "type": "string",
          "format": "date-time",
          "description": "When the entity record was last confirmed."
        }
      }
    },
    "claim": {
      "type": "object",
      "required": ["id", "statement", "status", "category", "sources", "freshness_window", "last_verified", "verification_level"],
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique claim identifier."
        },
        "statement": {
          "type": "string",
          "description": "The assertion in natural language."
        },
        "structured_value": {
          "description": "The assertion in machine-parseable form where applicable."
        },
        "status": {
          "type": "string",
          "enum": ["true", "false", "outdated", "ambiguous", "superseded", "unverifiable"],
          "description": "Current truth status of the claim."
        },
        "category": {
          "type": "string",
          "description": "Claim category: identity, capabilities, compliance, financials, etc."
        },
        "sources": {
          "type": "array",
          "items": { "type": "string" },
          "description": "References to supporting source record IDs."
        },
        "freshness_window": {
          "type": "string",
          "description": "ISO 8601 duration for how long this claim remains valid without re-verification."
        },
        "last_verified": {
          "type": "string",
          "format": "date-time",
          "description": "When this claim was last confirmed."
        },
        "verification_level": {
          "type": "string",
          "enum": ["self_attested", "third_party_verified", "cryptographically_signed"],
          "description": "How this claim was verified."
        },
        "supersedes": {
          "type": ["string", "null"],
          "description": "ID of the claim this one replaces, if applicable."
        }
      }
    },
    "source": {
      "type": "object",
      "required": ["id", "origin", "trust_tier", "type", "last_accessed"],
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique source identifier."
        },
        "origin": {
          "type": "string",
          "description": "URL or reference to the source."
        },
        "trust_tier": {
          "type": "string",
          "enum": ["authoritative", "reliable", "informational", "unverified"],
          "description": "Assigned trust level."
        },
        "type": {
          "type": "string",
          "enum": ["first_party", "third_party", "regulatory", "community"],
          "description": "Source type."
        },
        "last_accessed": {
          "type": "string",
          "format": "date-time",
          "description": "When the source was last retrieved."
        }
      }
    },
    "supersession_entry": {
      "type": "object",
      "required": ["old_claim", "new_claim", "reason", "timestamp"],
      "properties": {
        "old_claim": {
          "type": "string",
          "description": "ID of the superseded claim."
        },
        "new_claim": {
          "type": "string",
          "description": "ID of the superseding claim."
        },
        "reason": {
          "type": "string",
          "description": "Why the claim was replaced."
        },
        "timestamp": {
          "type": "string",
          "format": "date-time",
          "description": "When supersession occurred."
        }
      }
    },
    "metadata": {
      "type": "object",
      "required": ["generated_at", "schema_version"],
      "properties": {
        "generated_at": {
          "type": "string",
          "format": "date-time",
          "description": "When this truth pack was generated."
        },
        "generator": {
          "type": "string",
          "description": "What tool or process generated this truth pack."
        },
        "schema_version": {
          "type": "string",
          "pattern": "^\\d+\\.\\d+\\.\\d+$",
          "description": "The llmo.json schema version."
        }
      }
    }
  }
}

Validation

To validate an llmo.json file against this schema, use any JSON Schema validator compatible with draft 2020-12. Example using Python:
import json
import jsonschema

with open("llmo.json") as f:
    truth_pack = json.load(f)

with open("llmo-schema.json") as f:
    schema = json.load(f)

jsonschema.validate(instance=truth_pack, schema=schema)

Extending the schema

The schema is designed for extension. Custom fields can be added to any object without breaking validation, provided required fields are present. Extensions should be namespaced to avoid collision with future protocol fields.