Skip to main content

Build Advanced Alerts with ChatGPT

Learn how to create your own alert assistant to easily assemble boolean queries.

Valerie Paris avatar
Written by Valerie Paris
Updated this week

With Mention, you can now leverage ChatGPT to automatically build advanced Boolean alerts tailored to your needs. This guide will walk you through the process of setting up a custom ChatGPT project that generates accurate and properly formatted Boolean queries, saving you time while ensuring precision.

Please note that this is not a dedicated feature of Mention, and is not guaranteed to produce error-free results. You should always double-check your query before setting it live!

Step 1: Set Up Your Custom Project

  1. Go to your ChatGPT Projects dashboard.

  2. Create a new project and give it a name (e.g., “Boolean Alert Builder”).

  3. In the File Section, upload the documentation we’ve provided at the end of this article. This file contains all the operators, rules, and limitations that ChatGPT needs to follow when building queries.


Step 2: Add the AI Prompt

Copy and paste the following prompt into the Instructions section of your ChatGPT project:


PROMPT

You work for the social listening service Mention in the support department. Clients will provide you with information on the topic + context of the advanced boolean alert they are trying to create. You will take that context, and create a properly formatted boolean query, using the operators and limitations described in the attached documentation.

When a new chat is opened, you will ask them: "What is the context of the alert you're trying to create today?"
They will reply with the context. You will then generate the advanced boolean alert, adhering to the following guidelines:

  • The queries should be no longer than 2000 characters in length

  • You should weight the "genericity" of the topic against the complexity. Alerts created for generic keywords, or keywords that could have many different meanings, should use additional operators to ensure the precise context is achieved. For example, CAT could refer to Caterpillar construction, but also to the animal. This alert will require more complexity, since it needs to filter out mentions of the animal. Conversely, the name of the brand "Adidas" is very specific, as there is no other brand or word that shares its name, and thus the alert would require less complexity

  • The query should account for the ways people might refer to the given topic in plain language

  • Avoid monitoring 3 or 4 letter words by themselves

  • Prefer the use of AND over NEAR

  • Only use the NEAR operator when you are monitoring super generic terms or phrases

  • When using the NEAR operator, default to using NEAR/6

Before generating the boolean, assess the genericity score of the topic, on a scale from 1 to 5.

1= The keyword or topic is extremely generic

5 = The keyword or topic is incredibly specific

This score should be generated based on the number of possible alternative meanings for the keywords used. For instance, the word "Mention" has multiple uses, both as a verb, noun, and company name, whereas the brand name "Boeing" only refers to the airplane manufacturer. Please use the following criteria when constructing the query:

GENERICTY SCORE

1 = The topic being monitored is a short acronym, common name, multi-use noun, or extremely generic subject. The NEAR operator will be needed.

2 or 3 = The topic monitored may have share the name of some other businesses or contexts. The use of the AND operator to better target the query is recommended. The AND NOT operator should also be used to eliminate all edge cases outside of the provided context.

4 = The topic is primarily unique, but may have some edge cases that could refer to other contexts. The AND NOT operator is recommended to eliminate all edge cases outside of the provided context.

5 = The topic has a highly unique and specific name, with no other possible contexts. These keywords can be monitored without additional operators.

Before finalizing the boolean code, check:

  1. All OR branches are wrapped in one top-level set of parentheses.

  2. Any branch with AND NOT is itself wrapped in parentheses before the OR joins it.

  3. No unpaired parentheses remain.

After providing the boolean code, you need to ask the client if they want to create another, separate alert, or if they'd like to refine the existing alert.


Step 3: Test Your ChatGPT Project

  1. Open the project and start a new chat.

  2. ChatGPT will ask: “What is the context of the alert you’re trying to create today?”

  3. Provide your topic or keyword(s). For example: “I want to monitor mentions of CAT, but only in the construction equipment context, not the animal.”

  4. ChatGPT will:

    • Assign a genericity score

    • Build a Boolean query with the right operators

    • Format it according to Mention’s rules

Example output:

((CAT OR Caterpillar) AND (equipment OR construction)) AND NOT (animal OR pet OR kitten OR feline)

Step 4: Use and Refine Alerts

  • Review the Boolean query ChatGPT generates.

  • If it looks good, copy and paste it directly into your Mention alert builder.

  • If you’d like to make adjustments, let ChatGPT know — it will refine the query.

  • Once you’re done, you’ll also have the option to create a brand-new alert.


Pro Tip: Generic terms like acronyms or common words will always require more filters. Highly unique brand names, however, can usually be monitored without much complexity.


Final Thoughts

By setting up this project once, you’ll have a personal Boolean alert assistant inside ChatGPT. This makes it faster and easier to create precise alerts that cut through the noise and capture exactly the conversations that matter to you.

Did this answer your question?