surfaceclassificationdomain_llm
Classificationdimension · returns varchar

DOMAIN_LLM

LLM-backed subject-matter domain detection (escape hatch for DOMAIN)

Per-row classifier — stable across GROUP BY.

classificationllmllm-escape-hatchtext

Syntax

DOMAIN_LLM({{ text }})
{{ text }} BY DOMAIN_LLM

Arguments

nametypedescription
textVARCHAR

About

LLM-backed alternative to DOMAIN for subject-matter classification. Reach for this when the base NLI operator's fixed 13-domain label set doesn't match your needs — fine-grained industry taxonomies, custom category hierarchies, or domains where the subject cues require reading the whole message rather than matching a short template. Slower and more expensive per row than DOMAIN, so use it selectively — for example, only on rows where DOMAIN returned low confidence, or only for niche domains the NLI path doesn't cover. For routine subject-matter bucketing on standard domains, stick with DOMAIN. It runs on the specialist zoo GPU and is far cheaper at scale.

Examples

LLM escape hatch detects domain

SELECT
  domain_llm ('SQL query optimization')

Nearby rabbit holes

same domain
Climb back to The Looking Glass