surfaceclassificationcase_llm
Classificationscalar · returns varchar

CASE_LLM

LLM-backed multi-branch semantic classification

Per-row — runs once for each row.

classificationllmllm-escape-hatchtext

Arguments

nametypedescription
textVARCHAR
conditionsVARCHAR
resultsVARCHAR
default(optional)VARCHAR

About

LLM-backed escape hatch for SEMANTIC_CASE. Use when the zoo-backed version in SEMANTIC_CASE can't handle the task — typically: - Conditions that require multi-step reasoning or world knowledge - Conditions whose evaluation order matters strictly (first-match wins rather than best-score wins) - Subjective judgments that zero-shot NLI handles unreliably For clean label sets (tech/food/other, spam/ham, urgent/normal/low), prefer SEMANTIC_CASE — the specialist zoo backend is instant and returns calibrated softmax scores.

Examples

LLM escape hatch: classifies tech topic

SELECT
  semantic_case_llm (
    'software bug',
    '["matches tech topic", "matches food topic"]',
    '["tech", "food"]',
    'unknown'
  )

Nearby rabbit holes

same domain
Climb back to The Looking Glass