Chemical classification program synthesis using generative artificial intelligence