Li Jifu
In 808, when Emperor Xianzong held a special imperial examination for the examinees to give honest criticism of government, Wei and Yang Yuling (楊於陵) were in charge of the examination, and Wei selected three examinees who gave blunt criticism — Niu Sengru, Huangfu Shi (皇甫湜), and Li Zongmin — for top marks. However, the chancellor Li Jifu were stung by the criticism that they gave and viewed these as personal attacks against him. Li Jifu tearfully complained to Emperor Xianzong that the reviewers of the scores that Wei and Yang gave — the imperial scholars Pei Ji and Wang Ya — had conflicts of interest, as Huangfu was Wang's nephew. As a result of Li Jifu's accusations, Pei, Wang, Yang, and Wei were all demoted, with Wei initially demoted to be the prefect of Guo Prefecture (果州, in modern Nanchong, Sichuan), and then further moved to be the prefect of Ba Prefecture (巴州, in modern Bazhong, Sichuan). However, Wei was soon summoned back to Chang'an to serve as "Duguan Langzhong" (都官郎中), a supervisorial official at the ministry of justice (刑部, "Xingbu") and put in charge of drafting imperial edicts. The next year, he was made "Zhongshu Sheren" (中書舍人), a mid-level official at the legislative bureau. In 811, he participated in a major revision of official salaries that Li Jifu advocated, along with Xu Mengrong (許孟容) and Li Jiang. Wei was thereafter made the deputy minister of rites (禮部侍郎, "Lǐbu Shilang"). He served as deputy minister of rites for two years, and the examinees that he selected as top scorers were the ones that he felt to have valued substance over form, and it was said because of his policy, those who tried influence examination results decreased. He was later made "Shangshu You Cheng" (尚書右丞), one of the secretaries general of the executive bureau (尚書省, "Shangshu Sheng").