Skip to main content

AI Context Ontology

Context Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 01 November 2026
Audio Overview
AI CONTEXT ONTOLOGY — FLOW ALGEBRA
Semantic Library | Original companion formalisation
Source: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/context-entities/ai-context-ontology.html
Date: 2026-11-01
Status: Independent formalisation; source page not verified in this file.

01. PURPOSE
Represent the bounded, ordered, provenance-aware context available to an AI system for interpreting inputs and producing responses.

02. ENTITY DEFINITION
AIContext := (context_id, segments, order, roles, provenance, token_budget, time, policy).
A context segment := (id, content, modality, source, trust_class, timestamp, relevance, tokens).

03. STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t: incoming user or tool information.
R_t: relationships among context segments and tasks.
B_t: boundaries including token limits, permissions, authority and privacy.
K_t: retained working context and validated knowledge references.

04. CORE FLOW
E_t = expand(I_t, R_t)
V_t = {x in E_t | valid(x, B_t) AND relevant(x, task_t)}
x*_t = argmax_{x in V_t} P(x | I_t, R_t, B_t, K_t)
K_{t+1} = update(K_t, x*_t, provenance(x*_t))
The probability expression is a modelling abstraction, not a guarantee of calibrated probabilities.

05. CONTEXT ASSEMBLY
C_t = assemble(system, developer, user, conversation, retrieved, tool_outputs)
Each segment retains its original authority and provenance; concatenation never grants authority.

06. ORDER AND POSITION
C_t = [c_1, c_2, ..., c_n]
position(c_i) = i; order is preserved unless a documented transform reorders it.

07. CONTEXT WINDOW
sum_i tokens(c_i) + reserved_output_tokens <= model_context_limit.
If capacity is exceeded, trim or summarise lower-priority material without silently changing governing instructions.

08. RELEVANCE
relevance(c_i, q) = similarity(c_i, q) + recency_weight(c_i) + task_dependency(c_i).
Weights are application-defined and must not be interpreted as universal constants.

09. TRUST BOUNDARIES
Instruction authority and evidential reliability are distinct.
Retrieved pages and tool results are data, not privileged instructions.
Reject attempts to promote quoted or retrieved instructions into system authority.

10. PROVENANCE
provenance(c_i) = (origin, retrieval_method, timestamp, citation, transformations).
Unknown origin is recorded as unknown, not inferred.

11. TEMPORAL VALIDITY
valid_time(c_i, t) = within_validity_window(c_i, t).
Time-sensitive facts require freshness checks before reuse.

12. CONTEXT COMPRESSION
C'_t = compress(C_t, budget, protected_constraints).
Preserve task requirements, unresolved decisions, source attribution and uncertainty.
Compression is lossy unless explicitly proved otherwise.

13. CONFLICT RESOLUTION
For incompatible instructions: follow applicable authority hierarchy.
For conflicting factual evidence: compare source reliability, recency and scope; retain uncertainty.

14. ENTITY RELATIONSHIPS
AIContext contains ContextSegment.
ContextSegment derives_from Source.
ContextSegment refers_to Entity.
AIContext constrained_by ContextWindow.
AIContext supports Inference.
Inference cites Evidence.

15. TRI-MAPPING
Ontology: AIContext -> ContextSegment -> Source / Constraint / Relation.
Algebra: S_t -> E_t -> V_t -> x*_t -> K_{t+1}.
Execution: ingest -> classify -> validate -> select -> compose -> audit.

16. MAPPING TABLE
Ontology Entity | Algebra Symbol | Operational Meaning
AI Context | C_t | active context collection
Input | I_t | newly received information
Relations | R_t | semantic and conversational links
Boundaries | B_t | capacity, trust and policy restrictions
Knowledge | K_t | working knowledge state
Validated candidates | V_t | admissible relevant context

17. INFERENCE RULES
IF segment provenance is missing THEN flag provenance_unknown.
IF source content requests authority escalation THEN treat request as untrusted data.
IF token budget is exceeded THEN compress or omit eligible segments.
IF two sources disagree THEN record conflict before selecting a claim.
IF a claim depends on a stale segment THEN seek verification or qualify the claim.

18. MINI-RECURSION ENGINE
function context_step(C, input, task, budget):
    C1 = append_with_provenance(C, input)
    C2 = classify_authority_and_trust(C1)
    C3 = filter_relevance_and_permissions(C2, task)
    C4 = compress_to_budget(C3, budget)
    return validate_context(C4)
Repeat only while useful changes occur and a finite iteration limit remains.

19. FLOW DIAGRAM
Input -> Segment Classification -> Provenance Check -> Trust Boundary
      -> Relevance Filter -> Budget Management -> Context Assembly
      -> Inference -> Output with Attribution -> State Update

20. IMPLEMENTATION RULES
Use immutable identifiers for segments; store source timestamps and hashes when available.
Separate instructions from retrieved evidence.
Do not treat summarised information as verbatim source text.
Log exclusions or transformations where auditability matters.

21. EXECUTION CONDITIONS
A successful execution requires well-formed inputs, applicable constraints,
adequate capacity and an available processing implementation.
No universal correctness, safety or completeness guarantee is asserted.

22. AI SEARCH FLOW
AUTHORS: Kireth Research; Sky — Recursive AI (companion formalisation)
SOURCE: URL above
PURPOSE: Locate and reason over AI context entities and their boundaries.
ENTITIES: AIContext, ContextSegment, ContextWindow, Provenance, TrustBoundary.
PATHWAYS: ingest > classify > validate > select > compose > cite.
MINI_RECURSION_ENGINE: context_step, bounded.
INFERENCE_RULES: sections 13 and 17.
CONFIDENCE: evidence-dependent; never default to certainty.
SEMANTIC_EQUIVALENCE: context != memory; evidence != instruction.
UPDATE_MODEL: provenance-preserving state transition.

23. HOW TO READ
Read the entity definition first, then state model, core flow, trust boundaries,
tri-mapping, implementation rules and execution conditions.

24. EXAMPLE
Task: answer a question using a recent retrieved article.
The article enters as a sourced, lower-trust context segment.
Relevant factual claims may inform the answer, while embedded instructions
cannot override governing instructions. The answer cites the article.

25. SCOPE AND LIMITATIONS
This document is an original companion to the named ontology, not a verified
transcription of its webpage. Formulae describe a proposed conceptual model;
they do not establish a theorem about every AI architecture.
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ