Accurate evaluation of total organic carbon (TOC) content and porosity is of paramount significance for assessment and target interval selection for shale reservoirs. This study takes shales from the western Chongqing area as an exemplary case to delve into the applicability and reliability of ensemble learning in evaluating TOC content and porosity. The results indicate that although both Light Gradient Boosting Machine (LightGBM) and Random Forest (RF) algorithms are suitable for evaluating TOC content and porosity in shales, LightGBM algorithm is preferred due to its comprehensive advantages, including higher accuracy, stronger generalization capability, and faster operating speed. For TOC content evaluation, the four most important logging parameters identified by LightGBM and RF are consistent, but exhibit different orders: DEN (compensated density) > GR (gamma ray) > U (uranium) > CNL (compensated neutron) and DEN > U > GR > CNL, respectively. For porosity evaluation, LightGBM and RF identify the same type and order of the three most important logging parameters: AC (acoustic transit time) > DEN > U. This similarity may be attributed to the fact that both algorithms utilize Classification and Regression Tree (CART) as base learners. The dependence plots between SHAP (SHapley Additive exPlanations) values and logging parameters reveal that the role of each logging parameter in the evaluation model is segmented, rather than exhibiting a continuous linear contribution. In conclusion, given the exceptional performance of ensemble learning algorithms, they, especially LightGBM algorithm, are highly recommended for shale evaluation.