I almost always sally out immediately.

This is because I almost alwasy garrison at least 4-5 archers and a couple spears in a border city, and can use this army to beat (or at least inflict pretty severe damage on in a "draw") most of what the AI brings.

If I don't have enough defenders (in relation to the attackers) I'll try to get a relief force there. I'll try to position them on the opposite side of the city from the besiegers, which allows me to get them inside the walls and then use my sally out tactics.

Actually defending a siege I almost never do, and if I do it's usually because I was so undermanned I couldn't sally out so it's an inevitable defeat.