From Clinical Judgment to Checkable Rules: Clinician-Led Guardrails for Mental-Health Chatbots
Organizations: University of California, Irvine, USA
Abstract
Large language models (LLMs) deployed in mental-health contexts can be evaluated for safety failures, but the resulting judgments are often difficult to inspect or explain. Common approaches to improving safety rely on prompt engineering, LLM-as-a-Judge, and Constitutional AI. In this work, we describe a clinician-led alternative in which two clinicians define, finalize, and adjudicate the four safety checks of a rule base, which is formally verified for internal consistency and applied as a guardrail over LLM outputs. Here and in the title, clinician-led refers to this rule base, not to the fact extractor or the uncertainty default, which are ours. Every verdict of the resulting verification layer is recomputable from a named rule and sixteen facts. Against an LLM judge matched in model, revision, quantization, rule text, and decoding but without the layer's computed 988/911 fact, the largest disagreement class, the satisfied-rule class, is structured: the Llama-3.3-70B judge, on its primary prompt, demands a crisis resource from 55 of the 65 replies (84.6%) that already contain one, while the same model, asked as a fact extractor, reports a recognized resource present on 54 of the 55. The verification layer never raises that demand, by construction. We report with equal prominence where this judge is stronger: fewer false crisis alarms on the one reference-scored check. We also report the measured cost (a specification revision raised block-class outcomes on held-out boundary prompts of an over-refusal benchmark from 6.0% to 16.0%, chiefly by changing fact extraction), the clinicians' decision to keep our uncertainty default, and the analysis of the result. The contribution is not a safer verdict. It is a guardrail whose disagreements with the judge localize to named rules and facts and whose measured costs trace to named facts and the uncertainty default.
Figures & tables
| Pilot (19) | All (94) | |||
| Dimension | Raw | Raw | ||
| Category (7-class) | 17/19 | 0.842 | 81/94 | 0.793 |
| C1 crisis resources | 15/19 | 0.513 | 80/94 | 0.589 |
| C2 referral floor | 17/19 | 0.689 | 76/94 | 0.501 † |
| C3 medication bound. | 19/19 | 1.0 † | 93/94 | 0.883 † |
| C4 non-reinforcement | 19/19 | 1.0 † | 85/94 | 0.723 |
| Endpoint | Layer | Judge |
| Fires C1 on a reply containing 988/911 | 0/294 | 55/294 |
| Inconsistent with fact-extraction output (of those 55) | — | 54/55 |
| C1 false-fires † | 39/81 | 23/81 |
| C1 misses † | 2/13 | 2/13 |
| Block-class, direct-benign stratum | 22/50 | 4/50 |
| Outcome flips at , three seeds | 37/294 | 30/294 |
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
| check | agr. | stratum | agr. |
| C1 | 48.6% | direct benign | 46.0% |
| C2 | 42.2% | direct crisis | 36.0% |
| C3 | 95.2% | indirect knowledge | 30.0% |
| C4 | 63.9% | gold-anchored | 37.2% |
| rare-check (C3/C4) | 26.0% |
| fact (what it gates) | sens. | spec. |
| composite crisis signal (C1) | 83.3% (15/18) | 60.5% (46/76) |
| context (C4, NSSI trigger) | 80.0% (20/25) | 39.1% (27/69) |
| severity moderate (C2) | 94.9% (75/79) | 20.0% (3/15) |
| reply model | agree | layer block | judge block | |
| grok-4-fast | 66 | 17 (25.8%) | 28 (42.4%) | 35 (53.0%) |
| gpt-4o-mini | 58 | 27 (46.6%) | 49 (84.5%) | 32 (55.2%) |
| Llama-4-Scout-17B | 57 | 29 (50.9%) | 43 (75.4%) | 23 (40.4%) |
| deepseek-chat | 57 | 10 (17.5%) | 27 (47.4%) | 25 (43.9%) |
| gpt-5-nano | 56 | 21 (37.5%) | 19 (33.9%) | 25 (44.6%) |
| arm | agreement |
| judge, end to end (primary) | 104/294 = 35.4% |
| own per-check answers, our resolver | 115/294 = 39.1% |
| + no C1 fires on 988/911 replies | 122/294 = 41.5% |
| rerun with rationale permitted | 121/294 = 41.2% |
| fact | type | fail-closed |
| message side | ||
| crisis_indicated | bool | true |
| acute_distress | bool | true |
| lethal_means_mentioned | bool | true |
| medication_quantity_question | bool | true |
| distress_level | level | high |
LLM Guardrails
Large language model guardrails detect or constrain harmful outputs, prompt attacks, and unsafe agent actions before they cause harm.
See all 194 papers