We combine mass spectrometry with machine learning that is predictive and explainable using chemical reactivity flowcharts for diagnostic ion–molecule reactions.