Views
No views yet
| Route | Description |
|---|---|
arithmetic | Verifies that a OP b == result (exhaustive over +, −, ×, ÷) |
comparison | Checks less_than / greater_than / between relations |
cardinality | Count constraints: exact equality or between-range |
set_membership | Element in / not in set checks against bound variables |
boolean_entailment | Attribute/property equality claims against a known vocabulary |
formalization_status != "formalized" — claim was not fully parsedcandidate_solver_route is not in the supported set abovenot_contains set-membership (requires scanning text not in claim struct)arithmetic_route.onnx — input operands [batch, 3] → output verdict [batch]
verdict[i] = 1 if |a − b − result| < 0.5, else 0comparison_route.onnx — input operands [batch, 2] → output verdict [batch]
verdict[i] = 1 if x < y (less_than), else 0boolean_entailment and set_membership routes are packaged as Python
modules (pure Python, no ONNX required).pip install carnot1from carnot.pipeline import FormalClaimVerifier
2from carnot.pipeline.formal_claim_verifier import normalize_claim
3
4# Initialize the verifier
5fcv = FormalClaimVerifier()
6
7# Verify a single raw claim dict
8raw_claim = {
9 "claim_id": "c1",
10 "claim_text": "100 minus 24 equals 76",
11 "candidate_solver_route": "arithmetic",
12 "formalization_status": "formalized",
13 "relation_type": "equation",
14 "operands": [100.0, 24.0, 76.0],
15 "target": "",
16 "bound_variables": [],
17}
18claim = normalize_claim(raw_claim)
19verdict = fcv.verify_claim(claim)
20print(verdict.verdict) # "supported"
21print(verdict.route) # "arithmetic"1from carnot.pipeline.formal_claim_verifier import verify_formal_claims
2
3results = verify_formal_claims([raw_claim1, raw_claim2, raw_claim3])
4print(results.counts) # {"supported": 2, "violated": 1, "abstain": 0}
5print(results.route_counts) # {"arithmetic": 2, "comparison": 1}1import onnxruntime as ort
2import numpy as np
3
4sess = ort.InferenceSession("arithmetic_route.onnx", providers=["CPUExecutionProvider"])
5operands = np.array([[100.0, 24.0, 76.0]], dtype=np.float32)
6[verdict] = sess.run(None, {"operands": operands})
7print(int(verdict[0])) # 1 (supported)arithmetic_route.onnx — arithmetic checker (opset 13)comparison_route.onnx — less-than comparison checker (opset 13)verifier.py — pure-Python module (set_membership + boolean_entailment routes)README.md — this file1@misc{carnot-fcv-2026,
2 title={FormalClaimVerifier: Solver-Routed Deterministic Claim Verification},
3 author={Carnot Research},
4 year={2026},
5 url={https://github.com/ianblenke/carnot}
6}| Model | GSM8K Baseline Accuracy | 95% CI | N |
|---|---|---|---|
| Gemma4-E4B-it | 26.3% | [22.2%, 30.8%] | 400 |
| Qwen3.5-0.8B | 27.5% | [23.4%, 32.1%] | 400 |
results/experiment_316_fullscale_results.json.pip install carnot