Recognizing useful and harmful materials