Hanlin Academy, elite scholarly institution founded in the 8th century ad in China to perform secretarial, archival, and literary tasks for the court and to establish the official interpretation of the Confucian Classics, which were the basis of the civil-service examinations necessary for entrance