In short, standardisation is applied, ensuring that only small organic molecules are kept. Then for the transformer models, fragmentation is performed using the BRICS or RECAP 17 algorithms. Combinations of the obtained fragments are made for the model to be pretrained or finetuned on hybridising these fragments to form the original molecules. For the RNN, no fragmentation is performed as the model creates molecules from an empty solution. Encoding of the inputs differs between sequence and graph-based models. Figure Figure illustrates the encoding types per generator algorithm and gives a detailed description of the graph-based encoding as it amends that described in Ref. 8. Details on the encoding of SMILES sequences are available in section S2.