Aside from making sure you're doing this for the right reasons ("I want to encourage them to think about more tactics than killing everything" is probably OK, but I'd be a bit iffy if your motive is "I want to teach them a lesson in humility"), the trick to this kind of encounter is twofold. First, you must give them an obvious escape route and a chance to escape. The players need to know that there is a way out, should they need it, and it should be obvious. Having them surrounded on all sides or backed against the wall will make them desperate. The second key component is to wear the party down gradually, as opposed to overwhelming them right out of the gate. Let them sate their thirst for blood, as it were, for a few rounds, before the first wave of reinforcements arrives. As the fight wears on, resources get depleted, and over time the players should realize that their ability to diminish the enemies' resources are likewise diminishing as rounds pass. Also, tying this back into the first part of it, make sure there is good distance (both physical and time-wise) between waves of bad guys, allowing the players a chance to escape between waves of enemies.
At least, that's how these things work best in my experiences. YMMV.
Edit: I just read your question a bit more closely, and one thing I'd like to point out is that my advice above is contingent on letting the heroes do SOME fighting before they run. I highly encourage this approach, as it gives the players a chance to make a dent in the enemy, release any pent-up aggression, and showcase their combat prowess, at least a little bit. I find that at least allowing them a chance to make a fight of it, if only for a few rounds, will help prevent players from making more rash decisions in the future because they are itching for a fight.