Classify a text collection into one category (embedding majority vote)
Per-group — reads the whole group in one call.
CLASSIFY({{ texts }}, '{{ categories }}')CLASSIFY({{ texts }}, '{{ categories }}', '{{ prompt }}')| name | type | description |
|---|---|---|
| texts | JSON | — |
| categories | VARCHAR | — |
| prompt(optional) | VARCHAR | — |
Classifies pet-related texts correctly
WITH
test_data AS (
SELECT
*
FROM
(
VALUES
('The cat sat on the mat'),
('Dogs love to play fetch'),
('My parrot talks all day'),
('Fish swim in the tank')
) AS t (text)
)
SELECT
CLASSIFY (text, 'animal stories, food recipes, sports news')
FROM
test_dataIdentify target audience via zero-shot NLI
LLM-backed audience identification (escape hatch for AUDIENCE)
Assess authenticity of content via zero-shot NLI
LLM-backed authenticity assessment (escape hatch for AUTHENTICITY)
Classify text into user-specified buckets via zero-shot NLI
LLM-backed bucketing (escape hatch for BUCKET)
Classify a text collection into one category (embedding majority vote)
Per-group — reads the whole group in one call.
CLASSIFY({{ texts }}, '{{ categories }}')CLASSIFY({{ texts }}, '{{ categories }}', '{{ prompt }}')| name | type | description |
|---|---|---|
| texts | JSON | — |
| categories | VARCHAR | — |
| prompt(optional) | VARCHAR | — |
Classifies pet-related texts correctly
WITH
test_data AS (
SELECT
*
FROM
(
VALUES
('The cat sat on the mat'),
('Dogs love to play fetch'),
('My parrot talks all day'),
('Fish swim in the tank')
) AS t (text)
)
SELECT
CLASSIFY (text, 'animal stories, food recipes, sports news')
FROM
test_dataIdentify target audience via zero-shot NLI
LLM-backed audience identification (escape hatch for AUDIENCE)
Assess authenticity of content via zero-shot NLI
LLM-backed authenticity assessment (escape hatch for AUTHENTICITY)
Classify text into user-specified buckets via zero-shot NLI
LLM-backed bucketing (escape hatch for BUCKET)