A fail-safe layered Guardrail for Emergency Detection in LLM Based Health Assistants

Large language model (LLM) assistants that answer health questions face an asymmetric error cost: failing to recognise a medical emergency can cause serious harm, whereas an unnecessary escalation costs only inconvenience. We present the safety layer of HealthSense AI, a multi-agent health information assistant, and describe a three-layer guardrail in which a deterministic keyword router first classifies risk, an LLM classifier then makes every final decision, and the deterministic layer serves as a fail-safe floor whenever the LLM is unavailable. We evaluate the design on an 87-case test suite covering emergency must-block prompts, safe controls, output-side blocking, and adversarial paraphrases, including a 31-case independently written adversarial set. The final system achieves 100% emergency recall (25/25), 100% output-guardrail accuracy (13/13), and zero false alarms. We also report a failure found during development — an earlier deterministic whitelist that overfitted the initial test set — and the redesign it motivated. All code and test cases are public at github.com/smita-datascience/healthsense-ai.

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-09-04
DOI
https://doi.org/10.5281/zenodo.22296121
Primary Topic
Topic Modeling
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

A fail-safe layered Guardrail for Emergency Detection in LLM Based Health Assistants

Amitabha Bagchi
Zenodo (CERN European Organization for Nuclear Research)
Topic Modeling
article

A fail-safe layered Guardrail for Emergency Detection in LLM Based Health Assistants

Amitabha Bagchi
article en

Abstract

Large language model (LLM) assistants that answer health questions face an asymmetric error cost: failing to recognise a medical emergency can cause serious harm, whereas an unnecessary escalation costs only inconvenience. We present the safety layer of HealthSense AI, a multi-agent health information assistant, and describe a three-layer guardrail in which a deterministic keyword router first classifies risk, an LLM classifier then makes every final decision, and the deterministic layer serves as a fail-safe floor whenever the LLM is unavailable. We evaluate the design on an 87-case test suite covering emergency must-block prompts, safe controls, output-side blocking, and adversarial paraphrases, including a 31-case independently written adversarial set. The final system achieves 100% emergency recall (25/25), 100% output-guardrail accuracy (13/13), and zero false alarms. We also report a failure found during development — an earlier deterministic whitelist that overfitted the initial test set — and the redesign it motivated. All code and test cases are public at github.com/smita-datascience/healthsense-ai.

Zenodo (CERN European Organization for Nuclear Research)
Indian Institute of Science Bangalore (IN)
European Commission
Peace, Justice and strong institutions
Openalex Percentile: Top 8%
Topic Modeling
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.