Unbeneficial Knowledge
Any knowledge which helps a person groom, and makes him a better person both for himself and his surroundings is ‘ nafay ilm ‘. Learning about science, geopgraphy, languages and cultures cannot be categorized as unbeneficial knowledge, as they all play a role in helping one understand this world better and ways of dealing with this world and different cultures. Following comments of Ghamidi Sahab in the context of this very prayer might also be helpful for you. Please refer to the video below from 33:01 to 35:35 https://youtu.be/f5Nhe1bXorw?t=1981
Following is a very insightful discussion on knowledge (‘ ilm ‘) in general: https://youtu.be/Fj_pahvVXUc