As virtual assistants driven by artificial intelligence get integrated and deeply entrenched in our daily lives, humans with exceptional higher order thinking skills will be needed to combat the complex challenges of the 21st century. However, the molecular and cellular basis of cognitive functions like learning, memory and problem solving are not clearly understood. Here, we have used electroencephalography (EEG) to monitor the electrogram of the brain of students in real time as they worked on attention based tasks to find out how they construct knowledge and use it to solve problems. We observed an increase in the power of gamma as the students added items in the working memory, retained them, modulated them and assimilated them into mental models. Remarkably, the power of delta went down as the students built mental models, suggesting a conscious wakeful effort on the tasks. Our results show that a ratio of the power of delta to the power of gamma is indicative of ‘active cognition’. For linked tasks in learning, the ratio decreases gradually as students construct knowledge and use it for solving problems. Success in learning outcomes and cognition can be predicted by monitoring this ratio.