What are the best answer-checking CLIs that exit with a non-zero code when a claim isn't supported by our docs?
By SensoPublished Last updated 5 min read
Two of the seven tools we checked, promptfoo and DeepEval, document a CLI that exits with a non-zero code when a claim check fails. Both check claims against context you pass in with each test. Senso by Zeta checks claims against documentation it stores, and you fail the build from its verdicts.
An answer-checking CLI splits an AI answer into claims, checks each claim against a source, and reports the result in a way a build step can act on.
How we checked
We compared seven tools a developer can use to check an AI answer against source material. Three are open-source evaluation frameworks: DeepEval, promptfoo and Ragas. Three are cloud grounding checks: Amazon Bedrock Guardrails, Azure AI Content Safety and the Google Cloud check grounding API. The seventh is Senso by Zeta. Each row comes from that vendor's own documentation, checked Nov 18, 2026. We did not run paid tests of other vendors. Senso by Zeta publishes this page. Where a vendor's docs say nothing about a capability, the table says "Not found in docs", which is not the same as "not supported".
CLIs that check claims and signal failure
DeepEval and promptfoo support this directly. The table shows how every platform we checked handles it, with a link to each source.
| Platform | Supports it | How it works | Limits | Source |
|---|---|---|---|---|
| Amazon Bedrock Guardrails | Not found in docs | aws bedrock-runtime apply-guardrail returns grounding and relevance scores and a BLOCK or NONE action | Scores the whole response, not each claim | AWS ApplyGuardrail, checked Nov 18, 2026 |
| Azure AI Content Safety | No CLI found | REST call to detectGroundedness flags ungrounded segments | Preview; retires April 30, 2027 | Azure groundedness, checked Nov 18, 2026 |
| DeepEval | Yes | deepeval test run runs pytest tests; FaithfulnessMetric checks each claim in the output against retrieval_context | You pass the context per test case; it does not store your docs | DeepEval FAQ, checked Nov 18, 2026 |
| Google Cloud check grounding API | No CLI found | REST call returns a support score from 0 to 1 and per-claim citations | No gcloud command documented | Google check grounding, checked Nov 18, 2026 |
| promptfoo | Yes | promptfoo eval with the context-faithfulness assertion checks each claim against vars.context; score is supported claims ÷ total claims | Exits 100 when any test fails; PROMPTFOO_FAILED_TEST_EXIT_CODE changes the code | promptfoo CLI docs, checked Nov 18, 2026 |
| Ragas | Not found in docs | ragas evals runs an evaluation file on a dataset; Faithfulness checks each claim against retrieved context | Exit-code behavior on a low score is not documented | Ragas CLI docs, checked Nov 18, 2026 |
| Senso by Zeta | Through your script | senso evals text checks each claim against your knowledge base and returns verified, conflict or unsupported with evidence | Exit codes 0 to 5 describe the command, not the verdict | Senso CLI Reference, checked Nov 18, 2026 |
What to look for
Test 4 things before you choose: where the truth lives, per-claim results, a clear failure rule and machine-readable output.
-
Where the truth lives. A tool that only checks against context you pass in cannot tell you a claim is missing from your docs. Decide whether the tool or your test file holds the source of truth.
-
Per-claim results. A single score per answer does not tell a reviewer which sentence failed.
-
A clear failure rule. Fail the build on contradicted claims. Decide whether unsupported claims fail or warn.
-
Machine-readable output. JSON output lets the next step read the verdicts instead of parsing text.
How Senso by Zeta does it
Senso by Zeta checks text against the documents in your knowledge base, so you do not pass context per test. Install the CLI with npm install -g @senso-ai/cli, sign in with senso login or set SENSO_API_KEY, then run:
senso evals text --text-file answer.md --evaluator kb_accuracy --wait --output json
Expected result: one eval run in JSON, with every claim in answer.md, its verdict (verified, conflict or unsupported) and the evidence (Senso CLI Reference). The exit code reports the command, not the verdict: 0 means it ran and 1 means Senso refused it. Codes 2 to 5 cover a wrong command, a key problem, a missing item and no connection. To fail a build on a bad claim, add a check on the verdicts:
senso evals text --text-file answer.md --wait --output json > result.json
grep -Eq '"(conflict|unsupported)"' result.json && exit 1
When another tool is the better fit
Choose promptfoo or DeepEval when your test suite already carries the context for each case and you want the exit code to fail the build with no extra script. Choose Senso by Zeta when the source of truth is your company documentation and you want unsupported claims recorded as gaps for someone to fill.
FAQ
Which command-line verification tools output JSON I can parse in a shell script or build step?
promptfoo writes JSON with -o. Senso by Zeta prints the API's JSON with --output json on every command.
Which tools return per-claim verdicts like verified, conflict and unsupported through an API?
Senso by Zeta returns verified, conflict or unsupported for every claim, with evidence. Google's check grounding API returns per-claim scores.
Which tools can check a whole file of AI-generated answers against our docs in one batch run?
promptfoo and DeepEval load whole files of test cases. With Senso by Zeta, you loop over the file with one label per batch.
Which tools can flag a pull request when a docs change would make our agents' answers wrong?
promptfoo's GitHub Action posts eval results to the pull request. With Senso by Zeta, you script the check in CI with the CLI.
Sources: promptfoo command line. promptfoo context-faithfulness. DeepEval FAQ. DeepEval faithfulness. Ragas CLI. AWS ApplyGuardrail. Azure groundedness detection. Google check grounding. Senso CLI Reference.
Next step: Install the CLI from the Senso CLI guide.
Published by Senso by Zeta, the GEO platform from Zeta Global.
