Determining the properties of pile from cone penetration test (CPT) is costly, and need several in-situ tests. At the present study, two novel hybrid learning models, namely PSO-RF and HHO-RF, which are an amalgamation of random forest (RF) with particle swarm optimization (PSO) and Harris hawks optimization (HHO) were developed and applied to predict the pile set-up parameter "A" from CPT for the design aim of the projects. To forecast the "A," CPT data along were collected from different sites in Louisiana, where the selected variables as input were plasticity index (PI), undrained shear strength (Su), and over consolidation ratio (OCR). Results show that both PSO-RF and HHO-RF models have acceptable performance in predicting the set-up parameter "A," with R2 larger than 0.9094, representing the admissible correlation between observed and predicted values. HHO-RF has better proficiency than the PSO-RF model, with R2 and RMSE equal to 0.9328 and 0.0292 for the training phase and 0.9729 and 0.024 for testing data, respectively. Moreover, PI and OBJ indices are considered, in which the HHO-RF model has lower results which leads to outperforming this hybrid algorithm with respect to PSO-RF for predicting the pile set-up parameter "A," consequently being specified as the proposed model. Therefore, the results demonstrate the ability of the HHO algorithm in determining the optimal value of RF hyperparameters than PSO.