During the reign of Lê Thánh Tông, who was an emperor famous for his interest in learning and knowledge, the scholar and historian Ngô Sĩ Liên was appointed to the Bureau of History in 1473. Under the order of Thánh Tông, he based on the works of Lê Văn Hưu and Phan Phu Tiên to write the "Đại Việt sử ký toàn thư" which was compiled in 15 volumes ("quyển") and finished in 1479. In compiling the "Đại Việt sử ký toàn thư", Ngô Sĩ Liên also drew elements from other books such as "Việt điện u linh tập" ("Compilation of the potent spirits in the Realm of Việt") or "Lĩnh Nam chích quái" ("Extraordinary stories of Lĩnh Nam") which were collections of folk legend and myth but still considered by Ngô Sĩ Liên good sources for history because of their reliable system of citation. This was the first time such sources were used in historiography by a Vietnamese historian. "Đại Việt sử ký toàn thư" was finally completed in 1479 with the accounts that stopped by the coronation of Lê Thái Tổ in 1428. According to Lê Quý Đôn, Ngô Sĩ Liên also compiled an historical text about the reigns of Thái Tổ, Thái Tông and Nhân Tông named "Tam triều bản ký" ("Records of the Three Reigns").