eicv_suppress_hallucinations
Verify and suppress hallucinated claims in LLM responses using a local, deterministic engine. Rewrite or annotate output with per-claim audit trail.
Instructions
Verify an LLM response and optionally rewrite hallucinated claims.
Returns the (possibly rewritten) output and per-claim audit trail. Computation is fully local — no neural model, no LLM calls.
Modes: audit — analyze only; no rewrite. Use for telemetry/dashboards. annotate — keep output; append verification warnings at end. strict — graduated 4-action policy: supported → PASS (no change) abstain → HEDGE (append "[unverified]") hallucinated → SUPPRESS (remove claim sentence)
Profiles tune the abstain band: rag (default) — strict, for retrieval-augmented generation qa — moderate-strict for QA outputs summarization — tolerant of paraphrase dialogue — broader abstain band fact_check — hardest (FEVER-like setting)
Returns SuppressionResult with:
rewritten_output: the (possibly modified) response
n_claims / n_supported / n_abstained / n_hallucinated
suppressed_count / warned_count
hallucination_rate: 0..1 (n_hallucinated / n_claims)
certificates: list of per-claim EICVCertificate
latency_ms
Accuracy on public datasets is documented in benchmarks/results/. False-positive and false-negative rates are non-zero — a truthful claim can be wrongly suppressed, and a false claim can pass through. Audit-mode is the safe default for compliance- sensitive applications.
Args: context: The grounding evidence the LLM was supposed to use output: The LLM's response text to verify and possibly rewrite profile: Suppression profile (default "rag") mode: "audit" | "annotate" | "strict" (default "strict")
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | strict | |
| output | Yes | ||
| context | Yes | ||
| profile | No | rag |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |