"Congrats to all those who cleared the civil services exam. My good wishes as they commence a new & exciting phase of their lives.
"To those who couldn't clear - the disappointment is understandable but you must look ahead & work hard for your future endeavours. Good luck," Modi tweeted.
Delhi Chief Minister Arvind Kejriwal congratulated the exam's topper Tina Dabi, who hails from the national capital.
"Congrats to Delhi girl Tina Dabi, topper of UPSC exam. I wish her a bright career," he said on twitter.
Delhi's Tina has achieved first rank. Railway service officer Athar Aamir Ul Shafi Khan from Jammu and Kashmir and Delhi-based Jasmeet Singh Sandhu, an Indian Revenue Service officer, have secured second and third rank respectively.