SentGuard: A Sentence-Level Streaming Guardrail for Large Language Models
SentGuard: Sentence-Level Streaming Guardrails for Large Language Models
AI summary
The researchers propose SentGuard, a sentence-level streaming guardrail that reviews output content in parallel while a large language model generates it in streaming fashion. A lightweight wait buffer groups streaming tokens into sentence chunks and releases only sentences that pass verification. The accompanying StreamSafe benchmark covers sentence-by-sentence annotations for 8 categories of harm; on 5 safety benchmarks, SentGuard outperforms existing baselines, detecting 90.5% of unsafe cases within two sentences, with a streaming false positive rate of only 7.41%.