surfaceimplicationimplies
Implicationscalar · returns boolean

IMPLIES

Returns TRUE if premise entails conclusion (zero-shot NLI)

Per-row — runs once for each row.

implicationnlispecialist-zootext

Syntax

{{ premise }} IMPLIES {{ conclusion }}

Arguments

nametypedescription
premiseVARCHAR
conclusionVARCHAR
threshold(optional)DOUBLE

About

Logical implication — returns TRUE if premise entails conclusion. Used for finding consistent / contradictory reports and deductive checks. Backend: specialist zoo zero-shot NLI (deberta-v3-large-zeroshot-v2.0) via the /nli route. The cascade applies a calibrated biased logit transform — sigmoid(logit(entailment) + 4.5) — so that the natural 0.5 threshold corresponds to the model's real "likely entailed" boundary. This catches both strict entailments ("bachelor" → "unmarried") and weaker causal / pragmatic implications ("raining" → "ground wet") without letting unrelated pairs slip through. Calibration notes: - strict entailment → biased score 0.95-1.0 - strong causal → biased score 0.85-0.95 - weak causal → biased score 0.55-0.85 - unrelated → biased score 0.00-0.25 If you need LLM-style reasoning (world knowledge, multi-step deduction, subjective inference), use the IMPLIES_LLM operator — see implies_llm.cascade.yaml.

Examples

Function: Implication detected

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

Function: Causal implication

SELECT
  semantic_implies ('It is raining', 'The ground is wet')

Function: No logical implication

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

Infix IMPLIES: logical deduction

WITH
  t AS (
    SELECT
      'All birds can fly' AS premise
  )
SELECT
  premise
FROM
  t
WHERE
  premise IMPLIES 'Eagles can fly'

Infix IMPLIES: invalid overgeneralization

WITH
  t AS (
    SELECT
      'Some dogs are friendly' AS premise
  )
SELECT
  CASE
    WHEN premise IMPLIES 'All dogs are friendly' THEN 'yes'
    ELSE 'no'
  END
FROM
  t

Nearby rabbit holes

same domain
Climb back to The Looking Glass