The model takes as input molecules encoded as SMILES strings. Initial experiments on a small development dataset revealed that this encoding performs on par or slightly better than SELFIES and DeepSMILES, while having favorable computational requirements due to their shorter lengths. SMILES strings were tokenized with one token per atom, so that C and Cl were mapped to different tokens, resulting in 305 tokens in total. The model was presented with the SMILES string in canonical order 25% of the times, and a randomized atom order is used in the other 75% of the times. Regardless of the order, 50% of the time we kekulized the SMILES. APIs, we combined the reagents with all detected impurities that were detected. From this in silico constructed reactions, we performed in the first step an atom-mapping based on RXNMapper. Subsequently, we extracted a reaction template for this hypothetical reaction leading to an observed impurity applying the RDChiral library. Overall, this approach resulted in 4,446 templates.