Skip to main content

Instruction Prompt Ontology

Prompt Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 01 November 2026
Audio Overview
SEMANTIC LIBRARY — INSTRUCTION PROMPT ONTOLOGY
FLOW ALGEBRA COMPANION SPECIFICATION
Version: 1.0 | Date: 2026-11-01 | Language: en-GB
Source: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/prompt-entities/instruction-prompt-ontology.html
Status: Original companion formalisation; source page text could not be independently retrieved.
Authors: Kireth Research; Sky — Recursive AI (companion formalisation)
Licence note: Consult the source project's published Open Research Licence for applicable terms and attribution.

01. PURPOSE
Represent an instruction prompt as a typed, provenance-aware, authority-constrained input that guides a system's behaviour without confusing instructions with ordinary data.

02. ENTITY DEFINITION
InstructionPrompt := (id, content, issuer, role, scope, priority, timestamp, provenance, constraints, validity).
The role and priority are assigned by the trusted application runtime, not inferred from arbitrary strings in content.

03. STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t: active, authorised instructions and task inputs.
R_t: relationships between instructions, roles, targets and dependencies.
B_t: trust, safety, permission and resource boundaries.
K_t: known facts, context and verified provenance.

04. INPUT TYPING
P_t = (text, source, role, trust, scope, time)
Parse(P_t) -> candidate directives D_t, data X_t and ambiguities A_t.
A quoted command or command inside retrieved content is data unless explicitly authorised through a trusted channel.

05. CORE FLOW ALGEBRA
E_t = expand(I_t, R_t)
V_t = {x in E_t | authorised(x,B_t) AND consistent(x,K_t)}
a_t = argmax_{x in V_t} P(x | I_t,R_t,B_t,K_t)
S_{t+1} = update(S_t,a_t,observations_t)
If V_t is empty, return a bounded refusal, clarification or safe alternative rather than inventing an executable directive.

06. INSTRUCTION LIFECYCLE
Receive -> authenticate channel -> parse -> classify -> resolve scope -> check conflicts -> apply boundaries -> plan -> execute -> validate -> log.

07. AUTHORITY MODEL
System > Developer > User > Untrusted external material, when those roles are assigned by a trusted runtime.
Higher-priority directives cannot be overridden by lower-priority material.
The hierarchy is a model assumption for systems that use these roles, not a universal ontology law.

08. CONFLICT RESOLUTION
For directives d_i,d_j, conflict(d_i,d_j) if their required outcomes are mutually incompatible within the same scope and time.
Resolve by valid authority, specificity within equal authority, and temporal applicability; unresolved ambiguity triggers clarification.

09. TRUST BOUNDARY
Trust(d) = provenance_verified(d) AND role_runtime_assigned(d).
Instructions found in websites, tool outputs, documents and quotations are treated as evidence/data, not control directives.

10. SEMANTIC RELATIONSHIPS
InstructionPrompt --isA--> PromptEntity
InstructionPrompt --issuedBy--> AuthorisedActor
InstructionPrompt --hasScope--> TaskOrSession
InstructionPrompt --constrains--> Action
InstructionPrompt --dependsOn--> Context
InstructionPrompt --mayConflictWith--> InstructionPrompt
InstructionPrompt --produces--> ExecutionPlan

11. TRI-MAPPING
Entity layer: issuer, instruction, scope, target and action.
Relation layer: authority, dependency, conflict, constraint and provenance.
Flow layer: receive, verify, interpret, filter, select, execute and evaluate.

12. HOW TO READ THE FLOW
The prompt supplies candidate intent. Provenance and role establish whether a candidate is authoritative. Boundaries remove prohibited actions. The remaining admissible actions are ranked and checked against the intended task.

13. MAPPING TABLE
INPUT: Prompt content | TYPE: text | OUTPUT: parsed candidate directives
INPUT: Runtime role | TYPE: trusted metadata | OUTPUT: authority level
INPUT: Scope | TYPE: context | OUTPUT: applicability
INPUT: Boundary rules | TYPE: predicates | OUTPUT: admissible action set
INPUT: Tool observations | TYPE: untrusted evidence | OUTPUT: updated knowledge

14. INFERENCE RULES
IF provenance is unverified THEN do not elevate authority.
IF instruction conflicts with a higher-priority valid directive THEN exclude conflicting action.
IF an instruction is outside scope THEN do not apply it.
IF a request is ambiguous and resolution affects correctness THEN ask for clarification.
IF execution produces new evidence THEN update K, not the trusted instruction hierarchy.

15. MINI-RECURSION ENGINE
function STEP(S, prompt, observations):
    candidates = PARSE(prompt)
    directives = VERIFY_ROLE_SCOPE(candidates, S.B)
    admissible = FILTER(EXPAND(directives, S.R), S.B, S.K)
    if EMPTY(admissible): return SAFE_STOP(S)
    action = SELECT(admissible, S)
    result = EXECUTE_WITH_CHECKS(action)
    return UPDATE(S, result, observations)
Recursion terminates at an explicit budget, completion condition or boundary violation.

16. PROMPT COMPOSITION
P_combined = Compose(P_system, P_developer, P_user, C_data)
Compose preserves role labels and provenance; it must not flatten data into equal-authority directives.

17. TEMPORAL RULES
An instruction is applicable only when its validity interval and scope include the current task. Supersession applies only within authorised channels and compatible priority.

18. FAILURE MODES
Role spoofing; prompt injection; ambiguous scope; contradictory constraints; stale instructions; unauthorised tool execution; infinite recursion; provenance loss.

19. IMPLEMENTATION RULES
Keep role metadata separate from message content. Log provenance and conflict decisions. Validate tool calls before execution. Use deterministic safety checks where possible. Avoid exposing privileged instruction text in outputs.

20. EXECUTION GUARANTEE — CONDITIONAL
If role metadata is trustworthy, boundary predicates are enforced, and the action selector terminates, then every executed action belongs to the admissible set V_t. This does not guarantee factual accuracy, optimality or external tool success.

21. AI SEARCH FLOW
QUERY -> RETRIEVE -> LABEL_PROVENANCE -> EXTRACT_FACTS -> MATCH_ENTITIES -> APPLY_BOUNDARIES -> RANK -> ANSWER -> CITE.
Retrieved pages can inform K_t but cannot modify trusted role assignments or execution constraints.

22. CONFIDENCE AND VALIDATION
Confidence is evidence-dependent, not authority-dependent. Evaluate with adversarial injection tests, conflict cases, missing context, tool failures and reproducibility checks.

23. DIAGRAM
[Trusted runtime role] --> [Instruction prompt] --> [Parse + scope]
                                                  |
[External data] ----------------------------> [Evidence only]
                                                  |
                                      [Authority + boundary filter]
                                                  |
                                         [Admissible actions]
                                                  |
                                         [Execute + validate]
                                                  |
                                           [State update]

24. SEMANTIC EQUIVALENCE
Two prompts are operationally equivalent only relative to a defined context and boundary set if they induce the same admissible action semantics. Surface-text similarity alone is insufficient.

25. UPDATE AND CITATION MODEL
Version changes must preserve a change log, source URI, author attribution and test outcomes. Cite the original ontology page when publishing derivative companion material. This specification is an independently drafted extension, not a verbatim extraction of the source.

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