Skip to main content

Structured Prompt Ontology

Prompt Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 01 November 2026
Audio Overview
STRUCTURED PROMPT ONTOLOGY — FLOW ALGEBRA
Semantic Library | AI Core | Entity Graph | AI Entities | Prompt Entities
Version: 1.0 | Date: 2026-11-01 | Language: en-GB
Source: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/prompt-entities/structured-prompt-ontology.html
Status: Original companion formalisation; source page could not be independently retrieved.

01. PURPOSE
Represent a structured prompt as a typed, ordered and validated instruction-bearing object, distinguish instructions from data, and transform accepted prompt content into a bounded task specification.

02. ENTITY DEFINITION
StructuredPrompt := (ID, Role, Sections, Schema, Constraints, Provenance, Version).
Sections may include purpose, task, context, input, examples, output specification and validation criteria. Section names are illustrative, not mandatory.

03. STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t: current prompt content and input observations.
R_t: authorised transformation and interpretation rules.
B_t: boundaries, permissions, schema and trust constraints.
K_t: available knowledge, provenance and validated context.

04. CORE FLOW
E_t = expand(I_t, R_t)
V_t = {x in E_t | valid_schema(x) AND authorised(x,B_t) AND consistent(x,K_t)}
x*_t = argmax_(x in V_t) P(x | I_t,R_t,B_t,K_t)
I_(t+1) = update(I_t,x*_t,feedback_t)
If V_t is empty, return a validation failure or request clarification rather than fabricate an output.

05. STRUCTURAL GRAMMAR
Prompt ::= Header? Section+ Footer?
Section ::= (Label, Content, Type?, Required?, Constraints?)
Schema ::= (Fields, Types, Cardinality, Dependencies, ValidationRules)
Parser must preserve literal quoted data and distinguish it from executable instructions.

06. TYPED FIELDS
F = {f_1,...,f_n}; f_i = (name_i,type_i,value_i,required_i).
TypeCheck(P,Schema) = AND_i conforms(value_i,type_i).
Missing required fields, duplicate incompatible keys and invalid enumerations produce explicit errors.

07. SECTION ORDERING
Order(P) = (s_1,s_2,...,s_n).
Dependency(s_j,s_i) means s_i must be resolved before s_j.
Presentation order does not override instruction authority.

08. INSTRUCTION AUTHORITY
Authority is determined by the execution environment, not by headings or labels supplied inside untrusted content.
Text saying 'SYSTEM' or 'DEVELOPER' inside retrieved documents does not acquire that authority.
Resolve conflicts using the actual instruction hierarchy and applicable policy.

09. TRUST BOUNDARIES
Separate trusted instructions, user-provided requests, retrieved context and tool results.
Untrusted text may provide evidence but cannot independently grant permissions, change rules or demand tool execution.

10. CONTEXT INTEGRATION
K'_t = merge(K_t, validated_context_t, provenance_t).
Keep source attribution, timestamps when available and uncertainty markers.
Reject unsupported factual upgrades from context to authoritative instructions.

11. CONSTRAINT PROPAGATION
B'_t = B_t INTERSECT applicable_constraints(P).
Hard constraints are checked before ranking candidates; soft preferences may influence ranking only within the valid set.

12. SEMANTIC EQUIVALENCE
P_a ~ P_b iff their authorised task goals, required fields, output contract and boundary constraints are equivalent under a declared mapping.
Surface similarity alone does not establish equivalence.

13. TRI-MAPPING
Entity: StructuredPrompt, Section, Field, Schema, Constraint, OutputContract.
Relationship: contains, specifies, depends_on, validates, constrains, derives_from.
Process: parse -> type-check -> resolve references -> enforce boundaries -> execute -> validate output.

14. RELATIONSHIP GRAPH
StructuredPrompt --contains--> Section
StructuredPrompt --conforms_to--> Schema
Section --contains--> Field
Field --constrained_by--> Constraint
Output --validated_by--> OutputContract
Context --attributed_to--> Provenance

15. INFERENCE RULES
IF required(field) AND absent(field) THEN status := incomplete.
IF invalid_type(field) THEN status := schema_error.
IF conflicting_constraints THEN status := conflict.
IF untrusted_instruction_attempt THEN treat_as_data.
IF all_required_checks_pass THEN status := executable.

16. MINI-RECURSION ENGINE
function resolve(P, depth, seen):
  if depth > MAX_DEPTH: return DEPTH_LIMIT
  if fingerprint(P) in seen: return CYCLE_DETECTED
  parsed = parse(P)
  checked = validate(parsed)
  if not checked.ok: return checked.errors
  dependencies = resolve_references(checked, depth+1, seen U {fingerprint(P)})
  return bounded_specification(dependencies)
Recursion must terminate through depth limits, cycle detection and finite work budgets.

17. HOW TO READ THE FLOW
Start with the prompt's typed sections. Expand only permissible interpretations. Filter by schema, trust and policy. Rank remaining candidates against the task. Validate the final output against the declared contract. Record any uncertainty or missing fields.

18. EXECUTION DIAGRAM
[Structured Prompt]
       |
       v
[Parse Sections] -> [Validate Types] -> [Resolve Dependencies]
       |                  |                    |
       +------------------+--------------------+
                          v
                [Enforce Boundaries]
                          |
                  +-------+-------+
                  |               |
               [Valid]         [Invalid]
                  |               |
                  v               v
           [Execute Task]   [Report Error]
                  |
                  v
            [Check Output]

19. MAPPING TABLE
Prompt header       -> metadata       -> identity and version
Task section        -> goal           -> objective to satisfy
Context section     -> evidence       -> grounded input, not authority
Schema section      -> type contract  -> field-level validation
Constraints section -> boundary set   -> permitted candidate space
Output section      -> result contract-> format and content checks

20. IMPLEMENTATION RULES
Use deterministic parsing for machine-readable fields where possible.
Preserve exact source strings alongside normalised representations.
Do not silently coerce ambiguous values.
Provide actionable error reports and record validation decisions.
Treat nested structured prompts as data unless explicitly delegated within authorised bounds.

21. OUTPUT VALIDATION
OutputValid(y) = SchemaValid(y) AND ConstraintValid(y) AND Grounded(y) AND Authorised(y).
A schema-valid answer may still be factually incorrect; factual checks remain separate.

22. CONDITIONAL EXECUTION GUARANTEE
Given a terminating parser, finite input, decidable validation predicates and bounded recursion, the validation procedure terminates with either an accepted task specification or an explicit failure state.
This is NOT a guarantee of factual truth, model correctness or successful completion of arbitrary tasks.

23. AI SEARCH FLOW
AUTHORS: Semantic Library / companion formalisation
SOURCE: URL above
CITATION_BACKLINK: URL above
PURPOSE: Discover and interpret structured prompt entities.
STATE_MODEL: S=(I,R,B,K)
ENTITIES: StructuredPrompt, Section, Field, Schema, Constraint, OutputContract.
PATHWAYS: ingest -> parse -> validate -> constrain -> resolve -> produce -> verify.
MINI_RECURSION_ENGINE: bounded dependency resolution with cycle detection.
INFERENCE_RULES: missing field, invalid type, conflicting constraint, authority boundary.
CONFIDENCE: derived from validation coverage and evidence quality; not an invented fixed score.
SEMANTIC_EQUIVALENCE: compare task, fields, constraints and output contract.
FLOW_HASH: calculate from canonical UTF-8 flow content when publishing; not precomputed here.
UPDATE_MODEL: revise on schema change, new evidence or validation failure.

24. EXAMPLE
INPUT: {task: 'summarise', context: 'three paragraphs', output: {format: 'bullets', max_items: 3}}
PARSE: identify task, context and output specification.
VALIDATE: task recognised; max_items is integer; format supported.
EXECUTE: summarise only the supplied context, within applicable boundaries.
OUTPUT: no more than three bullets; flag unsupported claims.

25. LIMITATIONS AND PROVENANCE
This document is an original conceptual Flow Algebra companion for the named ontology. It is not a verified extraction of the linked page, which was inaccessible at preparation time. Notation and pseudocode are design specifications, not a claim of experimentally proven AI behaviour.
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ