Candidates for offices recommended by the prefect of prefecture were examined by the Ministry of Rites and then presented to the emperor. Some candidates for clerical positions would be given a test to determine whether they could memorize nine thousand Chinese characters. The tests administered during the Han dynasty did not offer formal entry into government posts. Recruitment and appointment in the Han dynasty were primarily through recommendations by aristocrats and local officials. Recommended individuals were also primarily aristocrats. In theory, recommendations were based on a combination of reputation and ability but it's not certain how well this worked in practice. Oral examinations on policy issues were sometimes conducted personally by the emperor himself during Western Han times.