A previous post ranted on (and on!) about effusive and ineffective compliments in a query letter.
Some commenters interpreted that to mean you should not make any kind of complimentary statement, including how the agent was located.
As in all things, sincerity counts. I can tell the difference between hogwash and a lovely illustration of Wilbur in the buttermilk.**
If you say "you're one of the top agents in New York City", that's hogwash. (UTTER hogwash.)
If you say "my book is similar in tone and style to Jeff Somers' kick ass and takes names noir thriller Digital Plague" that's not hogwash (until you fail to live up to your own comparison, but that dreadful knowledge comes after the query letter.)
If you say, "I see you represent the incredibly talented Jeff Somers" that's not hogwash. Jeff is incredibly talented and I do represent him to my everlasting pride.
If you say "your reputation as an agent is revered by all", that's hogwash. I can't even type it with a straight face. My MOTHER couldn't type it with a straight face.
If however you say "I attended your class at Surrey and got a lot out of it" that's not hogwash.
You'll notice the difference is in the specificity of the compliment. "You helped me figure out how to write a query letter on QueryShark" is sincere. "Your blog is just the coolest thing since central air conditioning" isn't.
I can tell the difference. So can you. You don't need to invent compliments to get me to read your work. I WANT to read your work.
** (and if you don't get this reference, stop reading at once, and go get Charlotte's Web by EB White....NOW)