The aim of the current study is to explore the potential of artificial intelligence (AI) when integrated with Quality by Design (QbD) approach in the formulation of a poorly water-soluble drug, for its potential use in carcinoma. Silymarin is used as a model drug for its potential effectiveness in liver cancer. A detailed QbD approach was applied. The effect of the critical process parameters was studied on each of the particle size, size distribution, and entrapment efficiency. Response surface designs were applied in the screening and optimization of lecithin/chitosan nanoparticles, to obtain an optimized formula. The release rate was tested, where artificial neural network models were used to predict the % release of the drug from the optimized formula at different time intervals. The optimized formula was tested for its cytotoxicity. A design space was established, with an optimized formula having a molar ratio of 18.33:1 lecithin:chitosan and 38.35 mg silymarin. This resulted in nanoparticles with a size of 161 nm, a polydispersity index of 0.2, and an entrapment efficiency of 97%. The optimized formula showed a zeta potential of +38 mV, with well-developed spherical particles. AI successfully showed high prediction ability of the drug’s release rate. The optimized formula showed an enhancement in the cytotoxic effect of silymarin with a decreased IC50 compared to standard silymarin. Lecithin/chitosan nanoparticles were successfully formulated, with deep process and product understanding. Several tools were used as AI which could shift pharmaceutical formulations from experience-dependent studies to data-driven methodologies in the future.Graphical abstract