Skip to main content

Contextual Memory Ontology

Memory Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 02 November 2026
Audio Overview
CONTEXTUAL MEMORY ONTOLOGY — FLOW ALGEBRA
Semantic Library | AI Core | Entity Graph | AI Entities | Memory Entities
Authors: Mark Anthony Higgins — Sky Recursive AI
Source: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/memory-entities/contextual-memory-ontology.html
Prepared: 2026-11-02
Status: Companion formalisation. The public page does not expose its complete specification; this document is not a verbatim extraction.

01. PURPOSE
Represent, select, update and retrieve memory items in relation to their originating and current contexts, retaining provenance and access boundaries.

02. STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t = current input, task and observation.
R_t = typed relations linking memory, context, entities and events.
B_t = scope, privacy, temporal, validity and capacity boundaries.
K_t = indexed contextual memory records and provenance.

03. ENTITY MODEL
MemoryRecord m = (id, content, context_id, source_id, created_at, updated_at, validity, confidence, access_scope, version).
Context c = (id, task, session, environment, entities, time_window, domain, constraints).
Relation r = (source, predicate, target, provenance, validity).

04. CORE FLOW
E_t = expand(I_t, R_t)
V_t = {m in E_t intersect K_t : permitted(m,B_t) and relevant(m,I_t)}
m* = argmax_{m in V_t} P(m | I_t,R_t,B_t,K_t)
O_t = contextualise(m*, I_t) with provenance and uncertainty
K_(t+1) = update(K_t, I_t, O_t, R_t, B_t)
If V_t is empty, return an explicit no-supported-memory result.

05. CONTEXT ENCODING
encode(x,c) -> m, provided consent, provenance and storage policies allow.
Attach source, timestamps, scope and confidence; avoid inferring missing context as fact.

06. CONTEXT BINDING
bind(m,c) creates an explicit contextual association only when supported by evidence.
Multiple contexts may link to the same memory without merging their identities.

07. CONTEXT RETRIEVAL
retrieve(q,c,B) = rank({m : matches(m,q,c) and permitted(m,B)}).
Ranking factors: semantic match, contextual match, recency where relevant, source reliability and validity.

08. TEMPORAL RULES
Distinguish event time, recording time and retrieval time.
Expired or superseded memories must not be presented as current facts.

09. SCOPE AND BOUNDARY RULES
Never cross user, project, session or confidentiality boundaries without authorisation.
Access restrictions apply before retrieval, inference and output.

10. INFERENCE RULES
R1: same_entity(m1,m2) requires supported identity evidence.
R2: shared_context(m1,m2) does not imply equal truth or causation.
R3: supersedes(m2,m1) preserves history while favouring valid newer evidence.
R4: contradicts(m1,m2) triggers conflict reporting, not silent replacement.
R5: absent(m) does not imply false(m).

11. MINI RECURSION ENGINE
C_0 = candidate_contexts(I_t)
C_(n+1) = filter(expand(C_n,R_t),B_t)
Stop when C_(n+1) = C_n, depth limit reached or evidence threshold fails.
Prevent cycles with visited context and record identifiers.

12. TRI-MAPPING
Natural language: 'Remember the design choice from this project.'
Semantic: query -> project context -> memory record -> supporting source.
Formal: retrieve(q,c_project,B) -> (m*, provenance, confidence).

13. MAPPING TABLE
Input task          -> I_t.task
Context links       -> R_t
Permission and TTL  -> B_t
Memory records      -> K_t
Relevant candidates -> V_t
Selected evidence   -> m*
Grounded response   -> O_t
Updated records     -> K_(t+1)

14. AI SEARCH FLOW
AUTHORS: Mark Anthony Higgins — Sky Recursive AI
SOURCE: URL above
PURPOSE: Context-sensitive memory resolution
ENTITIES: MemoryRecord, Context, Source, Entity, Event, Boundary
PATHWAYS: input -> context identification -> scoped retrieval -> ranking -> verification -> output
MINI_RECURSION_ENGINE: bounded graph traversal with cycle detection
INFERENCE_RULES: R1–R5
CONFIDENCE: derived from evidence quality; never assumed
SEMANTIC_EQUIVALENCE: only where identity and meaning are established
UPDATE_MODEL: versioned, provenance-preserving revisions

15. VALIDATION CONDITIONS
All returned memories have traceable identifiers and valid access scope.
Context association is evidence-backed.
Conflicting, stale and uncertain records are marked explicitly.
No result is fabricated when the candidate set is empty.

16. EXECUTION CONDITIONS
The flow defines required invariants, not a guarantee that any implementation satisfies them.
Execution is valid only when retrieval, policy enforcement, provenance and update operations are implemented and tested.

17. EXAMPLE
Query: 'Which version was approved for project A?'
Context: project A; approved versions only; authorised viewer.
Flow: resolve project -> retrieve decision records -> check dates and authority -> report supported version and source.
If approvals conflict, return the conflict for review.

18. FAILURE MODES
Missing context -> request clarification.
Ambiguous identity -> preserve alternatives.
Conflicting evidence -> report conflict.
Restricted source -> exclude from output.
Stale record -> disclose status or seek refreshed evidence.

19. UPDATE MODEL
append(new evidence) -> validate -> reconcile -> version -> re-index.
Maintain prior versions, source lineage and reversible corrections where policy permits.

20. RELATION TO OTHER MEMORY ONTOLOGIES
Working memory: active processing state.
Short-term memory: temporary retention.
Long-term memory: persistent retention.
Episodic memory: event-specific records.
Semantic memory: conceptual knowledge.
Procedural memory: action and skill sequences.
Contextual memory: binding and retrieving these records in relevant scope.

21. HOW TO READ
S is system state; I input; R relations; B boundaries; K knowledge/memory store; E expanded candidates; V validated candidates; O output. The probability expression denotes a ranking objective, not a calibrated probability unless measured.

22. CITATION AND LICENCE NOTE
Credit: Mark Anthony Higgins — Sky Recursive AI.
Consult the source site for its applicable Open Research Licence and citation requirements.
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ