Objective
Before wiring NLI verdicts into anything automated, learn where the model class is weak — on your engine, your model, your thresholds. Each probe below has a defensible correct answer; run them all, record what your deployment actually returns, and let the misses define the boundary of what you automate.
Run it in SQL (v2.1.2-ce+)
Run the probes inline in SQL on your own engine, model, and thresholds — each has a defensible correct answer, and the misses define the boundary of what you can safely automate. Two to start:
-- Directional entailment: "a red car" implies "a vehicle", not the reverse.
SELECT NLI_CLASSIFY('nli-default', 'A red car is parked.', 'A vehicle is parked.') AS forward,
NLI_CLASSIFY('nli-default', 'A vehicle is parked.', 'A red car is parked.') AS backward;
Expected: forward entailment ≈ 0.997, backward ≈ 0.0004.
-- Synonymy the model handles well: "held in" vs "stored in".
SELECT JSON_UNQUOTE(JSON_EXTRACT(NLI_VERIFY('nli-default',
'Parcel P1 is held in room R2.',
JSON_ARRAY('Parcel P1 is stored in room R2.')), '$.verdict')) AS synonym_case;
Expected: TRUTH. Record what your deployment returns for every probe in
this battery before wiring verdicts into anything automated.
Step 1: Direction — entailment is one-way
curl -s -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
-d '{
"model": "nli-default",
"pairs": [
{"premise": "A red car is parked.", "hypothesis": "A vehicle is parked."},
{"premise": "A vehicle is parked.", "hypothesis": "A red car is parked."},
{"premise": "No vehicle is parked.", "hypothesis": "A vehicle is parked."}
]
}' http://localhost:8080/v1/ai/nli/pairs
Correct: entailment / neutral / contradiction. A model that scores pair 2 as
entailment is pattern-matching overlap, not reasoning. Observed on v2.1.1-ce
with nli-default: all three correct, each above 0.99.
Step 2: The probes that fail in production
Each is one /verify call; the body's statement and anchor are shown as
claim ⟂ evidence:
# Ambiguous pronoun — correct: neutral ("they" has no resolved referent)
# "Jordan approved the request." ⟂ "Morgan spoke to Jordan after they approved the request."
# Numeric upper bound — correct: neutral (at most 10 ≠ exactly 10)
# "The service limit is exactly 10 users." ⟂ "The service limit is at most 10 users."
# Numeric conflict — correct: contradiction (5 kg vs 10 kg, same parcel)
# "The parcel weighs exactly 10 kilograms." ⟂ "The parcel weighs exactly 5 kilograms."
# Role reversal — correct: neutral (Alice paying Bob ≠ Bob paying Alice)
# "Bob paid Alice." ⟂ "Alice paid Bob."
# Quoted ≠ asserted — correct: neutral (quoting a claim is not asserting it)
# "The system is secure." ⟂ "The reviewer wrote the sentence \"The system is secure\" as an example of an unsupported claim."
# Nested negation — correct: contradiction
# "The backup is enabled." ⟂ "It is not true that the backup is enabled."
curl -s -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
-d '{
"model": "nli-default",
"statement": "The backup is enabled.",
"truth_anchors": ["It is not true that the backup is enabled."],
"closed_world": false,
"contradiction_threshold": 0.6, "entailment_threshold": 0.6
}' http://localhost:8080/v1/ai/nli/verify
Run each pair the same way and record the scores — misses here are normal for this model class, and knowing which ones miss is the deliverable.
Observed on v2.1.1-ce with nli-default (your results may differ):
| Probe | Correct | Observed | Direction of the miss |
|---|---|---|---|
| Ambiguous pronoun | neutral | TRUTH (0.96) | optimistic — would accept an unresolved "they" |
| Numeric upper bound | neutral | neutral (0.96) | correct |
| Numeric conflict | contradiction | contradiction (1.00) | correct |
| Role reversal | neutral | LIE (1.00) | conservative — flags instead of accepting |
| Quoted ≠ asserted | neutral | TRUTH (0.77) | optimistic — the dangerous one; see below |
| Nested negation | contradiction | contradiction (0.94) | correct |
The quoted-claim miss is the one to design around: text that mentions a claim ("the reviewer wrote the sentence '…' as an example of an unsupported claim") can certify the claim as TRUTH. Strip quotations and reported speech from evidence before verification, or exclude such passages from anchor selection entirely.