In ancient times, scholars were selected through imperial examinations. The imperial examination began in 587 AD (the seventh year of Emperor Kai of Sui Dynasty), with discipline, rules and classics as the main subjects, and ended in 1905 (the thirty-first year of Guangxu in Qing Dynasty), with school education as the main subject, which lasted for more than 1300 years. Lingui County is the county with the largest number of scholars in Guangxi history.
From Sui and Tang Dynasties to Qing Dynasty, there were 9 top scholars in Guangxi and 5 in Lingui. During the Ming and Qing Dynasties, Jinshi 7 1 1 in Guangxi and Lingui 242 ranked first in all counties. Among them, in 895 (the second year of Tang Dynasty), Zhao Guanwen was the first scholar in Lingui and Guangxi history. The second place is 1820 (twenty-five years of Qing Jiaqing) champion Chen Jichang. He even won three yuan, from 18 13 to 1820, and was the top scholar in the Qing Dynasty. The third place is Long Qirui, 184 1 (twenty-one years of Qing Daoguang). From 1889 to 1892 (Guangxu 15- 18), Zhang Jianxun and Liu Fuyao were the top two in Lingui, and Lingui County ranked fourth and fifth. Among them, 1892, in addition to winning 1 No.1, also won seven Jinshi.
From then on, the couplet of "Eight Scholars in One County, Three Subjects and Two Champions" hung on the gate of Lingui Guild Hall in Beijing, which became a much-told story for a while and was widely circulated.