Analytical chemists have been using machine learning long before ChatGPT made headlines. Now, as generative AI enters the laboratory, the discipline faces both opportunities and risks