Skip to main content

Prompt Example 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 — PROMPT EXAMPLE ONTOLOGY
FLOW ALGEBRA COMPANION SPECIFICATION v1.0
Date: 2026-11-01
Source: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/prompt-entities/prompt-example-ontology.html
Status: Original companion formalisation; not a verified transcription of source-page contents.
Authors: Kireth Research; Sky — Recursive AI (collaborative formalisation)
Licence note: Cite the source and authors when reusing; consult the published Open Research Licence for governing terms.

01. PURPOSE
Model an example embedded in a prompt as a bounded, provenance-aware demonstration mapping inputs to expected outputs. Examples are task data, not an independent source of instruction authority.

02. ENTITY DEFINITION
PromptExample E = (id, x, y, task, format, provenance, trust, constraints, metadata).
id: stable example identifier; x: demonstration input; y: demonstration output; task: intended task family; format: representation; provenance: origin; trust: trust annotation; constraints: validity conditions; metadata: optional labels.

03. STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t: current request and example set; R_t: applicable processing rules; B_t: authority, safety and scope boundaries; K_t: validated contextual knowledge.
E_t = {e_1,...,e_n} is the ordered example set.

04. CORE FLOW ALGEBRA
Expand_t = expand(I_t, R_t)
Candidates_t = generate(Expand_t, E_t, K_t)
V_t = {c in Candidates_t | satisfies(c,B_t) and conforms(c,R_t)}
y*_t = argmax_{c in V_t} P(c | I_t,R_t,B_t,K_t,E_t)
I_{t+1} = update(I_t,y*_t,feedback_t)
When V_t is empty, return a bounded refusal, clarification or validation error; do not fabricate a compliant candidate.

05. EXAMPLE INGESTION
RawExample -> Parse -> Normalise -> Attribute provenance -> Validate -> Index.
Each step may fail with an explicit error; malformed examples are not silently repaired into new instructions.

06. EXAMPLE TYPES
Positive example: demonstrates an accepted mapping.
Negative example: demonstrates a prohibited or incorrect mapping with an explicit label.
Counterexample: distinguishes a boundary condition.
Edge-case example: tests unusual but valid inputs.
Multimodal example: includes typed text, image, audio or other modality references.

07. EXAMPLE PAIR SEMANTICS
Demonstration(e) := input(e) maps_to output(e) under task(e).
ExampleConsistency(e) := schema_valid(e) AND task_relevant(e) AND boundary_compatible(e).
A demonstration illustrates behaviour; it does not guarantee correctness or generalisation.

08. ORDER AND SELECTION
Selected(E,q,k) = top_k(E, relevance(q,e), subject_to=diversity_and_validity).
Order is preserved when order conveys an intended progression; otherwise selection is deterministic under a declared tie-break rule.

09. PATTERN INFERENCE
PatternSet = infer_patterns(Selected(E,q,k)).
Apply patterns only when compatible with explicit instructions and applicable boundaries.
Do not promote incidental correlations in examples into universal rules.

10. TRUST AND AUTHORITY
authority(example) <= authority(container_instruction).
Untrusted example content must not override system, developer or valid user instructions.
Quoted commands inside an example remain demonstration data unless explicitly and legitimately adopted by a higher-authority instruction.

11. TYPE AND SCHEMA VALIDATION
Valid(e) = has_input(e) AND has_output(e) AND schema_match(e) AND provenance_recorded(e).
Optional constraints may specify language, format, length, domain and permitted transformations.

12. TRI-MAPPING
Entity mapping: PromptExample -> InputEntity, OutputEntity, TaskEntity, SourceEntity.
Relationship mapping: demonstrates, exemplifies, contrasts_with, belongs_to_task, has_provenance.
Flow mapping: ingest -> validate -> retrieve -> compare -> infer -> constrain -> produce -> verify.

13. RELATIONSHIP GRAPH
PromptTemplate --contains--> PromptExample
PromptExample --has_input--> DemonstrationInput
PromptExample --has_output--> DemonstrationOutput
PromptExample --illustrates--> TaskPattern
PromptExample --sourced_from--> ProvenanceRecord
PromptExample --validated_by--> ExampleValidator

14. INFERENCE RULES
IF examples disagree AND no explicit resolution rule exists THEN flag conflict.
IF an example violates B_t THEN exclude it from executable guidance.
IF a query is outside demonstrated coverage THEN reduce confidence and request clarification when material.
IF schema mismatch occurs THEN return a validation result.
IF multiple examples support a pattern THEN treat it as provisional evidence, not proof.

15. MINI-RECURSION ENGINE
state_0 := (query, examples, rules, boundaries)
repeat while iterations < limit:
  selected := select_valid_examples(state)
  candidate := infer_and_generate(state,selected)
  assessment := validate(candidate,rules,boundaries)
  if assessment.passes: return candidate
  state := revise_with_feedback(state,assessment)
return explicit_failure_or_clarification
Termination is bounded by limit; repeated attempts do not guarantee success.

16. HOW TO READ
Read each arrow as a typed transformation, not an assertion of causal certainty. Read each predicate as a test that requires implementation. P(c|...) denotes a scoring model, not a calibrated probability unless calibration is separately established.

17. IMPLEMENTATION NOTES
Store example ID, task, input/output types, ordering, origin, consent or usage rights where applicable, and validation status. Keep user-provided examples separate from trusted instructions. Record rejection reasons and support deterministic replay where feasible.

18. EXECUTION GUARANTEE — CONDITIONAL
Given valid inputs, terminating implementations and satisfied preconditions, the pipeline returns either a boundary-compliant candidate or an explicit failure state. It does not guarantee truth, accuracy, model compliance or successful generalisation.

19. AI SEARCH FLOW
FLOW_ID: SEMLIB.AI.PROMPT_EXAMPLE.001
VERSION: 1.0
PURPOSE: Discover and interpret the Prompt Example Ontology.
SOURCE: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/prompt-entities/prompt-example-ontology.html
CITATION_BACKLINK: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/prompt-entities/prompt-example-ontology.html
ENTITIES: PromptExample, DemonstrationInput, DemonstrationOutput, TaskPattern, ProvenanceRecord.
PATHWAYS: parse > validate > retrieve > compare > infer > constrain > verify.
SEMANTIC_EQUIVALENCE: prompt example; demonstration pair; in-context example; few-shot demonstration.
CONFIDENCE: conditional on provenance, coverage, schema validity and evaluation.
UPDATE_MODEL: version changes require provenance, date and change log.
FLOW_HASH: compute SHA-256 over canonical UTF-8 file bytes during publication; no fabricated hash supplied.

20. DIAGRAM
[Prompt examples] -> [Parse/normalise] -> [Validate/provenance]
                                             |
                                             v
[Request] -------------> [Select relevant examples]
                                             |
                                             v
                                    [Infer task pattern]
                                             |
                                             v
                                    [Apply boundaries]
                                             |
                                             v
                                    [Generate + verify]
                                             |
                              [Output] or [Explicit failure]

21. TEST CASES
T1: Valid pair, matching task -> eligible demonstration.
T2: Missing output -> schema validation failure.
T3: Conflicting outputs for same input -> conflict flag.
T4: Embedded malicious instruction -> treat as untrusted data.
T5: No relevant examples -> fall back to authorised task rules or ask for clarification.

22. LIMITATIONS
This is an independently authored Flow Algebra companion. The linked page was not transcribed or checked against its full embedded specification. Mathematical operators are design abstractions requiring concrete implementation and testing.
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ