---
title: "Comment by Mihai_LeanZero on \"Sanitize or Fail: Two Ways to Handle Rule Violations in LLM Output\" | Hashnode"
description: "The em dash example draws the line well -- a deterministic string swap doesn't need a model in the loop at all. Where I'd want to know more is the boundary case"
url: "https://hashnode.com/posts/sanitize-or-fail-llm-output-violations/6abd815835485be1d4534c95/comment/6abdf833a2feabd63108b350"
---

[Discussion](https://hashnode.com/posts/sanitize-or-fail-llm-output-violations/6abd815835485be1d4534c95)

Comment [Sanitize or Fail: Two Ways to Handle Rule Violations in LLM Output](https://hashnode.com/posts/sanitize-or-fail-llm-output-violations/6abd815835485be1d4534c95)

[Mihai\_LeanZero](https://hashnode.com/@mihaileanzero)

[Oct 1](https://hashnode.com/posts/sanitize-or-fail-llm-output-violations/6abd815835485be1d4534c95/comment/6abdf833a2feabd63108b350)

The em dash example draws the line well -- a deterministic string swap doesn't need a model in the loop at all. Where I'd want to know more is the boundary case: a violation that's mechanically detectable (say a banned phrase) but where the fix isn't a safe one-to-one swap, it changes what the sentence actually claims. Does that kind get routed to fail by default, or is there a middle category that still gets a sanitize attempt with a stricter diff check before it's allowed through?
