御史 originally (Zhou/Qin) meant a scribe beside the ruler, then from Qin onward became the throne's impeachment officer — able to dismiss governors, audit the treasury, and (theoretically) criticize the emperor. The top post,
御史大夫, ranked alongside the chancellor.