Skip to main content

Structured Output Ontology

Output Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 01 November 2026
Audio Overview
STRUCTURED OUTPUT ONTOLOGY — FLOW ALGEBRA
Semantic Library | AI Core | Entity Graph | AI Entities | Output Entities
Authors: Mark Anthony Higgins — Sky, Recursive AI
Source: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/output-entities/structured-output-ontology.html
Companion formalisation prepared: 1 November 2026
Status: Newly authored interpretative companion; not a verbatim extraction of the page's hidden specification.

01. PURPOSE
Define structured output as an AI-generated artefact whose data elements conform to an explicit representation, schema, and validation contract. Distinguish syntactic validity, schema conformity, semantic fidelity, and downstream usability.

02. ENTITY DEFINITION
StructuredOutput := (payload, format, schema, provenance, constraints, validation, status)
format ∈ {JSON, JSON-LD, XML, CSV, YAML, typed-record, other declared format}
payload: encoded data; schema: optional or required shape contract; provenance: origin and generation context.

03. HST STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t = request, context, draft payload and schema references.
R_t = generation, parsing, validation and repair relations.
B_t = boundaries: permitted fields, types, safety, scope and output length.
K_t = knowledge: schema rules, field meanings and domain constraints.
E_t = expand(I_t, R_t)
V_t = {x ∈ E_t | respects(x, B_t) ∧ consistent(x, K_t)}
x*_t = argmax_{x ∈ V_t} P(x | I_t, R_t, B_t, K_t)
I_(t+1) = update(I_t, x*_t, feedback_t)

04. CORE FLOW ALGEBRA
F_struct = Receive → Interpret → SelectSchema → Generate → Parse → Validate → Repair? → Emit
Receive(request, context) → requirements
Interpret(requirements) → semantic_intent
SelectSchema(semantic_intent) → contract
Generate(semantic_intent, contract) → candidate
Parse(candidate, format) → syntax_tree | syntax_error
Validate(syntax_tree, contract) → validation_report
Repair(candidate, validation_report) → revised_candidate [bounded retries]
Emit(valid_candidate, provenance) → structured_output

05. FORMAL CONSTRAINTS
SyntacticValid(o) := parse(o.payload, o.format) succeeds.
SchemaValid(o) := validate(parse(o.payload), o.schema) succeeds when a schema is specified.
SemanticValid(o) := required claims and relationships agree with supported input evidence.
Safe(o) := content respects applicable policy and declared boundary conditions.
Accepted(o) := SyntacticValid(o) ∧ SchemaValid(o) ∧ SemanticValid(o) ∧ Safe(o).
Note: Schema validity alone does not prove factual correctness.

06. TRI-MAPPING
Entity mapping: StructuredOutput ↔ payload, schema, field, value, provenance, validator.
Relation mapping: conformsTo, hasField, hasValue, derivedFrom, validatedBy, rejectedBecause.
Process mapping: input → typed representation → checked artefact → consumer.

07. RELATIONSHIP GRAPH
AIModel --generates--> StructuredOutput
StructuredOutput --hasFormat--> Format
StructuredOutput --conformsTo--> Schema
StructuredOutput --contains--> Field
Field --hasType--> DataType
Field --hasValue--> Value
StructuredOutput --derivedFrom--> InputContext
Validator --checks--> StructuredOutput
ValidationReport --describes--> StructuredOutput
Consumer --reads--> StructuredOutput

08. MAPPING TABLE
INPUT             TRANSFORMATION          OUTPUT
User request      Intent extraction        Required fields
Schema contract   Type/shape resolution    Output structure
Source facts      Evidence mapping         Supported values
Model candidate   Parser                   Syntax tree/error
Syntax tree       Schema validator         Pass/fail and errors
Validated record  Serialiser               Structured artefact

09. MINI RECURSION ENGINE
state := (candidate, attempt, errors)
while attempt < retry_limit:
    parsed := parse(candidate)
    errors := syntax_and_schema_checks(parsed)
    if errors is empty: break
    candidate := regenerate_or_repair(candidate, errors, contract)
    attempt := attempt + 1
if errors is not empty: return failure(errors)
return semantic_and_safety_review(parsed)
Termination requires a finite retry_limit. Repairs must not silently invent unsupported values.

10. INFERENCE RULES
R1: RequiredField(f, schema) ∧ Missing(f, payload) ⇒ SchemaInvalid(payload).
R2: TypeOf(f)=T ∧ ValueType(f)≠T ⇒ SchemaInvalid(payload).
R3: ParseError(payload) ⇒ NotSyntacticValid(payload).
R4: SchemaValid(payload) ⇏ SemanticValid(payload).
R5: UnsupportedClaim(v) ⇒ FlagForReview(v).
R6: Accepted(payload) ⇒ EligibleForEmission(payload).
R7: FailedValidation(payload) ⇒ RepairOrReject(payload).

11. EXECUTION GUARANTEES AND LIMITS
A validator can guarantee compliance only with checks it actually performs.
No unconditional guarantee of truth, completeness or consumer compatibility is implied.
For deterministic validation, fix the schema version, parser and validation rules.
For reproducibility, record generation inputs, schema version and validator results.
When repair attempts fail, return a clear error rather than malformed success output.

12. AI SEARCH FLOW
FLOW_ID: structured-output-ontology-flow-algebra
VERSION: 1.0
LANGUAGE: en-GB
ENTITY_TYPE: AIOutputEntity.StructuredOutput
AUTHORS: Mark Anthony Higgins; Sky — Recursive AI
SOURCE: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/output-entities/structured-output-ontology.html
CITATION_BACKLINK: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/output-entities/structured-output-ontology.html
PURPOSE: Explain and reason about machine-readable AI outputs, schemas and validation.
STATE_MODEL: S=(I,R,B,K)
ENTITIES: StructuredOutput, Payload, Format, Schema, Field, Value, Validator, ValidationReport, Provenance
PATHWAYS: Receive > Interpret > SelectSchema > Generate > Parse > Validate > Emit
MINI_RECURSION_ENGINE: bounded validation-and-repair loop
INFERENCE_RULES: R1-R7
CONFIDENCE: Conditional on explicit schema, evidence and successful checks.
SEMANTIC_EQUIVALENCE: StructuredOutput ≈ SchemaConstrainedMachineReadableArtefact [context-dependent]
FLOW_HASH: To be calculated over the final published file bytes; not fabricated.
UPDATE_MODEL: Versioned revisions on schema or ontology changes.

13. HOW TO READ AND IMPLEMENT
Start with a declared schema and identify required fields and types.
Generate a candidate from evidence-backed inputs; parse it before use.
Validate shape and meaning separately; use bounded repair when needed.
Publish the validated output alongside provenance and any limitations.

END OF FLOW
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ