surfaceimplicationcontradicts_llm
Implicationscalar · returns boolean

CONTRADICTS_LLM

LLM-backed contradiction check (escape hatch for CONTRADICTS)

Per-row — runs once for each row.

implicationllmllm-escape-hatchtext

Syntax

{{ text_a }} CONTRADICTS_LLM {{ text_b }}
semantic_contradicts_llm({{ text_a }}, {{ text_b }})

Arguments

nametypedescription
text_aVARCHAR
text_bVARCHAR

About

LLM-backed escape hatch for logical contradiction. Use when the canonical 3-class NLI path (CONTRADICTS) is insufficient because the contradiction requires world knowledge, multi-step reasoning, or subjective judgment a cross-encoder NLI model will miss. Examples where CONTRADICTS_LLM may outperform CONTRADICTS: - Contradictions that require arithmetic or quantity reasoning - Policy/commitment contradictions hidden behind different phrasings - Long-form documents where the contradiction is distributed For routine contradiction detection, prefer CONTRADICTS — it is 100-1000x faster and already catches most real-world cases.

Examples

LLM escape hatch: contradicting statements

SELECT
  semantic_contradicts_llm (
    'The product is excellent',
    'The product is terrible'
  )

LLM escape hatch: unrelated statements

SELECT
  semantic_contradicts_llm ('The sky is blue', 'Water is wet')

Nearby rabbit holes

same domain
Climb back to The Looking Glass