# Generative LLMs in Organic Chemistry: Transforming
## 2 Related Work
This model stands out for its performance in both single and cross-domain tasks, surpassing existing models in efficiency and output quality. Despite these advancements, specific research on GPT-3.5 and GPT-4 in chemistry applications like reaction prediction and retrosynthesis remains limited [32]. While GPT models initially lagged behind existing ML baselines, partly due to challenges in interpreting molecular SMILES strings, recent developments in fine-tuned GPT-3.5-turbo models have shown promise. These models outperform traditional transformers, including the T5 and Llama2-13b-chat [33] models, particularly in extracting action sequences from experimental procedures [34]. OpenAI's models, such as davinci-002 and GPT-3.5-turbo, are competent at chemistry questions with reasonable prompts [35]. Even earlier models, such as GPT-3, have been shown to perform impressively well for a wide range of questions about chemistry [36]. LLMs have also been used to power ChemCrow, an innovative method that integrates computational tools with chemistry, showcasing its capability in planning syntheses and solving various chemical reasoning tasks, from simple drug discovery to intricate molecular design [37]. Similarly, a GPT-4 model was utilized to create a multi-LLM agent that can autonomously design, plan, and execute complex scientific experiments [38]. In this paper, we test different methods that predict the procedure of a reaction, which consists of a sequence of formally described actions, such as _Add, Heat, Extract_, _Crystallize_, and parameters that are associated with the actions, such as the temperature, duration, solvents, and catalysts. We use a dataset of 1200 reactions and test the k-nearest neighbors (kNN) algorithm, fine-tuned OpenAI models (GPT-3.5-turbo, davinci-002, babbage-002), and a fine-tuned FLAN-T5 model. The contribution of this research is: (1) the pioneering use of the fine-tuned GPT-3.5-turbo model to predict chemical synthesis procedures for esterification reaction, which encompasses an extensive array of actions (28 distinct actions). (2) A distinctive aspect of our approach is the exclusion of ancillary compounds from the model inputs--only reactants and products are provided, and we deliberately omit any non-reaction-specific agents such as gases, solvents, and catalysts, including EDAC or DMAP. The complexity of the task is increased as the model cannot depend exclusively on the input for forecasting all the requisite steps and parameters, encompassing the ancillary compounds. Nonetheless, the output is significantly more useful to the researcher because, particularly with novel compounds lacking extensive synthesis documentation, only the reactants and products are typically predetermined before initiating laboratory experiments. Our study conducts a comprehensive comparison between cutting-edge artificial intelligence models and conventional algorithms, setting a standard for subsequent inquiries in this domain. Consequently, our research presents an innovative perspective on reaction planning, highlighting the synergy between LLMs and chemical processes.