"Congrats to all those who cleared the Civil Services Exam. My good wishes as they commence a new and exciting phase of their lives," Modi tweeted.
"To those who couldn't clear - the disappointment is understandable but you must look ahead and work hard for your future endeavours. Good luck," Modi shared on his Twitter handle.
Twenty-two year old Delhi girl Tina Dabi has topped the UPSC exam while 23-year-old Athar Aamir Ul Shafi Khan from Jammu and Kashmir got second rank.
Besides them, Jasmeet Singh Sandhu, Artika Shukla and Shashank Tripathi got third, fourth and fifth positions among the 1,078 selected candidates this year.
Dabi, who studied at Delhi's Lady Shri Ram College, cleared the exam - considered one of the toughest in the country - in her first attempt and also topped it.
For Khan, who hails from Anantnag in Kashmir, it was his second attempt. In his first attempt in 2014, he had got a lower rank and could not make it to the top administrative jobs and had to be content with the Indian Railway Traffic Service (IRTS).