surfacesimilaritymeans_llm
Similarityscalar · returns boolean

MEANS_LLM

LLM-backed boolean match (escape hatch for MEANS when encoder-based matching is insufficient)

Per-row — runs once for each row.

similarityllmllm-escape-hatchtext

Syntax

{{ text }} MEANS_LLM {{ criterion }}
{{ text }} MATCHES_LLM {{ criterion }}
semantic_matches_llm({{ text }}, {{ criterion }})

Arguments

nametypedescription
textVARCHAR
criterionVARCHAR

About

LLM-backed escape hatch for MEANS / MATCHES. Use when the canonical cross-encoder path (semantic_matches) is insufficient because the match requires contextual reasoning, world knowledge, or implicit meaning that a topical-similarity encoder will miss. Examples where MEANS_LLM wins over MEANS: - "customer is frustrated" matching a polite review that hints at it - "this is a pre-Columbian artifact" needing world knowledge - "the author contradicts themselves later" needing multi-step reasoning For routine topical filtering, stay with MEANS — it is 100-1000x faster and well-calibrated for standard use.

Examples

LLM escape hatch: topical match

SELECT
  semantic_matches_llm ('stock prices fell today', 'financial news')

LLM escape hatch: unrelated topics

SELECT
  semantic_matches_llm ('basketball game results', 'cooking recipes')

Nearby rabbit holes

same domain
Climb back to The Looking Glass