loading

Searchable Fields - Text Search, Semantic Text Search, Phrase Match| Hitchhikers Platform

What You’ll Learn

In this section, you will learn:

  • What Text Search, Semantic Text Search, and Phrase Match are
  • Text Search Configuration and Use Cases
  • Semantic Text Configuration and Use Cases
  • Phrase Match Configuration and Use Cases

Overview

In the next few modules, you’ll learn about Searchable Fields and their use cases. In this unit, we’ll look at three searchable field types: text search, semantic text search, and phrase match. Searchable fields can be set either through the UI or directly in the JSON editor (JSON formatting provided below).

Text Search Configuration, Example, and Best Practices

Let’s walk through an example of how to configure Text Search in a Jobs Vertical.

  • Example Vertical: Jobs
  • Example Field: Name (name)
  • Example Field Type: Profile Field

Text Search allows each token of the query to be searched within the fields you specify. This is best for short text fields that might contain unstructured or varied data.

Take a look at the query below, “application for partner roles”:

config text search filter

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

  • Application
  • Partner
  • Roles

Text Search on the name field brings in mutliple roles across various departments. In this case, the following roles are returned:

  • Partner Engineer
  • Technical Partner Manager
  • 2021 Partner Engineer, New Grad
  • 2021 Associate Technical Partner Manager, New Grad

The user could be looking for any one of these “partner” jobs, and it’s not immediately clear which exact role he or she is looking for. Given the nature of the entity name fields, in this specific Jobs case and in general (with varied, unstructured data and infinite values), it is a best practice to use Text Search on it.

You can also add the Text Search field via JSON within the searchableFields object:

"searchableFields": {
  "name": {
      "textSearch": true
   }
 }

Semantic Text Search Configuration, Example, and Best Practices

Let’s walk through an example of how to configure Semantic Text Search in an FAQs Vertical. Semantic Text Search can also be activated for any other Entity Type, except for Location entities.

  • Example Vertical: FAQs
  • Example Field: Name (name)
  • Example Field Type: Profile Field

This Searchable Field type turns on our Semantic Text Search algorithm (learn more about this in our Answers Algorithm module), which will match a user’s query to an FAQ that is semantically similar.

If a user query and FAQ Name are semantically similar, it means that they are “close” in meaning. Let’s take for example a user query and FAQ name (within the Knowledge Graph) that Turtlehead Tacos might receive regarding its online delivery:

  • User Query: send back my food
  • KG FAQ Name: Can I return my order?

By simply using a Text Search searchable field, the algorithm is looking for tokens (keywords) on a given field (FAQ name, in this case) and attempting to return the most revelant results. Let’s drill down to the relevant keywords in these two queries:

  • Can I return my order?
  • Send back my food

The keywords return and order are not similar to send, back, and food when purely looking at the words themselves and ignoring semantics. Therefore, the query “send back my food” does not return the “Can I return my order?” FAQ when using a Text Search searchable field:

semantic search 1

Semantically, the query and FAQ name are very similar. Both “returning an order” and “send back my food” mean that a customer wants to return something (in this case, food) to the brand. Ideally, the query “send back my food” returns the “Can I return my order?” FAQ from the Knowledge Graph.

This can be made possible by using Semantic Text Search. We embed the search query and FAQ in vector space and use an algorithm to determine the most relevant FAQ. To illustrate the impact of Semantic Text Search, let’s switch the FAQ Name field from its previous Text Search configuration to Semantic Text Search:

semantic search 1

The algorithm now understands that “send back my food” and “can I return my order?” are semantically similar, and the most relevant FAQ is returning first in the FAQ results.

You can add also turn on Semantic Text Search via JSON within the searchableFields object:

"searchableFields": {
  "name": {
      "semanticTextSearch": true
   }
 }

Phrase Match Configuration, Example, and Best Practices

Let’s walk through an example of how to configure Phrase Match in an FAQs Vertical.

  • Example Vertical: FAQs
  • Example Field: Keywords (keywords)
  • Example Field Type: Profile Field

Phrase Match allows an entity to be surfaced only when there is an exact phrase match contained in the query. In this scenario, we have a keywords field and will only trigger a result if there is an exact phrase match contained within the query.

Here is an FAQ with “hours” populated in its keywords field:

phrase match within KG

The query “what are your hours”, in this example, exactly matches the hours keyword stored on the FAQ entity’s keywords field, thereby returning it as a result:

phrase match within config

Notice that if we slightly adjust the query, in this case “what are your opening times”, the FAQ no longer returns because the phrase hours is not contained in the query:

phrase match within config 2

The FAQ will only be returned if the word (or “phrase”) hours is contained in the user’s query.

You can add also enable phrase match via JSON within the searchableFields object:

"searchableFields": {
  "keywords": {
      "phraseMatch": true
   }
 }
unit Quiz
+20 points
Daily Quiz Streak Daily Quiz Streak: 0
Quiz Accuracy Streak Quiz Accuracy Streak: 0
    Error Success Question 1 of 3

    A retail client noticed users may search for similar FAQs in many different ways. Which type of searchable field should they use for FAQ name?

    Error Success Question 2 of 3

    In an Agent vertical, many agents may have similar names such as 'Lee Jordan' and 'Sam Lee'. The client only want to surface exact matches (e.g. 'Sam Jordan' would return no results). Which type of searchable field should they use for Agent name?

    Error Success Question 3 of 3

    A healthcare client uses a field to list out multiple symptoms for each Condition entity. Symptoms may be similar to each other such as 'back pain' and 'lower back pain'. Which type of searchable field should they use for Condition symptoms?

    A Hitchhiker in the making! 🔥

    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
Splash Loading