SynapCores v2.1.2-ce — Release Notes
v2.1.2 puts truth verification in SQL. The NLI engine that shipped behind REST endpoints in v2.1.1 is now callable from any query — classify a claim against evidence, verify an LLM answer against trusted anchors, and gate what your application stores or shows, all in one statement on the same single binary. And the verification engine itself got 26–33× faster, so checking an answer now costs milliseconds, not seconds.
New Features
NLI in SQL — verify claims where your data lives
Three new functions wire the in-process DeBERTa-v3 NLI cross-encoder into the SQL surface:
-- Score one claim against one piece of evidence
SELECT NLI_CLASSIFY('nli-default',
'The deployment finished at 14:02 with zero failed checks.', -- premise
'The deployment failed.' -- hypothesis
) AS scores;
-- → {"contradiction": 0.98, "entailment": 0.01, "neutral": 0.01}
-- Verify a statement against a set of truth anchors
SELECT NLI_VERIFY('nli-default',
'The rollout completed without failures.',
json_array(
'The deployment finished at 14:02 with zero failed checks.',
'All 46 post-deploy probes passed.'
)
) AS verdict;
-- → {"verdict":"TRUTH","confidence":0.96,"matched_anchor":...}
-- Collect anchor sets from rows (bounded aggregate, up to 32 anchors)
SELECT NLI_VERIFY('nli-default', $answer, NLI_ANCHORS(fact_text)) AS verdict
FROM run_evidence WHERE run_id = $run;
Verdicts are TRUTH, LIE, or UNVERIFIED_PLAUSIBLE; a contradiction with
any anchor takes precedence over entailment, and an optional
closed_world: true mode rejects anything your anchors don't support. The
same pinned model answers SQL and the /v1/ai/nli/* REST endpoints — one
registry, no sidecar, no network hop.
Business benefit: hallucination-gating an AI answer used to mean exporting
evidence to an external NLI service and joining the result back. Now it's a
WHERE-clause decision: store the agent's answer only if it's entailed by
the retrieval set, with the evidence, the verdict, and the audit row in one
database.
Honest limits: anchor sets cap at 32 anchors and texts at 16 KB per side;
like other AI functions, call it through an alias rather than directly in
ORDER BY; NLI results are never served from the SQL result cache.
Verification is 26–33× faster
v2.1.1 padded every premise/hypothesis pair to the model's full 512-token
window. v2.1.2 packs dynamic-length batches under token budgets instead.
Measured on CPU (i5-10400F, same pinned nli-default model, medians of 7):
| Operation | v2.1.1 | v2.1.2 |
|---|---|---|
| verify, 1 anchor | 394 ms | 15 ms |
| verify, 4 anchors | 1.55 s | 52 ms |
| verify, 16 anchors | 6.19 s | 192 ms |
| verify, 32 anchors | 11.1 s | 335 ms |
| classify, 16 pairs | 5.56 s | 155 ms |
Scores are unchanged: all 32 release-QA fixtures return bit-identical verdicts, labels, and error codes vs v2.1.1. The speedup applies to the REST endpoints and the new SQL functions alike.
Business benefit: per-row verification in a pipeline was ~0.4 s/row — batch-job territory. At ~15 ms/row it fits inline in an agent loop or an INSERT path.