Well you just have to make sure you're general is supported by other units. If it is infantry vs cav and it begins to retreat it will get run down by the cavalry and they will rout. So i usually use my generals unit in my armys center, so it can't be flanked or routed easily. Unless you are careless or losing the battle there is no reason to retreat you're general.