Skip to main content

Retrieval-Augmented Generation Entity Ontology

Search and Retrieval Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 02 November 2026
Audio Overview
RETRIEVAL-AUGMENTED GENERATION ENTITY ONTOLOGY — FLOW ALGEBRA
Semantic Library | AI Core | Entity Graph | Search and Retrieval Entities
Version: 1.0 | Date: 2026-11-02 | Language: en-GB
Authors: Mark Anthony Higgins — Sky Recursive AI
Source: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/search-and-retrieval-entities/retrieval-augmented-generation-entity-ontology.html
Status: Supplementary formalisation; not a verified transcription of the full source specification.
Licence: Intended for open research reuse with source citation; consult the source for definitive licence terms.

1. PURPOSE
Represent retrieval-augmented generation (RAG) as an auditable entity and process connecting a query, retrieval corpus, ranked evidence, grounded generation and verifiable output. Preserve provenance, uncertainty, permissions and boundaries.

2. ENTITY MODEL
RAG_ENTITY = (id, query, corpus, retriever, candidates, evidence, generator, answer, citations, state, provenance)
Related entities: Search Query, Search Intent, Retrieval Query, Retrieved Document, Retrieved Passage, Retrieved Entity, Retrieval Candidate, Retrieval Score, Semantic Search, Vector Search, Hybrid Search, Search Result Set, Inference Evidence.

3. STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t: current question, dialogue context and candidate evidence.
R_t: retrieval, ranking, validation and generation rules.
B_t: access permissions, context limits, time budget and safety constraints.
K_t: corpus/index knowledge, source metadata and verified relationships.

4. FORMAL FLOW
q = Normalise(user_query, context)
q_r = Rewrite(q, intent, constraints)
C_t = Retrieve(q_r, index, B_t)
C'_t = Filter(C_t, access, freshness, relevance, duplication)
E_t = Rerank(C'_t, q_r, R_t)
V_t = {e in E_t : permitted(e) AND attributable(e) AND relevant(e)}
G_t = Generate(q, Select(V_t, context_budget), R_t)
A_t = Validate(G_t, V_t, claim_support, contradictions)
O_t = Publish(A_t, citations, confidence, unresolved_questions)
S_(t+1) = Update(S_t, O_t, feedback)

5. HST-ALIGNED RECURSION
E_t = expand(I_t, R_t)
V_t = {x in E_t | B_t(x) = true}
x* = argmax[x in V_t] P(x | I_t, R_t, B_t, K_t)
I_(t+1) = Update(I_t, x*, evidence, feedback)
Interpret P as a model-dependent selection score, not automatically a calibrated probability.

6. TRI-MAPPING
Entity: RAG system -> Process: retrieve, ground, generate -> Evidence: source-linked answer.
Entity: Retrieved passage -> Process: validate and rank -> Evidence: attributable excerpt.
Entity: Generated claim -> Process: cross-check support -> Evidence: citation or explicit uncertainty.

7. RELATIONSHIP GRAPH
UserQuery --rewrittenAs--> RetrievalQuery
RetrievalQuery --retrieves--> RetrievalCandidate
RetrievalCandidate --extractedFrom--> RetrievedDocument
RetrievedDocument --contains--> RetrievedPassage
RetrievedPassage --supports|contradicts--> GeneratedClaim
GeneratedClaim --includedIn--> GeneratedAnswer
GeneratedAnswer --cites--> SourceProvenance
Feedback --refines--> RetrievalQuery

8. RECURSIVE RETRIEVAL ENGINE
Input: q, index, max_iterations N, budget B.
For t = 0 ... N-1:
  retrieve and rank evidence;
  identify unsupported claims and information gaps;
  if answer coverage and provenance checks pass: stop;
  otherwise reformulate the query using bounded feedback;
  stop if no material improvement or budget exhausted.
Return answer, supporting sources, unresolved gaps and stop reason.

9. INFERENCE RULES
R1: IF a candidate lacks permitted access THEN exclude it.
R2: IF evidence does not support a claim THEN mark the claim unsupported; revise or omit.
R3: IF credible sources conflict THEN expose the disagreement; do not silently merge.
R4: IF duplicate passages share one origin THEN avoid treating them as independent corroboration.
R5: IF no suitable evidence is retrieved THEN abstain or label the response as unverified.
R6: IF new evidence changes support THEN re-evaluate affected claims and citations.
R7: IF a retrieval score is high THEN do not infer factual truth without separate verification.

10. MAPPING TABLE
Input query | Search Query Entity | intent, scope, constraints
Retriever | Retrieval Query Entity | index selection and matching
Candidate | Retrieval Candidate Entity | potential evidence
Rank | Retrieval Score Entity | relevance estimate
Evidence | Retrieved Passage Entity | source-linked support
Output | Generated Answer Entity | grounded response
Trace | Provenance Entity | source, time, transformation history

11. EXECUTION GUARANTEE (CONDITIONAL)
Given a finite candidate pool, bounded iteration count, terminating operators and enforced resource limits, the flow terminates with either a checked answer or an explicit failure/abstention state. It does NOT guarantee factual correctness, exhaustive retrieval, calibrated confidence or completeness. Claims of grounding require traceable evidence and successful checks.

12. AI SEARCH FLOW
AUTHORS: Mark Anthony Higgins — Sky Recursive AI
SOURCE: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/search-and-retrieval-entities/retrieval-augmented-generation-entity-ontology.html
CITATION_BACKLINK: same as SOURCE
PURPOSE: Define evidence-grounded retrieval-augmented generation.
STATE_MODEL: S=(I,R,B,K)
ENTITIES: query, corpus, index, retriever, candidate, passage, score, claim, answer, provenance
PATHWAYS: Query -> Retrieve -> Filter -> Rerank -> Ground -> Generate -> Validate -> Cite
MINI_RECURSION_ENGINE: detect gaps -> refine query -> retrieve again -> stop at bounds
INFERENCE_RULES: R1-R7
CONFIDENCE: separate retrieval relevance from claim support and calibration
SEMANTIC_EQUIVALENCE: RAG; retrieval-augmented generation; grounded generation with retrieval
FLOW_HASH: calculate from canonical published content when deployed; no hash asserted here
UPDATE_MODEL: revalidate when sources, index, model or rules change

13. HOW TO READ
Read each arrow as a typed, auditable transition. A retrieved item is evidence only after provenance and relevance checks. An answer is grounded only insofar as its material claims are supported by accessible, attributable sources.

14. EXAMPLE
Question: What does a technical standard require?
Retrieve the official standard and any amendments; filter superseded editions; extract relevant clauses; draft a clause-linked answer; verify every material requirement against the cited clauses; report missing access or unresolved conflicts.

END OF FLOW ALGEBRA
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ