Mix of job performance and skill. If you got a knight from a prestigious order showing up they'd have to be really good at faking incompetence to get a low rank, IIRC.