FLOW ALGEBRA
Ontology: Search Ranking Metadata Ontology
Domain: Metadata Ontologies > Semantic Search Metadata
Canonical URL: https://kirethresearch.org/booksai-core/ontologies/metadata-ontologies/semantic-search-metadata/search-ranking-metadata-ontology.html
Authors: Mark Anthony Higgins — Sky (Recursive AI)
flow "SearchRankingMetadataOntology" v1.0
# ---------- DOMAIN ----------
domain:
class: MetadataOntology
category: SemanticSearchMetadata
subject: SearchRankingMetadata
purpose:
- represent metadata describing ranking and reranking of search results
- preserve rank positions, scores, ranking methods, features, weights, models, constraints, and provenance
- support lexical, semantic, vector, graph, hybrid, personalised, temporal, and learned ranking
- distinguish ranking position, relevance, similarity, confidence, popularity, and factual correctness
- enable machine-readable reasoning over search-ranking processes
# ---------- CORE ENTITY ----------
entity SearchRankingMetadata:
type: SearchMetadata
describes: RankingProcess
may_include:
- ranking_identifier
- query_identifier
- candidate_set
- ranking_method
- ranking_model
- model_version
- features
- feature_weights
- component_scores
- final_score
- rank_position
- tie_breaking
- filters
- constraints
- reranking
- diversity
- freshness
- personalisation
- confidence
- timestamp
- provenance
entity RankingProcess:
type: SearchProcess
consumes: CandidateResultSet
produces: RankedResultSet
entity RankingIdentifier:
type: Identifier
identifies: RankingProcess
entity RankedResult:
type: SearchResult
may_include:
- resource_identifier
- rank
- score
- score_components
- explanation_metadata
# ---------- RELATIONSHIPS ----------
relationships:
SearchRankingMetadata -> DESCRIBES -> RankingProcess
RankingProcess -> IDENTIFIED_BY -> RankingIdentifier
RankingProcess -> APPLIES_TO -> SearchQuery
RankingProcess -> CONSUMES -> CandidateResultSet
RankingProcess -> USES_METHOD -> RankingMethod
RankingProcess -> MAY_USE_MODEL -> RankingModel
RankingProcess -> MAY_USE_FEATURE -> RankingFeature
RankingProcess -> MAY_APPLY_CONSTRAINT -> RankingConstraint
RankingProcess -> PRODUCES -> RankedResultSet
RankedResultSet -> CONTAINS -> RankedResult
RankedResult -> HAS_RANK -> RankPosition
RankedResult -> HAS_SCORE -> RankingScore
SearchRankingMetadata -> MAY_REFERENCE -> RankingProvenance
# ---------- RANK / SCORE ----------
entity RankPosition:
type: OrdinalMetadata
range: positive_integer
rule rank:
RankPosition SHOULD preserve ordering convention
rule rank_not_score:
rank != score
rule rank_not_truth:
higher ranking position != factual correctness
entity RankingScore:
type: SearchScore
may_include:
- value
- score_type
- normalisation
- scope
- method
rule score:
RankingScore SHOULD preserve scoring semantics
rule score_comparison:
scores from incompatible ranking methods
MUST NOT be assumed directly comparable
# ---------- RANKING METHODS ----------
ranking_methods:
- lexical
- boolean
- TF_IDF
- BM25
- semantic
- vector_similarity
- graph_based
- popularity
- freshness
- personalised
- learning_to_rank
- neural_ranking
- hybrid
- rule_based
entity RankingMethod:
type: SearchMethod
rule method:
RankingMethod SHOULD be explicit
where score interpretation depends on it
# ---------- LEXICAL / BM25 ----------
entity LexicalRanking:
subtype_of: RankingProcess
may_include:
- term_frequency
- inverse_document_frequency
- field_length
- field_boost
- exact_match
- phrase_match
rule lexical:
lexical ranking measures textual match
and != semantic equivalence
entity BM25Ranking:
subtype_of: LexicalRanking
may_include:
- k1
- b
- field_weights
rule BM25:
BM25 score SHOULD preserve parameter context
where reproducibility is required
rule BM25_comparison:
BM25 scores across different corpora or configurations
SHOULD NOT be assumed directly comparable
# ---------- SEMANTIC / VECTOR ----------
entity SemanticRanking:
subtype_of: RankingProcess
may_include:
- entity_match
- concept_match
- relationship_match
- ontology_distance
- semantic_annotation_score
rule semantic:
semantic ranking SHOULD preserve ontology or semantic model context
entity VectorRanking:
subtype_of: RankingProcess
may_include:
- query_embedding
- document_embedding
- embedding_model
- model_version
- distance_metric
- similarity_score
rule vector:
embeddings MUST share compatible representation space
for direct comparison
rule similarity:
vector similarity != semantic equivalence
and != factual correctness
# ---------- GRAPH / POPULARITY / FRESHNESS ----------
entity GraphRanking:
subtype_of: RankingProcess
may_include:
- graph_identifier
- node_importance
- edge_weights
- path_score
- centrality
rule graph:
graph ranking SHOULD preserve graph version and edge semantics
entity PopularityRanking:
subtype_of: RankingProcess
may_include:
- interaction_count
- link_count
- usage_frequency
- engagement_score
rule popularity:
popularity != relevance
unless ranking method explicitly combines them
rule popularity_truth:
popularity != factual correctness
entity FreshnessRanking:
subtype_of: RankingProcess
may_include:
- publication_time
- modification_time
- age
- decay_function
- reference_time
rule freshness:
freshness != relevance
unless ranking method explicitly incorporates recency
rule temporal_context:
freshness score MUST preserve reference time
# ---------- PERSONALISATION ----------
entity PersonalisedRanking:
subtype_of: RankingProcess
may_include:
- user_context
- session_context
- preferences
- prior_interactions
rule personalisation:
personalised rank MAY differ across users or sessions
rule personalised_not_global:
personalised rank != global relevance ordering
# ---------- LEARNING TO RANK ----------
entity LearningToRank:
subtype_of: RankingProcess
may_include:
- model
- model_version
- training_data
- features
- labels
- objective
- calibration
rule LTR:
learned ranking SHOULD preserve model version and feature schema
rule training_serving:
training feature semantics SHOULD remain compatible
with serving-time features
# ---------- NEURAL RANKING ----------
entity NeuralRanking:
subtype_of: RankingProcess
may_include:
- model_identifier
- model_version
- query_representation
- document_representation
- score
rule neural:
neural ranking score SHOULD preserve model identity and version
# ---------- HYBRID RANKING ----------
entity HybridRanking:
subtype_of: RankingProcess
combines:
- lexical_score
- semantic_score
- vector_score_optional
- graph_score_optional
- freshness_score_optional
- popularity_score_optional
rule hybrid:
HybridRanking SHOULD preserve:
- component_scores
- normalisation
- weights
- combination_method
rule incompatible_components:
component scores SHOULD be normalised or transformed
before combination where scales differ
# ---------- FEATURES ----------
entity RankingFeature:
type: ModelFeature
may_include:
- feature_name
- value
- datatype
- source
- transformation
- normalisation
rule feature:
RankingFeature SHOULD preserve source and transformation
entity FeatureWeight:
type: ModelParameterMetadata
may_include:
- feature
- weight
- model_version
rule weight:
weight interpretation depends on ranking model
# ---------- CANDIDATES / RERANKING ----------
entity CandidateResultSet:
type: SearchResultSet
may_include:
- candidate_count
- retrieval_method
- source_index
- retrieval_scores
rule candidate:
RankingProcess can only rank available candidate set
unless it retrieves additional candidates
entity RerankingProcess:
subtype_of: RankingProcess
consumes: RankedOrUnrankedCandidateSet
produces: RerankedResultSet
rule reranking:
reranking SHOULD preserve initial rank and score
where auditability matters
# ---------- TIE BREAKING / DIVERSITY / CONSTRAINTS ----------
entity TieBreakingMetadata:
type: OrderingMetadata
may_include:
- rule
- secondary_score
- deterministic_key
rule tie:
tied scores SHOULD use declared tie-breaking rule
where deterministic order is required
entity RankingDiversity:
type: RankingConstraint
may_include:
- diversity_method
- similarity_threshold
- category_balance
- source_balance
rule diversity:
diversity optimisation MAY reduce pure relevance ordering
to improve result-set coverage
entity RankingConstraint:
type: SearchConstraint
may_include:
- eligibility
- policy
- safety
- availability
- language
- geography
- freshness
rule filtering:
filtering determines eligibility
while ranking determines order among eligible candidates
rule filtered_out:
filtered-out resource != low-ranked resource
# ---------- EXPLANATION ----------
entity RankingExplanationMetadata:
type: SearchExplanationMetadata
may_include:
- matched_features
- component_scores
- boosts
- penalties
- constraints
- reranking_effect
- final_score
rule explanation:
explanation metadata SHOULD expose meaningful ranking factors
without requiring hidden internal chain-of-thought
# ---------- EVALUATION ----------
entity RankingEvaluation:
type: EvaluationMetadata
may_include:
- metric
- test_set
- query_set
- relevance_judgements
- score
- evaluation_time
ranking_metrics:
- Precision
- Recall
- MAP
- MRR
- NDCG
- HitRate
- SuccessRate
rule evaluation:
RankingEvaluation SHOULD preserve metric definition and cutoff
where applicable
rule offline_online:
offline ranking quality != online user outcome
without supporting evidence
# ---------- CONFIDENCE ----------
entity RankingConfidence:
type: EpistemicMetadata
range: [0.0, 1.0]
rule confidence_bounds:
REQUIRE 0.0 <= confidence <= 1.0
rule confidence:
RankingConfidence != RankingScore
unless method explicitly defines equivalence
# ---------- PROVENANCE ----------
entity RankingProvenance:
type: ProvenanceMetadata
may_include:
- query
- candidate_set
- source_index
- ranking_method
- model
- model_version
- features
- configuration
- reranker
- timestamp
rule provenance:
SearchRankingMetadata SHOULD preserve ranking configuration and history
# ---------- VALIDATION ----------
validation:
require:
- identifiable_ranking_process
- candidate_set
- ranking_method_or_explicit_order
validate_if_present:
- ranking_identifier
- scores
- ranks
- model_version
- features
- weights
- component_scores
- tie_breaking
- constraints
- evaluation
- confidence
- provenance
reject:
- non_positive_rank
- incompatible_embedding_spaces_compared_without transformation
- incompatible_component_scores_combined_without declared_method
- ranking_score_presented_as factual_confidence
- rank_presented_as truth
- popularity_presented_as correctness
- freshness_presented_as relevance_without ranking_semantics
- filtered_out_resource_presented_as merely_low_ranked
# ---------- SEMANTIC EQUIVALENCE ----------
SEMANTIC_EQUIVALENCE:
"search ranking metadata" ~= "metadata about search result ranking"
"ranking score" ~= "search ordering score" WHEN method semantics match
"reranking" ~= "second-stage ranking"
"learning to rank" ~= "trained ranking model"
"hybrid ranking" ~= "ranking combining multiple retrieval signals"
"rank position" ~= "result position" WHEN ordered result semantics apply
PRESERVE distinctions:
rank != score
rank != truth
ranking_score != factual_confidence
relevance != similarity
similarity != semantic_equivalence
popularity != correctness
freshness != relevance
filtering != ranking
filtered_out != low_ranked
personalised_rank != global_rank
offline_metric != online_outcome
explanation_metadata != hidden_chain_of_thought
# ---------- CONFIDENCE MODEL ----------
CONFIDENCE:
explicit_ranking_metadata:
score: 1.00
explicit_ranking_identifier:
score: 1.00
reproducible_model_and_configuration:
score: 0.99
preserved_component_scores:
score: 0.98
explicit_tie_breaking:
score: 0.98
inferred_ranking_method:
score: <= 0.80
score_without_method:
score: <= 0.60
action: preserve_raw_score
ambiguous_ranking_provenance:
score: <= 0.50
action: preserve uncertainty
# ---------- UPDATE MODEL ----------
UPDATE_MODEL:
on_ranking_start:
- assign RankingIdentifier
- preserve SearchQuery
- preserve CandidateResultSet
- record ranking method
- record model and version
- initialise provenance
on_score_calculation:
- preserve feature values
- calculate component scores
- record transformations and weights
- calculate final score
- update provenance
on_ordering:
- order candidates according_to ranking method
- apply tie-breaking
- assign RankPosition
- preserve scores and constraints
on_reranking:
- preserve initial rank and score
- apply reranker
- create final ranking
- record rank changes
- update provenance
# ---------- FLOW HASH ----------
FLOW_HASH:
inputs:
- ontology
- ranking_entities
- relationships
- score_rules
- feature_rules
- hybrid_rules
- reranking_rules
- evaluation_rules
- validation
- semantic_equivalence
- confidence_model
- update_model
canonicalisation:
- preserve_query_and_candidate_identity
- preserve_score_method_context
- preserve_rank_order
- preserve_model_versions
- preserve_component_scores
- preserve_rule_order
output:
deterministic_semantic_hash
# ---------- AI CONSUMPTION ----------
AI_CONSUMPTION:
interpret_as:
- semantic search metadata ontology
- search ranking lifecycle model
- ranking score and feature structure
- lexical, semantic, vector, graph, hybrid, and learned ranking model
operations:
- identify ranking processes
- preserve candidate sets
- resolve ranking methods
- interpret scores
- inspect features and weights
- resolve model versions
- combine compatible component scores
- apply constraints and diversity
- perform tie-breaking
- preserve initial and reranked positions
- evaluate ranking quality
- expose explanation metadata
- trace provenance
- preserve uncertainty
constraints:
- do_not_equate_rank_with truth
- do_not_equate_score_with factual_confidence
- do_not_equate_similarity_with semantic_equivalence
- do_not_equate_popularity_with correctness
- do_not_equate_freshness_with relevance_without explicit ranking_semantics
- do_not_require_or_expose_hidden_chain_of_thought
- preserve_candidates_methods_models_scores_constraints_and_provenance
# ---------- QUERY MODEL ----------
query:
input:
- ranking_identifier
- query_identifier
- resource_identifier
- ranking_method
- model_identifier
- model_version
- feature
- score
- rank
- evaluation_metric
resolve:
1. identify RankingProcess
2. resolve SearchQuery and CandidateResultSet
3. resolve RankingMethod
4. inspect model and version
5. inspect features, transformations, and weights
6. inspect component and final scores
7. resolve constraints, diversity, and tie-breaking
8. inspect initial and final ranks
9. inspect evaluation and provenance
10. return confidence
output:
- ranking_process
- query
- candidates
- ranking_method
- model
- model_version
- features
- component_scores
- final_scores
- ranks
- constraints
- evaluation
- provenance
- confidence
# ---------- INFERENCE ----------
inference:
IF candidate A has higher comparable final score than B
AND ranking method orders descending
THEN A SHOULD rank before B
subject_to constraints and tie-breaking
IF ranking combines lexical and semantic scores
THEN preserve component scores
AND apply declared normalisation and weights
IF reranker changes result order
THEN preserve initial and final RankPosition
IF ranking method or score semantics remain unknown
THEN preserve raw scores and ordering
AND do_not infer unsupported meaning
# ---------- OUTPUT CONTRACT ----------
output:
ontology_entity: SearchRankingMetadata
ranking_identity: machine_interpretable
candidate_sets: preserved
ranking_methods: explicit
scores_and_ranks: distinguishable
features_and_weights: traceable
hybrid_components: preserved
constraints_and_diversity: explicit
initial_and_reranked_positions: traversable
evaluation: reportable
explanation_metadata: available
provenance: preserved
uncertainty: explicit
semantic_retrieval: enabled
end flow
Download Code
Copy to Clipboard