A computer-implemented method comprising: generating, based on a plurality of candidate output tokens generated by a large
language model, LLM, a plurality of candidate token embeddings, respectively and generating, based on at least one string describing prohibited content, at least one content embedding; comparing the candidate token embeddings with the at least one content embedding to determine for each candidate output token a similarity
score indicating similarity between the candidate output token and the prohibited / unwanted content; for each candidate output token, generating, based on the similarity
score and based on a selection probability assigned by the LLM to the candidate output token, an output
score; and selecting, based on the output scores, a candidate output token for output by the LLM.