Skip to content
jeff.reasoning.contradictsv1.4.0

Contradiction check

Checks whether two statements or records conflict. Returns yes, no or unclear when the information is ambiguous.

Open in playground

Example

Context

setting
The pharmacy team of a district hospital checks each patient's medicines when they are discharged.
statement_a
source: discharge letter, ward 6, 2 November 2026 text: Medicines on discharge: ramipril 5 mg once daily; atorvastatin 40 mg at night; bisoprolol 2.5 mg once daily. Metformin stopped on admission because of reduced kidney function; do not restart until reviewed by the GP.

Input

source: community pharmacy repeat prescription record, printed 3 November 2026 text: Repeat items for this patient: ramipril 5 mg once daily; atorvastatin 40 mg at night; metformin 500 mg twice daily (next issue due 6 November 2026).

Answer (JSON)
value yes, confidence 0.975
Top options
  1. yes 0.975
  2. no 0.022
  3. unclear 0.003

The hospital stopped metformin at discharge, but the pharmacy's repeat record still issues it, so the answer is yes.

Open in playground

import os import jeff with jeff.Jeff.remote("https://api.jeffhub.ai", token=os.environ["JEFF_API_KEY"], timeout_s=30) as client:     decide = client.function("jeff.reasoning.contradicts.contradicts", context={        "setting": "The pharmacy team of a district hospital checks each patient's medicines when they are discharged.",        "statement_a": {            "source": "discharge letter, ward 6, 2 November 2026",            "text": "Medicines on discharge: ramipril 5 mg once daily; atorvastatin 40 mg at night; bisoprolol 2.5 mg once daily. Metformin stopped on admission because of reduced kidney function; do not restart until reviewed by the GP.",        },    })     decision = decide({        "source": "community pharmacy repeat prescription record, printed 3 November 2026",        "text": "Repeat items for this patient: ramipril 5 mg once daily; atorvastatin 40 mg at night; metformin 500 mg twice daily (next issue due 6 November 2026).",    })     print(decision.value, decision.confidence)

More examples

  • Penicillin allergy in a GP letteranswer yes · confidence 0.941

    Context

    setting
    The front desk team of a community health clinic reviews patient records before appointments.
    statement_a
    source: record entry text: Allergies: none known. Last reviewed 12 January 2026.

    Input

    source: GP letter, 10 January 2026 text: The patient has a confirmed penicillin allergy, recorded in 2019.

    Answer (JSON)
    value yes, confidence 0.941
    Top options
    1. yes 0.941
    2. no 0.058
    3. unclear 0.001

    The record says no known allergies, but a letter from before that review confirms a penicillin allergy, so the answer is yes.

    Open in playground

    import os import jeff with jeff.Jeff.remote("https://api.jeffhub.ai", token=os.environ["JEFF_API_KEY"], timeout_s=30) as client:     decide = client.function("jeff.reasoning.contradicts.contradicts", context={        "setting": "The front desk team of a community health clinic reviews patient records before appointments.",        "statement_a": {            "source": "record entry",            "text": "Allergies: none known. Last reviewed 12 January 2026.",        },    })     decision = decide({        "source": "GP letter, 10 January 2026",        "text": "The patient has a confirmed penicillin allergy, recorded in 2019.",    })     print(decision.value, decision.confidence)
  • Same appointment in two wordsanswer no · confidence 0.604

    Context

    setting
    The front desk team of a community health clinic reviews patient records before appointments.
    statement_a
    source: booking system text: Next appointment: Thursday 12 November 2026, 14:30, with the practice nurse.

    Input

    source: reminder text sent to the patient text: Reminder from Brookfield Health Centre - you are seeing the nurse on Thursday 12 November at 2.30 pm.

    Answer (JSON)
    value no, confidence 0.604
    Top options
    1. no 0.604
    2. yes 0.391
    3. unclear 0.004

    The booking and the reminder give the same day, time and nurse in different words, so the answer is no.

    Open in playground

    import os import jeff with jeff.Jeff.remote("https://api.jeffhub.ai", token=os.environ["JEFF_API_KEY"], timeout_s=30) as client:     decide = client.function("jeff.reasoning.contradicts.contradicts", context={        "setting": "The front desk team of a community health clinic reviews patient records before appointments.",        "statement_a": {            "source": "booking system",            "text": "Next appointment: Thursday 12 November 2026, 14:30, with the practice nurse.",        },    })     decision = decide({        "source": "reminder text sent to the patient",        "text": "Reminder from Brookfield Health Centre - you are seeing the nurse on Thursday 12 November at 2.30 pm.",    })     print(decision.value, decision.confidence)
  • Delivery date written the other way roundanswer unclear · confidence 0.998

    Context

    setting
    The purchasing team of a furniture maker that orders from suppliers in several countries checks orders against confirmations.
    statement_a
    source: purchase order text: Delivery of 120 oak boards required on 04/05/2026.

    Input

    source: supplier's order confirmation text: We confirm delivery of the 120 oak boards on 4 May 2026.

    Answer (JSON)
    value unclear, confidence 0.998
    Top options
    1. unclear 0.998
    2. no 0.001
    3. yes 0.001

    04/05/2026 is 4 May in one way of writing dates and 5 April in the other, so whether they conflict is unclear.

    Open in playground

    import os import jeff with jeff.Jeff.remote("https://api.jeffhub.ai", token=os.environ["JEFF_API_KEY"], timeout_s=30) as client:     decide = client.function("jeff.reasoning.contradicts.contradicts", context={        "setting": "The purchasing team of a furniture maker that orders from suppliers in several countries checks orders against confirmations.",        "statement_a": {            "source": "purchase order",            "text": "Delivery of 120 oak boards required on 04/05/2026.",        },    })     decision = decide({        "source": "supplier's order confirmation",        "text": "We confirm delivery of the 120 oak boards on 4 May 2026.",    })     print(decision.value, decision.confidence)
  • Two shifts on the same dayanswer no · confidence 0.842

    Context

    setting
    The rota team of a hotel restaurant checks staff schedules for clashes.
    statement_a
    source: rota text: Elif Kaya works the breakfast shift on Saturday 7 November, 06:00 to 11:00.

    Input

    source: rota text: Elif Kaya works the dinner shift on Saturday 7 November, 17:00 to 23:00.

    Answer (JSON)
    value no, confidence 0.842
    Top options
    1. no 0.842
    2. yes 0.158
    3. unclear 0

    A breakfast shift and a dinner shift on the same day do not overlap, so the answer is no.

    Open in playground

    import os import jeff with jeff.Jeff.remote("https://api.jeffhub.ai", token=os.environ["JEFF_API_KEY"], timeout_s=30) as client:     decide = client.function("jeff.reasoning.contradicts.contradicts", context={        "setting": "The rota team of a hotel restaurant checks staff schedules for clashes.",        "statement_a": {            "source": "rota",            "text": "Elif Kaya works the breakfast shift on Saturday 7 November, 06:00 to 11:00.",        },    })     decision = decide({        "source": "rota",        "text": "Elif Kaya works the dinner shift on Saturday 7 November, 17:00 to 23:00.",    })     print(decision.value, decision.confidence)

Use when

  • You need to identify disagreements between documents, messages or records.

Avoid when

  • You need to check whether evidence supports a claim; use Claim support check.

Context and input

FieldKindDescription
statement_b
inputThe second statement or record, in the same form as statement_a.
setting
contextWho is asking: a sentence naming the team and organisation the statements come from.
statement_a
contextThe first statement or record: an object with `source` (for example record entry, email, report) and `text`.

Functions

KeyInterfaceInstructionsLabels
contradictsclassifyDo these two statements or records conflict? Answer yes when they cannot both be true about the same thing at the same time, whether the conflict is stated outright or follows from what they say. Answer no when both can be true, including when they are about different things or different times, or one only adds detail. Answer unclear only when they conflict under one reasonable reading and not under another, and neither settles which: for example when it is not clear whether they refer to the same item, when a date or quantity can be read two ways, or when it is not clear who holds a role.no, unclear, yes

How it was measured

Test accuracy: the share of test rows whose top answer was right.

  • 94.5% on public benchmarks: 500 rows of SNLI and 500 of VitaminC (1,000 rows). public benchmark
  • 96.4% on the in-house test (1,931 rows). in-house: same generator as the training data
  • 96.5% on the in-house test in domains never seen in training (1,939 rows). in-house: same generator as the training data

When confident

From the calibration set: at or above the threshold confidence, how often the answer is right, and how often the adapter is that confident. Below it, escalate.

FunctionRight when confidentConfident onThresholdCalibration rows
contradicts98.0%97.4%0.661,933

Base: Jeff v1.4. Adapter trained: 25 October 2026.

Base

jeff-base v1.4

Call it

jeff.reasoning.contradicts.contradicts, with placeholders for its input and context.

import os import jeff with jeff.Jeff.remote("https://api.jeffhub.ai", token=os.environ["JEFF_API_KEY"], timeout_s=30) as client:     decide = client.function("jeff.reasoning.contradicts.contradicts", context={        "setting": "<setting>",        "statement_a": "<statement_a>",    })     decision = decide("<statement_b>")     print(decision.value, decision.confidence)

Download

Weights: mstrasser/jeff-adapter-contradicts (v1.4)

Licence: Apache-2.0