The only solution is to have a second LLM with a fixed prompt to double check the response of the first LLM.
No matter how smart your first LLM is, it will never be safe if the prompt comes from the user. Even if you put a human in there, they can be bribed or tricked.