After the Sui dynasty these officials mostly came from the scholar-gentry (紳士 shēnshì) who had earned academic degrees (such as xiucai, juren, or jinshi) by passing the imperial examinations.
Shi became more influential and Da Fu gradually evolved into an official position in the bureaucracy, not a hereditary peerage.
Despite the hierarchical tendencies of Confucianism, scholar-officials and ministers are not mere obedient subordinates of the ruler, but theoretically have equal roles in the maintenance of social order.
This includes the possibility of running counter against or opposing the ruler, should he prove to be unfit to uphold righteous principles and fail to provide and promote well-being for the people.
In the early part of the Tang dynasty, empress Wu Zetian reformed and improved the Imperial Examination system by establishing the Metropolitan Exam; people who passed it were called Jinshi (metropolitan graduates, highest degree), and people passed the Provincial Exam were called Juren (provincial graduates).
By this time, passing the Imperial Examination had become the major path for people to hold an official position in the government.
[15] During the Yuan, Ming and Qing dynasties, the stereotyped writing style of the eight-legged essay (八股文) format dominated the Imperial Examination,[16] and scholar-officials from this period were relatively unable to speak and create freely due to the harsh political environment.
Since only a select few could become court or local officials, the majority of the scholar-literati stayed in villages or cities as social leaders.
The scholar-gentry carried out social welfare measures, taught in private schools, helped negotiate minor legal disputes, supervised community projects, maintained local law and order, conducted Confucian ceremonies, assisted in the government's collection of taxes, and preached Confucian moral teachings.
The imperial examinations gave many people the opportunity to pursue political power and honor and thus encouraged serious pursuit of formal education.
However, even though the examination-based bureaucracy's heavy emphasis on Confucian literature ensured that the most eloquent writers and erudite scholars achieved high positions, the system lacked formal safeguards against political corruption, only the Confucian moral[18] teachings tested by the examinations.