The AI will attack the units, as long as it thinks it has a shot at winning. If you send knights and the best they have is archers, they do not attack. I would expect them to attack with MDI.
This is why armies are not attacked, unless they are damaged or very obsolete. Now if you move the units or armies into a town you captured, they will attack, even when they are unlikely to win that battle.
IOW if you had say a sword army in the the late AA or early MA, it would be able to go anywhere and even stacks of 6-8 MDI will leave it alone, unless it is damaged.
Move that army into a town and they will attack with horses or jags or even warriors. I have had them attack mech armies in a town or on an airfield, when they would not attack a cav army in the open. In fact they were not attacking knight armies.
The one big exception is if you have the Patrol flag on, then they sometimes blunder into an army.