Automated generation of training data