⚠️ Early Release: This is an early preview and should be used for development and testing purposes only.

Semantic Data Type

The Semantic Data Type (SDT) specification provides an intelligent bridge between data type concepts and how they are commonly represented in files, databases, and programming environments. By capturing key aspects—including meaning and purpose, usage, formatting, and validation rules—it enables both humans and machines to develop a deep, actionable understanding of the underlying data.

Core Pillars of Semantic Types

Modeling

Conceptual Alignment

Semantic types are aligned to standard ontologies like SKOS, Wikidata, and LCSH. They represent discrete real-world concepts, not just raw primitive data types.

Bindings

Physical Storage Mappings

Mappings defined across multiple environments, detailing how a type is stored in databases (SQL, PostgreSQL, BigQuery), represented in programming (Python, Rust, TypeScript), or exchanged (XSD).

Actionability

Agentic Skills & Instructions

Built-in instructions and system prompt snippets designed for LLMs to interpret, parse, normalize, and reason with variables matching the semantic data type.

Reliability

Algorithmic Checksums

Multi-layered validation combining structure-matching regular expressions with complex algorithmic check validations (such as Luhn, Modulo-11, and Modulo-97).

Illustrative Examples

Explore how Semantic Data Types elevate primitive data representations into self-documenting, validated, and agent-actionable assets.

Demographic Scope: US

US Social Security Number

A sensitive national identifier allocated for taxation and social security administration.

Conceptual Alignment Wikidata: Q5612679
Physical Storage VARCHAR(11) / str
Validation Rules Pattern structure + exclusion of invalid ranges (e.g. 000, 666)
Agent Instructions "Treat as PII. Redact or mask first 5 digits in logs and displays."
View Specification →
Financial Scope: Global

International Bank Account

A standardized global system for identifying financial accounts across national borders.

Conceptual Alignment Wikidata: Q144593
Physical Storage VARCHAR(34) / str
Validation Rules Country code prefix matching + Modulo-97 checksum validation
Agent Instructions "Normalize spaces and capitalization before validating or processing."
View Specification →
Geographic Scope: Canada

Canadian Postal Code

A six-character alphanumeric string that forms part of a postal address in Canada.

Conceptual Alignment Wikidata: Q1478124
Physical Storage VARCHAR(7) / str
Validation Rules Alternating letter/digit regex + forbidden character exclusions (D, F, I, O, Q, U)
Agent Instructions "Normalize to uppercase and ensure a single separating space (e.g. 'K1A 0B1')."
View Specification →

Explore the Open Specification

The structure and properties of Semantic Data Types are formally modeled in LinkML (Linked Data Modeling Language), providing absolute machine-readability, automated compilation to Python/Rust/TypeScript, and rigorous metadata schema compliance.

View LinkML Spec Explorer →