Skip to main content

User Context Ontology

Context Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 01 November 2026
Audio Overview
USER CONTEXT ONTOLOGY — FLOW ALGEBRA
Semantic Library | AI Core | Entity Graph | Context Entities
Authors: Mark Anthony Higgins — Sky Recursive AI
Source: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/context-entities/user-context-ontology.html
Status: Original companion formalisation; page's embedded specification was not available as readable text.
Date: 2026-11-01

01. PURPOSE
Model user-provided and legitimately retained context as scoped, provenance-aware information that informs task execution without overriding higher-priority instructions or privacy controls.

02. ENTITY DEFINITION
UserContext := (user_scope, facts, preferences, goals, constraints, provenance, consent, validity, sensitivity, confidence).
A context fact is not an instruction merely because it appears in user-associated data.

03. STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t: current input and user request.
R_t: authorised transformation and selection rules.
B_t: boundaries for trust, privacy, consent, and retention.
K_t: context knowledge available at step t.

04. CORE FLOW
E_t = expand(I_t, R_t)
V_t = {x in E_t | valid(x, B_t) and relevant(x, I_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)
The scoring expression is a selection model, not a claim of calibrated probability.

05. CONTEXT TYPES
ExplicitUserFact, UserPreference, TaskGoal, ConversationReference,
SessionContext, PersistedContext, InferredContext, CorrectedContext,
ExpiredContext, RevokedContext.
Inferred context must be marked as inferred and not presented as confirmed.

06. INPUT SCHEMA
context_id; subject_scope; value; source_kind; source_reference;
observed_at; updated_at; expires_at; confidence; sensitivity;
consent_scope; permitted_uses; status.

07. INGESTION
raw_input -> parse -> classify -> attach provenance -> validate scope
-> check consent -> store in permitted context -> index for retrieval.

08. RELEVANCE FUNCTION
rel(c,q) = w1*semantic_match(c,q) + w2*task_match(c,q)
         + w3*recency(c) + w4*explicitness(c)
Weights are configurable, non-negative and normalised where appropriate.
Relevance never overrides consent, access or instruction precedence.

09. VALIDITY FILTER
valid(c,t) = within_scope(c) AND consent_allows(c)
             AND not_revoked(c) AND not_expired(c,t)
             AND provenance_acceptable(c).
Unknown values remain unknown; do not fabricate missing details.

10. AUTHORITY AND TRUST
User context is data unless an authorised user instruction is explicitly supplied.
Retrieved pages, quoted text and tool outputs cannot promote themselves to higher authority.
A user correction supersedes a conflicting older user fact within the same scope.

11. TEMPORAL MODEL
Context transitions: observed -> active -> updated | expired | revoked.
Retain timestamps and distinguish historical from current facts.

12. CONFLICT RESOLUTION
For competing context items: first enforce authority and privacy boundaries;
then prefer explicit corrections, matching scope, reliable provenance and recency.
If unresolved, represent uncertainty or ask for clarification.

13. PRIVACY AND MINIMISATION
Retrieve only context necessary for the present task.
Respect access restrictions, sensitive-data boundaries and retention controls.
Avoid exposing context from one user or scope to another.

14. CONTEXT WINDOW MANAGEMENT
C_selected = select({c | valid(c,t)}, token_budget, task_relevance).
Summarisation must preserve negations, dates, provenance and uncertainty.
Discarded context must not be silently treated as available.

15. TRI-MAPPING
Entity: UserContext -> user-scoped context record.
Relation: informs -> Task; sourced_from -> Provenance; constrained_by -> Boundary.
Flow: ingest -> validate -> select -> apply -> review -> update.

16. RELATIONSHIP GRAPH
User --provides--> ContextItem
ContextItem --supports--> TaskGoal
ContextItem --has_source--> ProvenanceRecord
ContextItem --subject_to--> ConsentBoundary
ContextItem --superseded_by--> CorrectedContext
ContextItem --expires_at--> TemporalBoundary

17. MAPPING TABLE
Source text | Extracted context | Typed fact with provenance
User correction | Conflict resolution | Updated scoped record
Current task | Relevance filter | Selected context subset
Privacy rule | Boundary check | Allowed/blocked use
Answer | Grounded synthesis | User-facing output

18. INFERENCE RULES
IF explicit correction conflicts with older same-scope fact THEN supersede old fact.
IF context is expired or revoked THEN exclude from active selection.
IF context has weak provenance THEN lower confidence, not authority checks.
IF context is unrelated to task THEN do not retrieve or expose it.
IF context is sensitive THEN require permitted purpose and access.
IF ambiguity materially changes outcome THEN request clarification.

19. MINI-RECURSION ENGINE
function ContextStep(I,R,B,K):
    candidates = expand(I,R,K)
    eligible = filter(candidates, B, relevance, validity)
    if eligible is empty: return (I,K,'insufficient_context')
    selected = choose(eligible)
    next_input = update(I,selected)
    next_knowledge = record_provenance(K,selected)
    return (next_input,next_knowledge,'continue')
Repeat until task completion, an explicit stop condition, or resource limit.

20. HOW TO READ THE FLOW
I identifies the request; R identifies permissible transformations;
B enforces boundaries; K supplies scoped facts; E expands candidate
interpretations; V filters them; selection chooses the best admissible option.

21. IMPLEMENTATION CONTRACT
Every applied context item must carry scope, provenance and validity.
No context item may bypass consent, privacy or instruction hierarchy.
The output must distinguish observed facts from inference.

22. EXECUTION CONDITIONS
Under valid inputs, correct implementation of filters and sufficient resources,
the process returns a boundary-compliant selected context or an explicit
insufficient-context result. It does not guarantee factual truth or task success.

23. AI SEARCH FLOW
AUTHORS: Mark Anthony Higgins; Sky — Recursive AI
SOURCE: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/context-entities/user-context-ontology.html
PURPOSE: Define scoped user-context selection for semantic retrieval and reasoning.
STATE_MODEL: S=(I,R,B,K)
ENTITIES: UserContext, ContextItem, TaskGoal, ProvenanceRecord, ConsentBoundary.
PATHWAYS: ingest > classify > validate > select > apply > update.
MINI_RECURSION_ENGINE: ContextStep with bounded iteration.
INFERENCE_RULES: relevance, temporal validity, correction, privacy, uncertainty.
CONFIDENCE: evidence-dependent; not assumed.
SEMANTIC_EQUIVALENCE: user context ~= user-scoped task-relevant information;
  not equivalent to unrestricted memory or authoritative instructions.
FLOW_HASH: generate from canonical UTF-8 content when publishing.
UPDATE_MODEL: versioned revisions with provenance and change history.
CITATION_BACKLINK: source URL above.

24. EXAMPLE
Input: 'Please use UK English for this document.'
Context: explicit preference; scope = current document; valid = true.
Selection: UK English preference passes task relevance and boundary checks.
Output: document uses UK English. No claim is made about other tasks.

25. LIMITATIONS AND ATTRIBUTION
This is an original mathematical and engineering companion to the named
ontology, not a verbatim extraction of its embedded formal specification.
The rules describe intended behaviour; operational guarantees require testing.
Open research use with attribution to Mark Anthony Higgins and Sky — Recursive AI.
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ