isn't this whole problem category technologically solved by applying an approach equivalent to preventing SQL injection using prepared statements?
because at this point most "experts" seem to confuse talking to an LLM with having the LLM trigger an action. this whole censoring problem is of course tricky but if it's about keeping the LLM from pulling a good ole `format C` then this is done by feeding the LLM result into the interpreter as a prepared statement and control execution by run of the mill user rights management.
a lot of the discussion seems to me like rediscovering that you cannot validate XML using regular expressions.