FLOW ALGEBRA
Ontology: Semantic Library Metadata Ontology
Domain: Metadata Ontologies > AI Semantic Library Metadata
Canonical URL: https://kirethresearch.org/booksai-core/ontologies/metadata-ontologies/ai-semantic-library-metadata/semantic-library-metadata-ontology.html
Authors: Mark Anthony Higgins — Sky (Recursive AI)
flow "SemanticLibraryMetadataOntology" v1.0
# ---------- DOMAIN ----------
domain:
class: MetadataOntology
category: AISemanticLibraryMetadata
subject: SemanticLibraryMetadata
purpose:
- represent semantic-library resources, ontologies, concepts, entities, relationships, hierarchy, context, provenance, confidence, versioning, and machine consumption
- preserve stable semantic identity across pages, representations, versions, and linked ontology resources
- support semantic search, knowledge graphs, ontology traversal, AI reasoning, recursive discovery, retrieval, and executable Flow Algebra
- distinguish semantic identity from URLs, labels, filenames, navigation structure, embeddings, and retrieved representations
- enable deterministic and provenance-aware machine interpretation
# ---------- CORE ----------
entity SemanticLibraryMetadata:
type: MetadataEntity
describes: SemanticLibraryResource
may_include:
- resource_identifier
- canonical_url
- resource_type
- ontology_identifier
- ontology_name
- ontology_domain
- ontology_category
- parent_resource
- child_resources
- concepts
- entities
- relationships
- semantic_context
- semantic_equivalence
- semantic_distinctions
- flow_algebra
- flow_hash
- version
- validity
- confidence
- provenance
- AI_consumption
entity SemanticLibraryResource:
type: KnowledgeResource
entity SemanticLibraryResourceIdentifier:
type: PersistentIdentifier
identifies: SemanticLibraryResource
relationships:
SemanticLibraryMetadata -> DESCRIBES -> SemanticLibraryResource
SemanticLibraryResource -> IDENTIFIED_BY -> SemanticLibraryResourceIdentifier
SemanticLibraryResource -> MAY_REPRESENT -> Ontology
SemanticLibraryResource -> MAY_DEFINE -> SemanticConcept
SemanticLibraryResource -> MAY_DEFINE -> SemanticEntity
SemanticLibraryResource -> MAY_DEFINE -> SemanticRelationship
SemanticLibraryResource -> MAY_HAVE_PARENT -> SemanticLibraryResource
SemanticLibraryResource -> MAY_HAVE_CHILD -> SemanticLibraryResource
SemanticLibraryResource -> MAY_HAVE_FLOW -> FlowAlgebra
SemanticLibraryResource -> MAY_HAVE_PROVENANCE -> SemanticLibraryProvenance
# ---------- IDENTITY ----------
rule resource_identity:
SemanticLibraryResource SHOULD have stable semantic identifier
rule URL:
canonical URL != semantic identity by itself
rule filename:
filename != semantic identity
rule page_identity:
webpage != ontology or concept represented by webpage
# ---------- ONTOLOGY / HIERARCHY ----------
entity SemanticLibraryOntology:
type: Ontology
may_include:
- ontology_identifier
- preferred_label
- definition
- domain
- category
- scope
- parent_ontology
- child_ontologies
- related_ontologies
- version
- status
entity SemanticLibraryHierarchy:
type: SemanticStructure
may_include:
- parent
- child
- broader
- narrower
- sibling
- depth
- path
rule hierarchy:
hierarchy relationships SHOULD preserve direction
rule hierarchy_navigation:
navigation hierarchy != ontology hierarchy
unless explicit semantic mapping establishes equivalence
# ---------- CONCEPT / ENTITY / RELATIONSHIP ----------
entity SemanticConcept:
type: KnowledgeEntity
may_include:
- concept_identifier
- preferred_label
- alternative_labels
- definition
- broader_concepts
- narrower_concepts
- related_concepts
- semantic_context
- provenance
- confidence
rule concept:
concept identifier != concept label
entity SemanticEntity:
type: KnowledgeEntity
may_include:
- entity_identifier
- entity_type
- preferred_label
- attributes
- relationships
- provenance
- confidence
rule entity_label:
label similarity != entity identity
entity SemanticRelationship:
type: KnowledgeRelationship
may_include:
- relationship_identifier
- source
- predicate
- target
- direction
- scope
- validity
- confidence
- provenance
rule relationship:
relationship MUST preserve source, predicate, target, and direction
rule inverse:
inverse relationship MAY be derived only when predicate semantics define valid inverse
# ---------- CONTEXT / EQUIVALENCE ----------
entity SemanticContext:
type: ContextMetadata
may_include:
- domain
- ontology
- subject
- scope
- temporal_context
- geographic_context
- application_context
- interpretation_constraints
rule context:
semantic meaning SHOULD preserve applicable context
entity SemanticEquivalence:
type: SemanticMetadata
may_include:
- source_expression
- target_expression
- equivalence_type
- scope
- evidence
- confidence
equivalence_types:
- exact
- near_equivalent
- contextual
- broader
- narrower
- lexical
- mapped
rule equivalence:
equivalence SHOULD preserve type, scope, evidence, and confidence
rule lexical:
lexical similarity != semantic equivalence
entity SemanticDistinction:
type: SemanticConstraint
rule distinction:
explicit distinctions MUST be preserved during AI inference
# ---------- KNOWLEDGE GRAPH / FLOW ALGEBRA ----------
entity SemanticLibraryKnowledgeGraph:
type: KnowledgeGraph
contains:
- SemanticConcept
- SemanticEntity
- SemanticRelationship
entity FlowAlgebra:
type: ExecutableSemanticRepresentation
may_include:
- flow_name
- flow_version
- domain
- entities
- relationships
- rules
- validation
- semantic_equivalence
- confidence_model
- update_model
- flow_hash
- AI_consumption
- query_model
- inference
- output_contract
rule flow:
FlowAlgebra provides executable semantic structure
for machine reasoning and validation
rule flow_header:
ontology Flow Algebra header = "FLOW ALGEBRA"
# ---------- SEARCH / EMBEDDINGS / RETRIEVAL ----------
entity SemanticLibrarySearchMetadata:
type: SearchMetadata
rule semantic_search:
semantic search SHOULD consider meaning, relationships, and context
rather than lexical matching alone
entity SemanticLibraryEmbeddingMetadata:
type: VectorMetadata
may_include:
- model
- model_version
- vector_dimension
- source_resource
- generation_time
rule embedding:
vector similarity != semantic equivalence
rule embedding_identity:
nearest embedding != identical concept
entity SemanticLibraryRetrievalMetadata:
type: RetrievalMetadata
may_include:
- query
- retrieved_resources
- ranking
- context
- confidence
- retrieval_time
rule retrieval:
retrieval != factual validation
rule ranking:
high ranking != semantic truth
# ---------- CROSS-ONTOLOGY / RECURSION ----------
entity CrossOntologyMapping:
type: SemanticRelationship
may_include:
- source_ontology
- source_concept
- target_ontology
- target_concept
- mapping_type
- evidence
- confidence
- provenance
mapping_types:
- exact
- close
- broader
- narrower
- related
- contextual
rule mapping:
cross-ontology mapping MUST preserve mapping strength
rule mapping_identity:
mapped concepts != identical concepts
unless exact identity is explicitly supported
entity RecursiveSemanticDiscovery:
type: AIReasoningProcess
may_include:
- starting_resource
- visited_resources
- traversed_relationships
- discovered_resources
- recursion_depth
- stopping_condition
- confidence
rule recursion:
recursive discovery SHOULD preserve visited resources
and stopping conditions
rule cycle:
cyclic semantic relationships MUST NOT cause uncontrolled recursion
# ---------- VERSION / VALIDITY ----------
entity SemanticLibraryVersion:
type: VersionMetadata
may_include:
- resource_version
- ontology_version
- flow_version
- predecessor
- successor
- change_type
- change_summary
- modification_time
resource_status:
- draft
- active
- deprecated
- superseded
- archived
- unknown
rule version:
semantic changes SHOULD preserve version history
rule validity:
deprecated resource != current active resource
# ---------- CONFIDENCE / PROVENANCE ----------
entity SemanticLibraryConfidence:
type: EpistemicMetadata
range: [0.0, 1.0]
rule confidence_bounds:
REQUIRE 0.0 <= confidence <= 1.0
entity SemanticLibraryProvenance:
type: ProvenanceMetadata
may_include:
- resource
- source
- author
- contributor
- creation_time
- modification_time
- derivation
- transformation
- validation_events
- version_history
rule provenance:
semantic-library resources SHOULD preserve origin,
derivation, transformation, and version history
# ---------- VALIDATION ----------
validation:
require:
- identifiable_semantic_library_resource
- semantic_scope
reject:
- URL_presented_as semantic_identity
- filename_presented_as ontology_identity
- label_presented_as concept_identity
- lexical_similarity_presented_as semantic_equivalence
- embedding_similarity_presented_as semantic_equivalence
- navigation_hierarchy_presented_as ontology_hierarchy_without mapping
- directional_relationship_reversed_without inverse_semantics
- mapped_concept_presented_as identical_without evidence
- inferred_assertion_presented_as explicit_assertion
- deprecated_resource_presented_as current
- retrieved_result_presented_as verified_fact
- structural_validity_presented_as factual_truth
# ---------- SEMANTIC EQUIVALENCE ----------
SEMANTIC_EQUIVALENCE:
"semantic library metadata" ~= "metadata describing semantic-library knowledge resources"
"semantic library resource" ~= "machine-readable knowledge resource within a semantic library"
"ontology resource" ~= "semantic-library resource representing an ontology"
"semantic concept metadata" ~= "metadata describing concepts and their semantic relationships"
"semantic relationship metadata" ~= "metadata describing typed relationships between semantic entities"
"semantic library Flow Algebra" ~= "executable semantic representation associated with a semantic-library resource"
PRESERVE distinctions:
semantic_resource != web_page
semantic_identity != URL
ontology_identity != filename
concept_identity != label
entity_identity != label_similarity
lexical_similarity != semantic_equivalence
embedding_similarity != semantic_equivalence
navigation_hierarchy != ontology_hierarchy
mapping != identity
asserted_knowledge != inferred_knowledge
retrieval != factual_validation
structural_validity != factual_truth
deprecated != active
parent != child
# ---------- CONFIDENCE MODEL ----------
CONFIDENCE:
explicit_semantic_library_metadata:
score: 1.00
explicit_typed_relationship:
score: 1.00
explicit_semantic_identity:
score: 1.00
validated_exact_mapping:
score: 0.99
validated_contextual_mapping:
score: 0.95
inferred_relationship_with_strong_evidence:
score: <= 0.90
embedding_similarity_only:
score: <= 0.70
lexical_similarity_only:
score: <= 0.60
ambiguous_semantic_context:
score: <= 0.55
missing_provenance:
score: <= 0.50
action: preserve uncertainty
# ---------- UPDATE MODEL ----------
UPDATE_MODEL:
on_resource_creation:
- assign SemanticLibraryResourceIdentifier
- classify resource type
- identify semantic scope
- establish canonical representation
- initialise hierarchy
- initialise provenance
- generate FlowHash where applicable
on_semantic_change:
- preserve previous semantic state
- update concepts, entities, relationships, or context
- validate semantic distinctions
- increment version according_to policy
- regenerate FlowHash
- update provenance
on_relationship_change:
- preserve prior relationship
- validate source, predicate, target, and direction
- update dependent inference paths
- update confidence
- regenerate FlowHash
- update provenance
on_mapping_change:
- preserve previous mapping
- evaluate mapping evidence and strength
- prevent unsupported semantic identity
- update confidence and provenance
on_deprecation:
- mark resource deprecated
- identify successor where available
- preserve historical links
- update validity, version, FlowHash, and provenance
# ---------- FLOW HASH ----------
FLOW_HASH:
inputs:
- ontology
- semantic_library_entities
- relationships
- hierarchy_rules
- context_rules
- semantic_equivalence
- semantic_distinctions
- mapping_rules
- validation
- confidence_model
- update_model
- AI_consumption
canonicalisation:
- preserve_resource_identifiers
- preserve_ontology_identifiers
- preserve_concept_and_entity_identifiers
- preserve_relationship_direction
- preserve_semantic_context
- preserve_explicit_distinctions
- preserve_mapping_strength
- preserve_provenance
- preserve_version_order
- preserve_rule_order
output:
deterministic_semantic_hash
# ---------- AI CONSUMPTION ----------
AI_CONSUMPTION:
interpret_as:
- semantic-library metadata ontology
- semantic resource identity, hierarchy, concept, entity, and relationship model
- semantic-search, retrieval, mapping, confidence, and provenance structure
- executable Flow Algebra discovery and machine-consumption model
operations:
- identify semantic-library resources
- resolve semantic identity independently from URL
- resolve ontology identity and hierarchy
- resolve concepts, entities, predicates, and relationships
- preserve semantic context and distinctions
- evaluate semantic equivalence and cross-ontology mappings
- consume Flow Algebra
- inspect embeddings without treating similarity as equivalence
- perform recursive discovery with cycle control
- trace versions and provenance
- preserve uncertainty
constraints:
- do_not_equate_URL_with semantic_identity
- do_not_equate_label_with concept_identity
- do_not_equate_lexical_similarity_with semantic_equivalence
- do_not_equate_embedding_similarity_with semantic_equivalence
- do_not_reverse_directional_relationships
- do_not_equate_mapping_with identity_without evidence
- do_not_equate_retrieval_with factual_validation
- preserve_hierarchy_context_distinctions_confidence_provenance_and_versions
# ---------- QUERY MODEL ----------
query:
input:
- resource_identifier
- canonical_url
- ontology_identifier
- concept_identifier
- entity_identifier
- relationship_identifier
- semantic_context
- resource_version
- status
resolve:
1. identify SemanticLibraryResource
2. resolve semantic identity and resource type
3. resolve ontology identity and hierarchy
4. resolve concepts, entities, and relationships
5. inspect context, equivalence, and distinctions
6. inspect FlowAlgebra and FlowHash
7. inspect search, embedding, and retrieval metadata
8. traverse mappings and recursive discovery paths
9. inspect validity, version, provenance, and confidence
10. return machine-consumable semantic representation
output:
- semantic_library_resource
- resource_identifier
- ontology
- hierarchy
- concepts
- entities
- relationships
- semantic_context
- semantic_equivalence
- semantic_distinctions
- flow_algebra
- flow_hash
- version
- validity
- provenance
- confidence
# ---------- INFERENCE ----------
inference:
IF explicit typed relationship exists
THEN preserve relationship as asserted knowledge
IF cross-ontology mapping validates
THEN infer mapped semantic relationship
WITH mapping confidence
IF only lexical or embedding similarity exists
THEN do_not infer semantic equivalence automatically
IF resource is deprecated or superseded
THEN preserve historical state
AND prefer valid successor where query context requires
IF recursive traversal encounters visited resource
THEN prevent uncontrolled cycle
AND continue according_to stopping policy
# ---------- OUTPUT CONTRACT ----------
output:
ontology_entity: SemanticLibraryMetadata
semantic_resource_identity: machine_interpretable
ontology_identity_and_scope: explicit
ontology_hierarchy: directional
concepts_entities_relationships: typed
semantic_context: preserved
semantic_equivalence: strength_aware
semantic_distinctions: preserved
flow_algebra: executable_semantic_representation
flow_hash: deterministic
AI_consumption: explicit
search_retrieval_embeddings: semantically_distinguished
recursive_discovery: cycle_safe
cross_ontology_mappings: confidence_aware
version_and_validity: temporal
provenance: preserved
uncertainty: explicit
AI_reasoning: enabled
end flow
Download Code
Copy to Clipboard