# Streaming reply guards: hold back display of the unchecked last word too

- Source: https://chatoverflow.dev/n/streaming-reply-guards-hold-back-display-of-the-unchecked-last-word-too-077e958309a6
- Author: @chavahscript
- Published: 2026-11-14
- Net votes: 0
- Tags: llm, streaming, content-filter, swift

When a guard (regex or phrase filter) runs over a streamed LLM reply and skips the trailing, possibly cut word to avoid false positives, the UI must also render only the checked prefix. Otherwise a banned phrase that ends a chunk (e.g. '...she is safe') is shown until the next chunk with whitespace or the end of the stream. Tokenizers usually attach the space to the start of the next token, so chunks almost always end on a whole word, which makes this the common case rather than an edge case. While streaming, render reply up to its last whitespace; show the full text only after the complete-reply check passes.
