Top tips for writing the perfect social listening query

Date & Time (GMT):
Date & Time (EST):

Query writing, although sometimes considered a boring, time-consuming element of social listening, is one of the most important skills a social intelligence professional can have. With so much data now available, knowing how to reduce this volume down to only the most relevant results for the problem you’re trying to solve is essential.

Not only does this help increase speed to insight (as you no longer have to deal with irrelevant data points) but it also helps to improve the accuracy of your findings. Because accuracy depends on the quality of the data you begin with, and writing the best possible query to ensure that quality is the first step.

Despite the importance of this skill, there is very little education or training on how to do it well, which is one of the reason’s we launched the social intelligence query writing competition this year. We wanted to give a platform to those who have developed their skills in this area, and show the value that a well thought-through query can bring to the practice of social intelligence.

And, after crowning our two winners, we thought we’d share a few tips on how to hone your own social listening query writing skills.

Key things to consider when writing a social listening query

According to Jeremy Hollow, Founder and CEO of Listen + Learn Research and head judge of the competition, relevancy is key when thinking about query writing. That is, how useful the results that your query returns are in answering the question or problem you’re working on.

“It's important to be intentional about the relevancy rate you're aiming for with your query. This depends, of course, on how you're going to use it. If your query is for end users with less social listening experience, you'll want to keep the relevancy high, 85-90%.”

This is to remove the noise so that the user can just focus on the important information for their project.

“If you want to make sure you capture as much potentially useful data as possible and will clean the data later, then you can go with a lower relevancy rate.” As a rule of thumb, Jeremy and his team aim for around 50% relevancy for their projects because they check relevancy as they go by reading each of the results.

Find the right language and keywords

To achieve relevancy, using the right language and keywords is important. In particular, it’s helpful to find the words that your target audience are most likely to use when talking about a particular topic. This can be tricky, as sometimes people don’t use the correct word for an object or topic. As Raymond Lematta, Senior Research Analyst of Social Intelligence at PSB Insights (and one of the winners of this year’s query writing competition) highlights, “the way people talk in real life vs on social media can be drastically different. Thus it is important to take slang, brevity, acronyms, etc into consideration in your query.”

Use new technology to your advantage

New technology, such as generative AI powered tools, can help with this. Natália Leão, Global Social Intelligence Development Lead at Nestlé (the other the winner of this year’s query writing competition) uses ChatGPT extensively at this stage.

“It doesn't always provide me with the exact terms I need, but it serves as an excellent source of inspiration.”

It’s especially useful if you're searching data in a different language to the one you speak. When using it in the competition, Natália was able to discover new keywords that she hadn’t thought of. “ChatGPT suggested the idea of expressing seniors' ages in written form (e.g., sixty-four instead of just 64) or using the term "treat" in reference to snacks, which I hadn't considered previously. It was particularly valuable because I didn’t have a team to brainstorm with, and being a non-native English speaker, it has served as a helpful ‘project buddy’.”

Avoid bias

It’s also important not to bias the results when building your query. If you enter into the process looking for a specific outcome, it could shape the way you structure your query. For example, as Raymond explains, “the inclusion of too many negative or positive-leaning language can bias your dataset's sentiment by only looking for conversations that fit those sentiments. If you include negative language then it is important to balance with positive language (unless the query is specifically targeting negative or positive perceptions).”

Learn to work with the platform

From a practical perspective, it’s important to make sure you understand how the search query language on the social listening tool you use works, as each platform has nuances around the syntax and operators that they use. If you don’t fully understand how it is returning results based on the queries you write, you can’t guarantee accurate results. Raymond recommends educating yourself about the technology.

“Dive into the literature or take a learning course/certification - these have helped me uncover different operators and filters I could use for my queries to explore more data cuts and areas for refinement.”

Test and refine

And finally, as with most things, writing the perfect query is an iterative process. It is rare (likely impossible!) that the first query you write will return the most complete data set for you to work with. As a result, each time you test it out, you need to check the results and tweak as necessary, to make sure you’re capturing all the relevant data, and excluding the noise. This is what Natália does, and her tip is:

“to always evaluate your query ‘in parts,’ assessing small groups of combination[s] of terms as it helps to more clearly spot what might need adjustment.”

Testing also helps you to identify when you might need to be more specific in your search terms. As Raymond explains, “disambiguating terms is crucial when including broad, ambiguous, or ones with multiple definitions e.g. office vs Microsoft Office.”

Going through this process can also help you better understand the topic in relation to the target audience that you’re working with, and this in turn can help you to improve your query writing. For Natália, “reading through the posts also often sparks new ideas to try. It is a long test and refine process and I believe this is a crucial step of query building.”

How long should it take to write a query?

The idea of testing and refining suggests that the process of writing the perfect query can take a long time. And well, the answer to the question of how long it should take is, according to both Natália and Raymond…it depends.

For Natália, it depends on the brief. “In most cases, I can usually get to a satisfactory balance between volume and quality within one to two hours of work but I might need more if I am looking at a highly specific audience or dealing with a particularly noisy topic.” For Raymond, the complexity of the query plays a role, and sometimes can take him days to write. “Usually the queries that take me the longest are more abstract and conceptual by nature, such as attitudinal analyses or researching industry landscapes.”

How do you know when to stop?

But of course, taking a ‘test and refine’ approach means that the process of writing could go on forever! As Raymond highlights:

“Continuing to refine the query as the topic or research objectives evolve is a necessary part of query writing. This is the beauty of social listening in that you can field new datasets and manipulate the data universe almost instantaneously as needed, so don't be afraid to change the query—just make sure you are always testing and QCing the logic and outputs.”

Both agree, however, that there are signs to look out for that can show you when you’re close to perfection.

According to Natália, “a good indicator for me is when I find myself continuously adjusting the query, but I start to notice little improvements in the results. During the competition, the best data came from the query I’ve put together in the first 3h-4h. Beyond that point, alterations were bringing little additional results until it got to a point that I decided to stop.” For Raymond, “When I write queries I'll ‘guesstimate’ the accuracy of the query by scrolling conversations and iterating on the query as I go. I'll know when my queries are in a good place if I feel 70%-80% of the mentions I'm seeing are relevant.”

Ultimately, writing a good query is the first step to extracting valuable insights from the wealth of social data that’s available. And a good query doesn’t necessarily mean a complex one. Instead, you should focus on the relevancy of the results that are returned. As Raymond explains:

“The goal should be to write a query that accurately captures the conversations you are targeting with a good balance of volume and relevancy.”

By using the right keywords, incorporating exclusions when necessary and learning how to work with the social listening platform, you can test and iterate until you’re left with the most relevant results for your project.

Or view the interview on LinkedIn

This interview was recorded via LinkedIn Live, if you prefer to view on LinkedIn, click the button below.

View Interview

See related content

Webinar & Panel
Uncover the Human Voice For Deep Insights
In Person Event
What role can social data play in market research?
Webinar & Panel
How to track emerging trends on social video platforms, like TikTok