Support-Response Grounding with NLI

Verify every claim in a drafted support reply against the approved plan guide before it reaches the customer

All recipes· ml· 10 minutesintermediateen
Instance: localhost:8080

Opens your running SynapCores (Support-Response Grounding with NLI will be staged for a preview — nothing runs until you click Run). No instance yet? Install free in ~30s.

Share

Support-Response Grounding with NLI

Objective

A drafted support reply promises something the approved support guide may not back — "yes, phone support is included" costs real money when it isn't. Split the draft into atomic claims and verify each against the guide passage for the customer's actual plan, in-process, before the reply is sent.

Step 1: A claim the guide supports

curl -s -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  -d '{
    "model": "nli-default",
    "statement": "Email support is included in the standard plan.",
    "truth_anchors": ["The standard plan includes email support."],
    "closed_world": false,
    "contradiction_threshold": 0.6, "entailment_threshold": 0.6
  }' http://localhost:8080/v1/ai/nli/verify

Expected (verified on v2.1.1-ce): verdict TRUTH on a qualifying entailment (0.99+) — the paraphrase is supported. This clears one claim, not the whole reply.

Step 2: A claim the guide explicitly excludes

curl -s -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  -d '{
    "model": "nli-default",
    "statement": "The standard plan includes phone support.",
    "truth_anchors": ["The standard plan does not include phone support."],
    "closed_world": false,
    "contradiction_threshold": 0.6, "entailment_threshold": 0.6
  }' http://localhost:8080/v1/ai/nli/verify

Expected (verified): verdict LIE, contradiction 1.00, the violated anchor named in the response — the draft reverses the guide. Route the reply back for correction.

Step 3: Why compound claims must be split

curl -s -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  -d '{
    "model": "nli-default",
    "statement": "The standard plan includes email support and phone support.",
    "truth_anchors": ["The standard plan includes email support."],
    "closed_world": false,
    "contradiction_threshold": 0.6, "entailment_threshold": 0.6
  }' http://localhost:8080/v1/ai/nli/verify

Expected (verified): verdict UNVERIFIED_PLAUSIBLE, neutral 1.00 — one supported clause cannot establish the extra clause. Split compound sentences into atomic claims and verify each on its own.

Use it from your app

Wire this as the last gate in your reply pipeline: generate → segment into claims → select the guide passages for the customer's plan → /verify each claim → block or flag on any non-entailment. Retrieving the right guide version and splitting sentences is your application's job; the classifier checks exactly the text you give it.

Key Concepts Learned

  • Verify claims one at a time — compound claims dilute to neutral.
  • An explicit exclusion in the evidence turns an optimistic promise into a detectable contradiction.
  • One entailment approves one claim, never the whole response.

Tags

nliclaim-verificationcustomer-supportgroundingguardrailrest

Run this on your own machine

Install SynapCores Community Edition free, paste the SQL or Cypher above into the bundled web UI, and watch it run.

Download Free CE