surfaceclassificationlooks_like_llm
Classificationscalar · returns boolean

LOOKS_LIKE_LLM

LLM-backed looks_like (escape hatch for LOOKS_LIKE)

Per-row — runs once for each row.

classificationllmllm-escape-hatchtext

Syntax

LOOKS_LIKE_LLM({{ value }}, '{{ expected_type }}')
{{ value }} LOOKS_LIKE_LLM '{{ expected_type }}'

Arguments

nametypedescription
valueVARCHAR
expected_typeVARCHARType to check (free-form)

About

LLM-backed escape hatch for LOOKS_LIKE. Use when the deterministic hybrid in LOOKS_LIKE can't handle the task — typically: - The type is abstract and requires world knowledge ("a serialized JWT", "a medical record ID", "a tracking number") - The value is unusually noisy and needs interpretation - You need the LLM to make a nuanced yes/no judgment For the common structured types (email, phone, url, date, address, name, ip, number, ssn, zip, uuid, currency), prefer LOOKS_LIKE — the deterministic pre-checks are instant and handle all the malformed-but- recognizable cases.

Examples

LLM escape hatch: malformed email

SELECT
  looks_like_llm ('john@gmail', 'email')

LLM escape hatch: address

SELECT
  looks_like_llm ('123 Main St', 'address')

Nearby rabbit holes

same domain
Climb back to The Looking Glass