´It was narrated from Jabir that :` the Messenger of Allah said: "Ask Allah for beneficial knowledge and seek refuge with Allah from knowledge that is of no benefit."
Hadith Referenceسنن ابن ماجه / كتاب الدعاء / 3843
Hadith Gradingالألبانی:حسن | زبیر علی زئی:إسناده حسن
Commentary: Benefits and Issues: For this purpose, supplicate in this manner: «اللَّهُمَّإِنِّيأَسْأَلُكَعِلْمًانَافِعًا،وَأَعُوذُبِكَمِنْعِلْمٍلاَيَنْفَعُ» “O Allah! I ask You for beneficial knowledge, and I seek refuge with You from knowledge that does not benefit.”
Source: Commentary on Sunan Ibn Mājah by Mawlānā ‘Atā’ullāh Sājid, Page: 3843