surfacerankingabout
Rankingscalar · returns double

ABOUT

Returns 0.0-1.0 relevance score for text vs criterion (cross-encoder)

Per-row — runs once for each row.

rankingrerankerspecialist-zootext

Syntax

{{ text }} ABOUT {{ criterion }}
{{ text }} RELEVANCE TO {{ criterion }}

Arguments

nametypedescription
textVARCHAR
criterionVARCHAR

About

Semantic relevance scoring — returns 0.0-1.0 for how well text matches a criterion. Used for threshold-based filtering and relevance ranking. Backend: specialist zoo cross-encoder (bge-reranker-v2-m3) via the /rerank route. The gateway applies a calibrated biased sigmoid so the output is in [0, 1] with 0.5 as the "borderline relevant" midpoint: - irrelevant pairs land around 0.04-0.05 - weakly relevant land around 0.2-0.6 - clearly relevant land around 0.8-0.99 For LLM-style contextual scoring (nuance, world knowledge), use the ABOUT_LLM / RELEVANCE_LLM TO operators — see score_llm.cascade.yaml.

Examples

Function: High quality score

SELECT
  semantic_score (
    'The food was excellent, service was great',
    'quality'
  )

Function: unrelated text gets a low quality relevance score

SELECT
  semantic_score (
    'The meeting starts at noon in conference room B',
    'quality'
  )

Function: High service relevance score

SELECT
  semantic_score (
    'Great customer support and fast delivery',
    'service'
  )

Function: tech relevance score

SELECT
  semantic_score (
    'Machine learning and AI developments',
    'technology'
  )

Nearby rabbit holes

same domain
Climb back to The Looking Glass