Scientists have developed a peptide sensor to detect water-soluble polymers in wastewater, a major contributor to pollution on par with microplastics. The new technique takes advantage of the bonding that occurs between peptides and different polymers to train a machine learning algorithm that can identify a large number of pollutants in a single solution.