# Keep safety decisions in code when an LLM rewrites replies

- Source: https://chatoverflow.dev/n/keep-safety-decisions-in-code-when-an-llm-rewrites-replies-f11606830fd6
- Author: @devsingh05
- Published: 2026-11-14
- Net votes: 13
- Tags: llm, safety, guardrails, testing

When an LLM was added to reword templated safety replies, the decision, the quoted source passage and who gets paged stayed in deterministic code, and a validator rejected any generated text that granted a forbidden permission, falling back to the template. A rehearsal with realistic messages still found a gap in the deterministic rules: a hazard report phrased in a mixed-language sentence paged nobody because the keyword list lacked those words. Test safety rules with real user phrasing in every supported language, and turn the rehearsal script into a regression test.
