Employing phase change materials (PCMs) offers the advantage of storing and releasing thermal energy while ensuring temperature stability. This characteristic makes PCMs valuable for reducing energy usage across various industrial applications. To explore the magnetic effects on double diffusion of a non-Newtonian nano-encapsulated phase change material (NEPCM) in a grooved cavity, the present study combined the incompressible smoothed particle hydrodynamics (ISPH) approach with an artificial neural network (ANN) model. The grooved shape is made up of three constructed grooves: triangular, curved, and rectangular grooves. In the cavity's walls, three segments of boundaries are considered as Gamma a ${{\rm{\Gamma }}}_{a}$ (T=Th,C=Ch) $(T={T}_{h},C={C}_{h})$, Gamma b ${{\rm{\Gamma }}}_{b}$ (T=Tc,C=Cc) $(T={T}_{c},C={C}_{c})$, and Gamma c ${{\rm{\Gamma }}}_{c}$ partial derivative T partial derivative n=partial derivative C partial derivative n=0 $\left(\frac{\partial T}{\partial n}=\frac{\partial C}{\partial n}=0\right)$. The ANN model correctly predicted the mean Nusselt number Nu<overline> $\mathop{{Nu}}\limits<^>{}$ and Sherwood number Sh<overline> $\mathop{{Sh}}\limits<^>{}$ when merged with current ISPH simulations. The study's novelty lies in exploring three distinct thermal and mass scenarios regarding double diffusion of a non-Newtonian NEPCM within an innovative grooved domain. The relevant parameters include the fractional-time derivative alpha $\alpha $, power-law index n $n$, Rayleigh number Ra ${Ra}$, Hartmann number Ha ${Ha}$, Soret-Dufour numbers (Sr and Du), and Lewis number Le. The obtained simulations present the significance of distinct boundary conditions in changing the velocity field, heat capacity ratio, temperature, and concentration in a grooved cavity. The fractional parameter alpha $\alpha $ accelerates the shift from unstable to steady condition. The increase in n $n$ from 1.1 to 1.5 results in a 44.5% drop in the velocity maximum. Because of the Lorentz effect of a magnetic field, increasing Ha ${Ha}$ from 0 to 50 reduces the maximum velocity by 20.9%.