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.
Bug Fixes & Improvements
- Result-cache view check short-circuits when no views exist. Cache-ON deployments without views no longer pay a per-query parse/plan walk to discover that; hot point reads measure at parity with v2.1.1 (0.53 ms), and view staleness semantics are unchanged (verified: an UPDATE through a view is immediately visible).
- macOS:
install-ce.shnow fails fast with working guidance. The script is Linux-only (systemd, apt); on macOS it previously died mid-install with an error that looked like a broken package. It now points to theget.synapcores.combootstrap or running the extracted folder in place. - ONNX Runtime loader errors name the searched paths. If
libonnxruntime.dylib/.sois missing (the classic binary-only upgrade), the error lists the three locations searched and how to fix it (upgrade the whole extracted folder, or setORT_DYLIB_PATH).
Validation
Every gate ran against the published artifacts on a non-AVX-512 CPU: state-asserting feature validator 246/246; client-contract replay (bundled UI
- Python/Node SDK wire shapes) 8/8; pristine recipe certification with a failing-set identical to v2.1.1 (same-day A/B); read/memory A/B vs v2.1.1 median 1.003× with flat RSS; NLI fixture replay 32/32 identical; zero SIGILL.
Upgrade notes
- Drop-in binary/container swap from v2.1.1, v2.1.0, or v2.0.0.
- Tarball installs: upgrade the whole extracted folder, not the binary
alone — the engine loads the bundled ONNX Runtime from
lib/beside the executable (the loader error now tells you this, with the exact paths). - New installs that want NLI: run
synapcores --config <cfg> pull nli-defaultbefore first gateway start (the Docker image does this for you whenAIDB_NLI_ENABLED=1). - SQL NLI functions require the NLI bundle installed and ready; check
GET /v1/ai/nli/modelsforstate: "ready".