It is narrated from Sayyiduna Anas (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) used to make this supplication: "O Allah! I seek refuge in You from knowledge that does not benefit, from deeds that are not raised up (to the court of Allah), from a heart that has no humility, and from a supplication that is not heard (that is, not accepted)."
Imam Ahmad (may Allah have mercy on him) narrated it in his Musnad through Bahz and Abu Kamil, from Hammad (may Allah have mercy on him).