I have to be careful with this one, because I've done this myself (meant well as I compliment another rider in passing). I've started to think about these same "words of encouragement" being taken as condescending to the person hearing them. Often they come at a time of struggle - riding a hill, later miles of a long ride, during/after a hard ride/race - which means the person hearing them might not be hearing them as words of encouragement either, considering you are PASSING them at such a time.

I try to assume when someone says something to me that they mean well, but it is still hard not to hear "great job, but I'm still better than you" when someone passes and says "great job". I also tend to think about whether I'm the person that looks like I need help and encouragement in order to make it. I just have to remind myself to stay positive... and when I pass them back I will say "great job" right back. I also try to keep my compliments to myself more now, because I am afraid of how they will be construed, unless I can have a whole conversation with someone - something like "I've been chasing you all day, you're a really strong climber, it's only downhill and on the flats that I can catch up, must be all that momentum I get from my fat ***"