{ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "GPIO-LLM Training Example", "type": "object", "required": [ "id", "category", "messages", "expected_action" ], "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "^[a-z0-9_]+$" }, "category": { "type": "string", "enum": [ "gpio_basic", "gpio_read", "gpio_write", "gpio_mode", "gpio_pwm", "gpio_timing", "gpio_sequence", "sensor", "driver", "clarification", "error", "safety", "general_hardware" ] }, "messages": { "type": "array", "minItems": 1, "items": { "type": "object", "required": [ "role", "content" ], "additionalProperties": false, "properties": { "role": { "type": "string", "enum": [ "system", "user", "assistant" ] }, "content": { "type": "string", "minLength": 1 } } } }, "context": { "type": "object", "properties": { "gpio_state": { "type": "object" }, "device_mappings": { "type": "object" }, "sensor_state": { "type": "object" }, "available_pins": { "type": "array", "items": { "type": "integer" } } }, "additionalProperties": true }, "expected_action": { "type": "object", "required": [ "action" ], "additionalProperties": false, "properties": { "action": { "type": "string" }, "pin": { "type": [ "integer", "null" ] }, "value": { "type": [ "string", "number", "boolean", "null" ] }, "duration_ms": { "type": [ "integer", "null" ] }, "mode": { "type": "string", "enum": ["INPUT", "OUTPUT", "ALT"] }, "duty_cycle": { "type": "number" }, "operations": { "type": "array", "minItems": 1, "items": { "type": "object", "required": ["action"] } }, "parameters": { "type": "object" } } }, "difficulty": { "type": "integer", "minimum": 1, "maximum": 5 }, "source": { "type": "string" }, "fact_refs": { "type": "array", "items": { "type": "string", "pattern": "^[FP]-[A-Z0-9-]+$" } }, "template_id": { "type": "string" }, "split": { "type": "string", "enum": ["train", "eval"] } } }