How to keep AI models on the straight and narrow