Find unusual or atypical items via embeddings (+ optional criteria)
Per-group — reads the whole group in one call.
OUTLIERS({{ texts }})OUTLIERS({{ texts }}, {{ num_outliers }})OUTLIERS({{ texts }}, {{ num_outliers }}, '{{ criteria }}')| name | type | description |
|---|---|---|
| texts | JSON | — |
| num_outliers | INTEGER | — |
| criteria(optional) | VARCHAR | — |
Criteria-guided — correctly identifies chicken as non-fruit outlier
WITH
test_data AS (
SELECT
*
FROM
(
VALUES
('apple'),
('banana'),
('orange'),
('grape'),
('strawberry'),
('watermelon'),
('chicken'),
('mango'),
('pineapple')
) AS t (item)
)
SELECT
OUTLIERS (item, 1, 'a type of fruit')
FROM
test_dataReturns 0.0-1.0 relevance score for text vs criterion (cross-encoder)
LLM-backed 0.0-1.0 relevance score (escape hatch for ABOUT/RELEVANCE TO)
Pick the single best value from a group by a plain-English quality criterion
LLM-backed outlier detection (escape hatch for OUTLIERS)
PageRank centrality on an ad-hoc edge list (NetworkX)
Rank a group of items by a subjective multi-factor criterion
Find unusual or atypical items via embeddings (+ optional criteria)
Per-group — reads the whole group in one call.
OUTLIERS({{ texts }})OUTLIERS({{ texts }}, {{ num_outliers }})OUTLIERS({{ texts }}, {{ num_outliers }}, '{{ criteria }}')| name | type | description |
|---|---|---|
| texts | JSON | — |
| num_outliers | INTEGER | — |
| criteria(optional) | VARCHAR | — |
Criteria-guided — correctly identifies chicken as non-fruit outlier
WITH
test_data AS (
SELECT
*
FROM
(
VALUES
('apple'),
('banana'),
('orange'),
('grape'),
('strawberry'),
('watermelon'),
('chicken'),
('mango'),
('pineapple')
) AS t (item)
)
SELECT
OUTLIERS (item, 1, 'a type of fruit')
FROM
test_dataReturns 0.0-1.0 relevance score for text vs criterion (cross-encoder)
LLM-backed 0.0-1.0 relevance score (escape hatch for ABOUT/RELEVANCE TO)
Pick the single best value from a group by a plain-English quality criterion
LLM-backed outlier detection (escape hatch for OUTLIERS)
PageRank centrality on an ad-hoc edge list (NetworkX)
Rank a group of items by a subjective multi-factor criterion