Skip to main content

Retrieved Document 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
RETRIEVED DOCUMENT ONTOLOGY — FLOW ALGEBRA
Semantic Library | AI Core | Entity Graph | Search and Retrieval Entities
Version: 1.0 | 2026-11-02
Authors: Mark Anthony Higgins — Sky Recursive AI
Source: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/search-and-retrieval-entities/retrieved-document-ontology.html
Status: Supplementary formalisation; not a verified transcription of the full source ontology.

1. PURPOSE
Represent a retrieved document as a traceable, query-linked evidence object with identity, source, content, relevance, provenance, permissions and retrieval state. Distinguish the document itself from a retrieval event and from claims derived from its content.

2. ENTITY DEFINITION
RetrievedDocument D = (id, uri, source, content_ref, metadata, q, score, rank, provenance, access, timestamp, status).
id: stable document identifier; uri: canonical locator; source: repository or publisher; content_ref: text, snippet or indexed payload; metadata: title, author, date, type, language; q: query identifier; score: query-dependent relevance; rank: position in result set; provenance: retrieval and transformation history; access: usage and access restrictions; timestamp: retrieval time; status: validated, partial, inaccessible, duplicate or rejected.

3. STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t = retrieval input (query, candidate document, metadata)
R_t = rules for parsing, canonicalisation, deduplication, scoring and evidence tracking
B_t = boundaries (access, safety, scope, temporal validity, trust)
K_t = known documents, indices, prior retrievals and provenance records

4. FORMAL FLOW
C_t = Retrieve(q_t, corpus, B_t)
N_t = Canonicalise(C_t)
U_t = Deduplicate(N_t, K_t)
V_t = {d in U_t | Accessible(d) AND InScope(d,q_t) AND ValidMetadata(d)}
score(d,q_t) = Relevance(d,q_t,K_t)
D_t = Sort(V_t, score, descending)
P_t = AttachProvenance(D_t, q_t, retrieval_event_t)
K_(t+1) = K_t UNION Record(P_t)
Output = (P_t, validation_report, unresolved_flags)

5. HOW TO READ
A query generates candidates. Canonicalisation reconciles identifiers. Deduplication removes repeated documents without erasing distinct versions. Boundary checks reject inaccessible or out-of-scope candidates. Remaining documents are ranked, annotated with retrieval provenance and added to the knowledge state.

6. TRI-MAPPING
Entity: RetrievedDocument -> stable document identity and metadata
Relationship: retrieved_by(Query), belongs_to(ResultSet), sourced_from(Repository), supports(Claim), version_of(Document)
Process: retrieve -> normalise -> validate -> deduplicate -> rank -> provenance -> publish

7. RELATIONSHIP GRAPH
Query --retrieves--> RetrievedDocument
RetrievedDocument --belongs_to--> SearchResultSet
RetrievedDocument --sourced_from--> Source
RetrievedDocument --has_version--> DocumentVersion
RetrievedDocument --supports_or_contradicts--> Claim
RetrievalEvent --records--> RetrievedDocument

8. MINI RECURSION ENGINE
Initial: D_0 = Retrieve(q_0)
For iteration t:
  gaps_t = DetectMissingEvidence(D_t, q_t)
  q_(t+1) = RefineQuery(q_t, gaps_t, B_t)
  D_(t+1) = MergeValidated(D_t, Retrieve(q_(t+1)))
Stop if no material gain, budget exhausted, confidence threshold met, or boundary reached.
Prevent loops using visited query/document pairs and maximum depth.

9. MAPPING TABLE
Input query | Query entity | retrieval target
Candidate hit | Search result entity | unverified candidate
Canonical URI | Document identity | deduplication key
Relevance score | Ranking entity | query-dependent ordering
Provenance trail | Provenance entity | source accountability
Retrieved payload | Retrieved document | content evidence
Claim citation | Evidence relationship | claim-document linkage

10. INFERENCE RULES
IF candidate has stable locator AND accessible payload THEN candidate MAY become RetrievedDocument.
IF canonical identifiers match AND versions match THEN merge duplicates while retaining retrieval events.
IF versions differ THEN retain version relationship, not unconditional identity.
IF document is inaccessible THEN preserve metadata as a search hit, not verified content.
IF content supports a claim THEN record exact passage/location and retrieval provenance.
IF relevance score is high THEN prioritise for review; do not infer factual truth from rank.
IF source changes THEN mark previous retrieval snapshot stale pending revalidation.

11. CONDITIONAL EXECUTION GUARANTEE
Given deterministic inputs, fixed corpus snapshot, fixed scoring rules and unchanged boundaries, the pipeline produces reproducible ranking and provenance records. This does NOT guarantee source truth, complete retrieval, perfect relevance or availability of external documents. All unresolved uncertainties remain explicit.

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/retrieved-document-ontology.html
CITATION_BACKLINK: same as SOURCE
PURPOSE: Traceable representation of documents retrieved in response to queries.
STATE_MODEL: S=(I,R,B,K)
ENTITIES: Query, RetrievedDocument, SearchResultSet, Source, DocumentVersion, RetrievalEvent, Claim, Provenance
PATHWAYS: query -> retrieval -> validation -> deduplication -> ranking -> provenance -> evidence linkage
MINI_RECURSION_ENGINE: refine query from evidence gaps; bounded iterative retrieval
INFERENCE_RULES: identity/version checks; scope checks; content verification; citation traceability
CONFIDENCE: relevance confidence distinct from source reliability and claim certainty
SEMANTIC_EQUIVALENCE: duplicate identifiers do not imply equal content across versions
FLOW_HASH: compute from normalised published flow content at deployment; not precomputed here
UPDATE_MODEL: refresh on document revision, source change, or retrieval rule update

13. EXAMPLE
Query: "What does document A say about topic X?"
Candidate: repository item A, version 2
Validation: accessible; canonical URI resolved; language matched
Result: RetrievedDocument(A-v2, source, payload, query, score, rank, provenance)
Evidence: passage p3 supports claim C with citation to A-v2
Caution: rank indicates relevance to query, not independent proof of C.

14. LICENSING AND ATTRIBUTION
Prepared as an open supplementary research flow with attribution to Mark Anthony Higgins — Sky Recursive AI. Retain the source link and attribution when reusing. Consult the applicable Kireth Research Open Research Licence for definitive licence terms.
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ