surfaceimplicationimplies_llm
Implicationscalar · returns boolean

IMPLIES_LLM

LLM-backed logical implication (escape hatch for IMPLIES)

Per-row — runs once for each row.

implicationllmllm-escape-hatchtext

Syntax

{{ premise }} IMPLIES_LLM {{ conclusion }}
semantic_implies_llm({{ premise }}, {{ conclusion }})

Arguments

nametypedescription
premiseVARCHAR
conclusionVARCHAR

About

Logical implication check using a full LLM — returns TRUE when a premise implies a conclusion, including cases that need world knowledge or multi-step reasoning. Reach for this over IMPLIES when the implication isn't something a small text-entailment model can spot on its own: - "The patient has a fever" → "The patient might be sick" (needs medical common sense) - "The project deadline is Friday" → "Work on it this week" (needs pragmatic / calendar reasoning) - Any implication where domain knowledge or subjective judgment beats pattern-matching For plain logical or causal entailment like "it's raining" → "the ground is wet", stick with IMPLIES. It's 100-1000× faster and already tuned for both strict and common-sense cases, so it'll handle most day-to-day uses at a fraction of the cost.

Examples

LLM escape hatch: strict entailment

SELECT
  semantic_implies_llm ('John is a bachelor', 'John is unmarried')

LLM escape hatch: unrelated premise and conclusion

SELECT
  semantic_implies_llm ('The sky is blue', 'Today is Monday')

Nearby rabbit holes

same domain
Climb back to The Looking Glass