There's nothing like a great pep talk. Bosses dream of giving a motivational speech that will seem right at home in comeback-oriented sports movies like Hoosiers or Miracle. But when an employee catches you off-guard with a request for a pep talk or advice, carefully-crafted speeches can go out the window.

Elizabeth Bernstein recently addressed how to handle the sticky situation in a Wall Street Journal article. While there's no one right way to give a pep talk, going in with a plan helps.

Figure out what kind of motivation the recipient responds to 

Bernstein's article highlights research from the University of Louisville, which suggests that there are four  types of actions that people will take when asked to offer social support: offer solace, brainstorm a solution, minimize the problem, or distract the person from the problem. Researchers say that the first two types of actions are most effective, but if there's no solution to be found, it's OK to just do what you can to cheer the person up. "Tell them: I want to be here for you. What can I do?" says Stacy Kaiser, a licensed psychotherapist in Chicago.

Don't stereotype

There's a reason Sheryl Sandberg has implemented a "no interruption" policy to combat gender bias. Men are rewarded in the workplace for being brusque and outspoken, while women are supposed to be the listeners. But men are consequently viewed as less effective at offering emotional support than women, the University of Louisville researchers discovered. Men are more likely to rely on minimizing or distraction techniques--but that doesn't mean they always will. "We think men aren't as good at giving emotional support, but they are," Anita Barbee, a psychologist and professor in the University of Louisville's school of social work, tells the Journal

Phrasing is key

To ensure that your words of wisdom stick, make it clear that you are actively listening, instead of telling the person what to do. Begin by asking questions to get to the root of the problem, says William Doherty, a professor of family social science at the University of Minnesota. For instance, instead of saying, "You need to take a vacation," say, "have you thought about taking a vacation?" When it's time to offer words of affirmation, highlight the person's strengths, but be careful not to say anything that will make the employee feel like he or she has to instantly cheer up. Good: "You bounce back very well." Not so good: "You will bounce back." Even if the employee doesn't leave your office cheering, they will know that you believe in them.