Searchable Fields - NLP Filters | Yext Hitchhikers Platform

What You’ll Learn

In this section, you will learn:

  • What an NLP Filter is
  • Special NLP Filter Use Cases
  • NLP Filter Searchable Field Type Best Practices and Use Cases

Overview

As you will learn in the upcoming Search Algorithm module, Yext Search leverages a multi-algorithm approach to handle user queries. One of the algorithms we use is called Named Entity Recognition, or NER, and it handles structured data to parse filters and return relevant entities. NER uses Google’s open source machine learning framework, BERT, to detect potential filters present structured information from a Knowledge Graph. In this unit, we will walk you through how to configure NLP Filters and talk through some best practices. We will also discuss and configure a handful of “special” NLP Filter use cases.

NLP Filters Configuration, Example, and Best Practices

Let’s walk through an example of how to configure NLP Filters in a Jobs vertical.

  • Example Vertical: Jobs
  • Example Field: Job Department (c_jobDepartment)
  • Example Field Type: Custom Single Option Select (Options: Revenue, Technology, Delivery, etc)

NLP Filter enables each term in the search query to be parsed with Natural Language Processing (NLP) and used as a filter. This is best for structured enum/option fields where there are a finite number of variations across entities.

You can use Test Search on the right side of your screen to test out different NLP filters. As you save your configuration, Test Search will update to reflect your latest changes.

Take a look at the query below, “open technology jobs at Yext”:

config NLP filter

In this example, the following tokens are parsed from the query:

  • Open
  • Technology
  • Jobs
  • Yext

Because there is a match from the NLP Filter on the Job Department custom field with a token from the query (Technology), the jobs are filtered down to only show those Jobs within the Technology department. Because the Job Category field is structured and contains a finite number of value options, it is best to use the NLP Filter.

light bulb
Note
You’ll know that an NLP Filter is being applied when you see the field value listed at the top of the vertical. In the example above, you can see “Technology” is applied as a filter directly underneath the “Jobs” vertical section title.

You can also add the NLP Filter via JSON within the searchableFields object:

"searchableFields": {
  "c_jobDepartment": {
      "nlpFilter": true
   }
 }

Additionally, you can preview NLP Filter results within Test Search. When testing out your backend configuration, you’ll see applied NLP filters appear in the Test Search as boxes underneath vertical headers, along with a tooltip description specifying each filter used. Here’s the “part-time jobs” query being used in Test Search:

NLP filters in test search

Special NLP Filter Uses

There are special NLP Filters that leverage a “built in” entity value. We will go through the three most common builtin NLP Filters below – builtin.location, builtin.entityType, builtin.hours, [linkedEntity].name.

NLP Filter Description Use Case
builtin.location Enables location searching, such as “near me”, zip code, address, city, state, and more Use to enable location searching for all entity types with an address (i.e., locations, jobs, healthcare professionals)
builtin.entityType Enables searching on the entity type name Use for each vertical to allow a user to search by entity type names
builtin.hours Enables searching an entity’s hours of operation Use for each vertical to allow a user to search for entities that are “open now”
[linkedEntity].name Enables searching across entity linkages in the Knowledge Graph Use to allow searching across linked entity custom fields.


builtin.location

Using this searchable field will enable address search features, like searching a zip code (10011), address line 1 (61 Ninth Ave), city (New York), state (NY), and “near me”. The address searching is possible because of our built in address field for entities and its associated information, like latitude/longitude. To set this up, all you have to do is use a NLP Filter on the builtin.location field. The result is that a user can search by various address fields and get a precise result in the search results:

Precise address search results

builtin.entityType

As a standard practice, you will always use the builtin.entityType NLP filter for each of your vertical search configurations. It allows a user to search the entity type name within the vertical. For example, your locations vertical might have location and ATM entity types. By enabling the builtin.entityType NLP filter, a user will be able to search “where are your locations” and “where are your ATMs” and Search will return the respective entity types within that vertical search.

Within the Jobs vertical, we only have one entity type — which is job. Therefore, when a user searches for “jobs”, he/she is presented with results due to the builtin.entityType NLP Filter configuration. You’ll notice that “Jobs” appears in the Applied Filters bar as shown below. By default, the builtin.entityType filters will be hidden, but this can be overridden. (We’ll dive further into how to configure Applied Filters in the Advanced Search track!)

Job search results

builtin.hours

Using this searchable field will enable searching an entity’s hours of operations. Today, this NLP Filter supports “Open Now” intents, so a user could search “restaurants open now” and get a list of restaurants that are open with consideration of a user’s time zone and entity’s holiday hours. Here is how this functionality looks on Yext.com Search:

Open now filter

[linkedEntity].name

Within the Search Configuration, we can set the featured speaker’s name (“Magic Johnson”) as an NLP Filter in the Events vertical (reminder: you can find field API names in the “View Entity Type” page or visit our API Documentation). In this example, we would set c_featuredSpeakers.name as an NLP Filter.

This allows the end user to search “Magic Johnson” and see not only the speaker card but also the session associated to Magic Johnson. You’ll see the NLP treatment within the Events vertical. Check it out:

NLP events vertical

Note: You can also use a Text Search filter to produce the Search result linkage. The format would just be linkedEntityField, not appended with .name).

You can also add the special NLP Filters via JSON within the searchableFields object:

"searchableFields": {
  "builtin.location": {
      "nlpFilter": true
   }
 }


Experience Training for NLP Filters

As you’ll learn more about in the Experience Training unit , you can accept or reject NLP filters that are applied for any given query in Experience Training. If you accept one, you are helping to train the algorithm to better understand your brand and preferences. If you reject one, the algorithm will no longer apply that NLP filter for that search term for that experience.

experience training for nlp filters

unit Quiz
+20 points
Daily Quiz Streak Daily Quiz Streak: 0
Quiz Accuracy Streak Quiz Accuracy Streak: 0
    Error Success Question 1 of 2

    Which of the following is not a “special” nlp filter?

    Error Success Question 2 of 2

    NLP Filters are associated with which of Yext's algorithms?

    Climbing that leaderboard! 📈

    You've already completed this quiz, so you can't earn more points.You completed this quiz in 1 attempt and earned 0 points! Feel free to review your answers and move on when you're ready.
1st attempt
0 incorrect
Feedback