Skip to main content
Asks a chat model to evaluate the semantic similarity of two texts.

Syntax

Arguments

  • input: A VARCHAR expression containing the first text.
  • other: A VARCHAR expression containing the second text.
For the types and default behavior of provider and model, see Common calling rules.

Return value

Returns a nullable FLOAT in the range [0, 1]. A higher value indicates greater semantic similarity according to the model. Responses that cannot be parsed or are outside this range are treated as row-level errors. The score is generated by a chat model; it is not a distance calculation between embedding vectors.

Examples