How to avoid training a harasser
This might prove futile, in my eyes. If you mandate something like sensitivity training, say, you will teach those naturally well-behaved little, and those who carry the germ of future mis-behavior to hide it. If you advise students from different cultures, on the other hand, it might help them to learn what is appropriate in yours. So in that case it might be a good idea as some mis-behavior results merely from different cultural norms (a kind and friendly Asian co-student shared a racist joke via email with all my school - because he didn't recognize it for what it was). For anything happening while working with you, you should make it explicitly known that you encourage your students and postdocs to talk to you should one of them feel that they were treated inappropriately by another; that you always have an open door. 

Marcus Aurelius was a philosopher emperor devoted to service and tolerance; his son Commodus arguably the most wicked Roman emperor in the history of the Roman Empire. You try to set a good example, but that is probably all you can do. Don't beat yourself up over what happened.