Skip to main content

Knowledge Graph Result Ontology

Ontology and Knowledge-Graph Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 05 November 2026
Audio Overview
KNOWLEDGE GRAPH RESULT ONTOLOGY — FLOW ALGEBRA
Semantic Library | Ontology and Knowledge-Graph Entities
Authors: Mark Anthony Higgins — Sky Recursive AI
Source: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/ontology-and-knowledge-graph-entities/knowledge-graph-result-ontology.html
Formalisation: original interpretative extension; not a verbatim extraction of embedded page code.
Date: 05 November 2026

1. PURPOSE
Represent the result of executing a query over a versioned knowledge graph, preserving its bindings, provenance, validation status, evidence, and execution context. Distinguish a result entity from a query, a triple, a path, and the graph itself.

2. ENTITY DEFINITIONS
KG = (N,E,T,Schema,Version): knowledge graph with nodes, edges, triples, schema and version.
Q = (query_id, pattern, filters, projection, ordering, limit, context): query.
R = (result_id, query_id, graph_version, rows, status, evidence, metadata): knowledge graph result.
Row = (binding_map, matched_triples, provenance): one answer binding.
Binding = variable -> RDF term / graph entity / literal.
Evidence = (source_ids, matched_paths, confidence, verification_status).
Status in {pending, running, complete, empty, partial, invalid, failed}.
Metadata includes timestamps, query engine, duration, result count and pagination.

3. FORMAL STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t: query, graph snapshot, request context and prior result state.
R_t: matching, projection, validation, ranking and provenance rules.
B_t: permissions, schema, query limits, time budget and trust boundaries.
K_t: graph facts, indexes, ontology axioms and evidence catalogue.

Expand: E_t = expand(I_t, R_t)
Validate: V_t = {x in E_t | satisfies(x, B_t) AND supported(x, K_t)}
Select: x*_t = argmax[x in V_t] P(x | I_t, R_t, B_t, K_t)
Update: I_(t+1) = update(I_t, x*_t, observed_outcome_t)
If V_t is empty, return a typed empty/invalid/failed result with diagnostic evidence, not a fabricated binding.
P is a modelled ranking score; it is not a calibrated probability without empirical calibration.

4. FLOW ALGEBRA
F_result = CaptureQuery >> FixSnapshot >> Authorise >> Match >> Filter >> Project >> Deduplicate >> Rank >> Validate >> AttachProvenance >> PackageResult
Each operator accepts typed input and emits typed output or an explicit error state.
CaptureQuery(Q) -> query request.
FixSnapshot(KG,v) -> immutable evaluation snapshot v.
Authorise(Q,B) -> permitted scope or denied status.
Match(Q,KG_v) -> candidate bindings.
Filter(C,Q.filters) -> admissible bindings.
Project(C,Q.projection) -> projected rows.
Deduplicate(C) -> set semantics where requested; retain multiplicity for bag semantics.
Rank(C,Q.ordering) -> ordered rows with stable tie-breaking.
Validate(C,Schema,B) -> valid rows plus diagnostics.
AttachProvenance(C,KG_v) -> source triples, graph version and derivation records.
PackageResult(C) -> R.

5. INFERENCE RULES
R1: query_valid(Q) AND graph_accessible(KG_v) -> executable(Q,KG_v).
R2: matches(binding,Q.pattern,KG_v) AND passes_filters(binding,Q) -> candidate_row(binding).
R3: candidate_row(b) AND permitted(b,B) AND schema_valid(b) -> accepted_row(b).
R4: accepted_row(b) AND traceable(b,KG_v) -> evidenced_row(b,provenance(b)).
R5: no_accepted_rows AND execution_successful -> status(empty).
R6: execution_incomplete AND partial_rows_exist -> status(partial), with incomplete=true.
R7: missing_permission OR violated_boundary -> status(invalid), with reason recorded.
R8: engine_failure -> status(failed), with diagnostic code.
R9: graph_version_changed -> new evaluation required for freshness-sensitive results.
R10: inferred_row(b) -> include inference rule IDs and premises in provenance.

6. TRI-MAPPING
Semantic mapping: question -> graph concepts, relationships and intended answer meaning.
Structural mapping: query variables -> nodes, edges, triples, paths, schema and result rows.
Operational mapping: query plan -> graph traversal -> filter -> validate -> return.
Consistency condition: semantic intent, structural bindings and operational result must agree within declared scope.

7. RECURSIVE RESOLUTION ENGINE
resolve(Q,KG_v,B,depth,visited):
  if depth > max_depth: return partial result with depth_limit reason
  if (Q,KG_v) in visited: return cycle-safe cached result or cycle diagnostic
  validate Q and permissions
  evaluate direct matches
  for each allowed inferred relation:
      resolve required subquery using depth+1 and updated visited set
      merge only evidence-backed bindings
  validate merged rows and provenance
  return typed result
Termination depends on finite limits, cycle detection, and bounded query expansion.

8. RELATIONSHIP MAPPING TABLE
Knowledge Graph Result -> producedBy -> Knowledge Graph Query
Knowledge Graph Result -> evaluatedAgainst -> Knowledge Graph Version
Knowledge Graph Result -> contains -> Result Row
Result Row -> binds -> Knowledge Graph Node / Literal
Result Row -> supportedBy -> Knowledge Graph Triple
Result Row -> traverses -> Knowledge Graph Path
Knowledge Graph Result -> conformsTo -> Knowledge Graph Schema
Knowledge Graph Result -> records -> Semantic Evidence Entity
Knowledge Graph Result -> carries -> Semantic Confidence Entity
Knowledge Graph Result -> derivedUsing -> Ontology Rule Entity

9. FLOW DIAGRAM
[Query]
   |
   v
[Snapshot + Permissions] -- denied --> [Invalid Result]
   |
   v
[Match / Traverse / Infer]
   |
   v
[Filter + Project + Deduplicate]
   |
   v
[Schema + Boundary Validation] -- rejected --> [Diagnostics]
   |
   v
[Provenance + Ranking]
   |
   v
[Typed Result: complete | empty | partial | failed]
   |
   v
[Audit / Cache / Optional Recursive Refinement]

10. CONDITIONAL EXECUTION GUARANTEE
Given a fixed graph snapshot, deterministic query semantics, authorised access, finite evaluation bounds and correctly implemented operators, the flow returns either (a) bindings consistent with the specified query and graph snapshot or (b) a typed non-success state. It does not guarantee graph truth, evidence completeness, semantic correctness of external data, or termination without the stated bounds.

11. AI SEARCH FLOW
FLOW_ID: KG_RESULT_2026_11_05
FLOW_VERSION: 1.0
ENTITY: KnowledgeGraphResult
SOURCE: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/ontology-and-knowledge-graph-entities/knowledge-graph-result-ontology.html
CITATION_BACKLINK: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/ontology-and-knowledge-graph-entities/knowledge-graph-result-ontology.html
AUTHORS: Mark Anthony Higgins; Sky — Recursive AI
PURPOSE: Evidence-backed representation of graph-query outputs.
STATE_MODEL: S=(I,R,B,K)
ENTITIES: KnowledgeGraph; KnowledgeGraphQuery; KnowledgeGraphResult; ResultRow; Binding; Triple; Path; Schema; Evidence; GraphVersion
PATHWAYS: Query > Snapshot > Authorise > Match > Filter > Project > Validate > Provenance > Result
MINI_RECURSION_ENGINE: bounded inference and subquery expansion with cycle detection
INFERENCE_RULES: R1-R10 above
CONFIDENCE: Record provenance and calibrated score when available; never assume certainty.
SEMANTIC_EQUIVALENCE: Equivalent answers require compatible query meaning, graph version, projection, and binding semantics.
FLOW_HASH: compute cryptographic digest after publication; not preassigned.
UPDATE_MODEL: re-evaluate after relevant graph, schema, rule or permission changes.

12. HOW TO READ AND IMPLEMENT
Read >> as ordered composition. Treat every result status as a typed outcome. Implement graph version pinning, parameterised query execution, access checks, provenance storage and audit records. Distinguish empty success from failure and partial results. Preserve reproducibility by recording query text/ID, graph version and rule versions.

13. EXAMPLE (ILLUSTRATIVE)
Query: Find all concepts relatedTo a specified concept X.
Match: (X, relatedTo, ?Y).
Result: rows binding ?Y to permitted graph entities, each linked to its supporting triple and snapshot version.
If no rows match, return status=empty rather than inventing a relationship.

LICENCE NOTE
Prepared as an original research companion for the cited Kireth Research ontology. Follow the applicable Open Research Licence and citation terms on the source site.
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ