# Language Models for Predicting Organic Synthesis Procedures
## 4 The Data
### PRP-931k Dataset Overview
**Detailed PRP-931k dataset output analysis. ** The output character sequences range from 21 to 600 characters in length. The average input lengths were consistent across subsets: training (238.7 characters), validation (239.9 characters), and testing (238.3 characters). The synthesis procedures ranged from a minimum of four actions to a maximum of twenty-nine. The average action counts of the procedures across the subsets were also uniform: training (12.3 actions), validation (12.4 actions), and testing (12.3 actions). There is a minimum action number of two and a maximum of thirty-nine overall. A histogram visually represents the distribution of procedure lengths by the number of actions (Figure 2). The histogram resembles a normal distribution with the majority of instances are concentrated between six and twenty actions. Figure 1: TMAP graph with Schneider 50k and PRP-931k combined. The most common actions are _Add_ (28.71% of all actions), _Stir_ (9.27%), _Concentrate_ (8.97%), _Yield_ (8.24%), and _MakeSolution_ (6.57%). The dataset is highly imbalanced in terms of actions; however, this is the feature of organic synthesis procedures mined from patent applications. Actions like _Partition_ (0.39%), _Microwave_ (0.20%), or _Sonicate_ (0.02%) are used less often and therefore comprise only a small percentage of all actions. The full breakdown of action numbers can be found in Table 3.  
The action _Add_ has a single parameter which is a name of the compound that should be added. The most common added names are tokens for reactants and the \"SLN\" token, which stands for \"solution\" and usually follows the _MakeSolution_ action. The most common non-token values are solvents like water, ethyl acetate, DCM, and methanol, and agents like TEA (Triethanolamine) and DIPEA (N,N-Disopropylethylamine). A total of 32,095 unique names can be added via this action in our current dataset, of which 646 occurred more than 100 times. The _MakeSolution_ action can include multiple compounds and features solvents like THF, DCM, DMF, methanol, and water as the most frequently combined components in addition to the reactant tokens. A total of 16,121 unique names can be combined, of which 359 occurred more than 100 times. Common work-up actions (_Wash_, _Extract_, _Purify_, _DrySolution_) feature solvents as parameters together with the specific numeric notation. For example, the action _Wash_ is most often performed with brine, water, or sodium bicarbonate. The extract action is primarily performed with ethyl acetate, dichloromethane, diethyl ether, \begin{table}
\begin{tabular}{r r r r r} \hline \hline
**Action Name** & **Count** & **\% of Total** & **Action Name** & **Count** & **\% of Total** \\ \hline Add & 3,282,648 & 28.71 & Reflux & 112,076 & 0.97 \\ Stir & 1,061,384 & 9.27 & PH & 104,997 & 0.91 \\ Concentrate & 1,028,446 & 8.97 & PhaseSeparation & 93,140 & 0.82 \\ Yield & 944,022 & 8.24 & DrySolid & 88,974 & 0.77 \\ MakeSolution & 757,612 & 6.57 & Quench & 87,872 & 0.77 \\ Wash & 696,935 & 6.08 & Wait & 64,040 & 0.56 \\ CollectLayer & 563,969 & 4.91 & Recrystallize & 55,498 & 0.48 \\ Purify & 553,010 & 4.84 & Partition & 44,888 & 0.39 \\ Filter & 522,336 & 4.56 & Degas & 35,813 & 0.32 \\ DrySolution & 514,443 & 4.48 & Triturate & 31,885 & 0.28 \\ Extract & 394,015 & 3.42 & Microwave & 23,091 & 0.20 \\ SetTemperature & 391,722 & 3.44 & Sonicate & 2400 & 0.02 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Breakdown of action numbers in the PRP-931k dataset. Figure 2: Histogram of the output procedure lengths by number of actions. or chloroform (51 solvents in total with a frequency higher than 100). The _Purifig_ action features three parameters: solvent system, an indicator of whether the purification uses a gradient, and the ratio (two ratios--for the start and the end if the gradient is used).