Returns TRUE if text semantically matches the criterion (cross-encoder)
Per-row — runs once for each row.
{{ text }} MEANS {{ criterion }}{{ text }} MATCHES {{ criterion }}| name | type | description |
|---|---|---|
| text | VARCHAR | — |
| criterion | VARCHAR | — |
| threshold(optional) | DOUBLE | — |
Infix MEANS: matches related content
WITH
t AS (
SELECT
'apple pie recipe' AS text
)
SELECT
*
FROM
t
WHERE
text MEANS 'dessert recipes'Infix MATCHES: filters by semantic match
WITH
t AS (
SELECT
'customer complaint about shipping delay' AS msg
)
SELECT
*
FROM
t
WHERE
msg MATCHES 'delivery issues'Function: returns true for semantic match
SELECT
semantic_matches ('renewable energy investments', 'clean energy')Function: returns false for unrelated topics
SELECT
semantic_matches ('basketball game results', 'cooking recipes')Infix MEANS: returns false for unrelated topics
WITH
t AS (
SELECT
'weather forecast' AS text
)
SELECT
CASE
WHEN text MEANS 'financial news' THEN 'yes'
ELSE 'no'
END
FROM
tFunction with compound expr: a || b concatenation
WITH
t AS (
SELECT
'renewable energy' AS a,
' investments' AS b
)
SELECT
semantic_matches (a || b, 'clean energy')
FROM
tFunction with COALESCE: handles NULL fallback
WITH
t AS (
SELECT
NULL::VARCHAR AS a,
'solar panel installations' AS b
)
SELECT
semantic_matches (COALESCE(a, b), 'clean energy')
FROM
tFunction with CASE expression
WITH
t AS (
SELECT
'renewable energy' AS text,
1 AS flag
)
SELECT
semantic_matches (
CASE
WHEN flag = 1 THEN text
ELSE 'nothing'
END,
'clean energy'
)
FROM
tHow strongly text supports a specific message or stance (0.0-1.0)
Check if an image semantically matches a text query (cross-modal)
Cross-modal cosine similarity between an image and a text query
Fuzzy cross-match two string arrays via bge-m3 embeddings
Checks whether two values match under a relationship
LLM-backed boolean match (escape hatch for MEANS when encoder-based matching is insufficient)
Returns TRUE if text semantically matches the criterion (cross-encoder)
Per-row — runs once for each row.
{{ text }} MEANS {{ criterion }}{{ text }} MATCHES {{ criterion }}| name | type | description |
|---|---|---|
| text | VARCHAR | — |
| criterion | VARCHAR | — |
| threshold(optional) | DOUBLE | — |
Infix MEANS: matches related content
WITH
t AS (
SELECT
'apple pie recipe' AS text
)
SELECT
*
FROM
t
WHERE
text MEANS 'dessert recipes'Infix MATCHES: filters by semantic match
WITH
t AS (
SELECT
'customer complaint about shipping delay' AS msg
)
SELECT
*
FROM
t
WHERE
msg MATCHES 'delivery issues'Function: returns true for semantic match
SELECT
semantic_matches ('renewable energy investments', 'clean energy')Function: returns false for unrelated topics
SELECT
semantic_matches ('basketball game results', 'cooking recipes')Infix MEANS: returns false for unrelated topics
WITH
t AS (
SELECT
'weather forecast' AS text
)
SELECT
CASE
WHEN text MEANS 'financial news' THEN 'yes'
ELSE 'no'
END
FROM
tFunction with compound expr: a || b concatenation
WITH
t AS (
SELECT
'renewable energy' AS a,
' investments' AS b
)
SELECT
semantic_matches (a || b, 'clean energy')
FROM
tFunction with COALESCE: handles NULL fallback
WITH
t AS (
SELECT
NULL::VARCHAR AS a,
'solar panel installations' AS b
)
SELECT
semantic_matches (COALESCE(a, b), 'clean energy')
FROM
tFunction with CASE expression
WITH
t AS (
SELECT
'renewable energy' AS text,
1 AS flag
)
SELECT
semantic_matches (
CASE
WHEN flag = 1 THEN text
ELSE 'nothing'
END,
'clean energy'
)
FROM
tHow strongly text supports a specific message or stance (0.0-1.0)
Check if an image semantically matches a text query (cross-modal)
Cross-modal cosine similarity between an image and a text query
Fuzzy cross-match two string arrays via bge-m3 embeddings
Checks whether two values match under a relationship
LLM-backed boolean match (escape hatch for MEANS when encoder-based matching is insufficient)