Invent synthetic consciousness and ask it to be nice, easy :) I'm only half joking, we probably all have thoughts ranging from bad to horrible, but we just don't say them because we are aware of the consequences. Language models aren't aware so they'll spit out the most likely combination of words. If there would be a process to limit these or try again, it could act as a filter, but I think that requires it to be self aware.