If you are defending on a hill, have lots of archers (6-8) behind spearmen, with some heavy cavalry on your flanks.

The AI usually will advance its horse archers close to your line. When they come close shower their units with arrows. I usually group three archer units to attack each horse archer unit. Once the HA unit falls below 20 men, they will soon rout.

Keep this up until the HA units have all been decimated. If you have reinforcements rotate the used archers with fresh ones. And start bringing in more heavy horse.

When AI has been decimated then hit them with all your troops, with your heavy horse taking out what's left of the HAs.

Attack and keep them falling back... never let them rally...