Add Coveo Machine Learning Blocklist Words

In this article

Depending on the nature of the user queries going through your Coveo-powered search interfaces, Coveo Machine Learning (Coveo ML) models can ignore search requests containing blocklisted words from the learning process.

Keep in mind not to confuse ML blocklist words and query pipeline stop words.

These queries aren’t taken into account during the model learning process, meaning that models will never suggest them. However, in specific scenarios (e.g., support services for youth), it may not be necessary to blocklist certain words. In such cases, you can contact Coveo Support to review Coveo’s blocklist and potentially remove some entries, or send your own text file of blocklist words.

You might also consider adding stop word rules to exclude bad keywords from queries, so that they don’t impact the Coveo ML model learning process. However, if end users perform queries containing only banned words, the model learning process could be affected, depending on the returned search results (if any) (see Stop Word Special Cases).

To prevent users from getting search results when they input queries that contain only stop words, you can add thesaurus rules in which a given banned keyword is replaced with random characters (see Manage Thesaurus Rules). This should bring the user to a “No Results” page where the QuerySummary component displays the desired information.

As this impacts metrics such as Search Events Without Results and Search Event Click-Through, ensure that the thesaurus rules aren’t excluding desired results.

For example, you set a stop words rule to ban the word knight because it leads to unwanted search results.

Knowing that the word knight queried by itself still leads to the unwanted search results, due to a stop word rule behavior, you set the following thesaurus rule:

Replace knight with asdfgh

The query knight is now replaced with asdfgh which leads users to a “No Results” page when they search for it.

On the no results page, you set the following information to be displayed to users who queried knight:

Prohibited query.