Suppose you need to see a dermatologist. Your friend recommends a doctor, explaining that “she trained at the best hospital in the country and is regarded as one of the top dermatologists in town.” You respond: “How wonderful. How do you know her?”

Your friend’s answer: “We met at the Republican convention.”

Knowing a person’s political leanings should not affect your assessment of how good a doctor she is — or whether she is likely to be a good accountant or a talented architect. But in practice, does it?

Recently we conducted an experiment to answer that question. Our study, done with the researchers Joseph Marks, Eloise Copland and Eleanor Loh for the journal Cognition, found that knowing about people’s political beliefs did interfere with the ability to assess those people’s expertise in other, unrelated domains.

In our experiment, we assigned people the most boring imaginable task: to sort 204 colored geometric shapes into one of two categories, “blaps” and “not blaps,” based on the shape’s features. We invented the term “blap,” and the participants had to try to figure out by trial and error what made a shape a blap. Unknown to the participants, whether a shape was deemed a blap was in fact random.