Universal Prompts & Vertical Prompts | Yext Hitchhikers Platform

What You’ll Learn

In this section, you will learn:

  • How prompts work
  • How to set universal and vertical prompts
  • How to use Mad-Libs style embedded fields in prompts
  • Best practices surrounding prompts
  • How to set vertical prompts on an empty search bar

Search Bar Prompts

Prompts are set intentionally and explicitly by the Admin in the Search Configuration. The purpose of the prompts is not only to drive users towards searches that present rich, structured results with valuable information, but also to educate users on the types of searches that Search can support. You can use it to showcase to customers how advanced your search is, while using a variety of examples of verticals or commonly asked questions by your users.

Prompts can be set at the universal level so that a user sees them on the main search results page and search bar. Prompts can also be set at the vertical level, so if a user navigates specifically to a Locations vertical (for example), she would be presented with prompts that are scoped to her intents and queries on the Locations search page. Universal search will inheret the vertical prompts, so a user would see both universal and vertical prompts when landing on the main search results page.

Universal prompts appear as a drop-down list as soon as the user inputs their cursor into the search bar into universal search. By default, vertical prompts will be triggered when a user starts typing in the vertical page search bar. They can also be set to appear as soon as a user clicks into the search bar.

Here are some examples:

On a fictitious financial services site: Search hardcoded prompts

On the Hitchhikers site: Search hardcoded prompts

It’s important to show users who are new to Search that they can input intentional, long-tailed questions, not just boring single word keywords! You’ll learn more best practices around the prompts later in this module.

Configuring Prompts in the Search Configuration UI

You can configure the universal and vertical prompts in the Search Configuration UI. Navigate to Search > All Search Experiences > View Experience and then select “Query Suggestions” in the navigation bar to access your prompts. From there, you can toggle between the tabs for universal prompts and vertical prompts to set the query suggestions. Prompts will reflect any punctuation, capitalization, and special characters.

Search prompts UI

Once you have made your changes, click save in the bottom right corner of your Configuration screen, and they will instantly reflect in your experience!

Configuring Prompts in the JSON Editor

Universal and vertical prompts can also be managed out of the JSON Editor if you prefer.

Within a querySuggestions object, you can define universal and vertical prompts within the universalprompts and verticalprompts objects, respectively. The objects will take an array of values for each universal and vertical object. The final output in the querySuggestions object could look something like this:

  "querySuggestions": {
    "popularQueriesBlacklistedTerms": [],
    "verticalPromptsOnEmpty": true,
    "universalprompts": [
      "Restaurants near me",
      "Events in the community",
      "Do you sell gift cards?",
      "Community stories"
    ],
    "verticalprompts": {
      "communityStories": [
        "community stories",
        "most recent community stories",
        "[[name]]"
      ],
      "events": [
        "upcoming virtual events",
        "[[name]]"
      ],
      "faqs": [
        "what are your hours?",
        "how do I contact support",
        "[[name]]"
      ],
      "jobs": [
        "open positions",
        "jobs near me",
        "[[name]]"
      ],
      "restaurants": [
        "restaurants near me",
        "restaurants in [[address.region]]",
        "restaurants in [[address.city]]"
      ]
    }
  },

The above configuration will enable prompts on both universal and vertical search within the universalprompts and verticalprompts objects!

Mad-Libs Style Embedded Fields

Prompts in vertical search have the special ability to include fields from the Knowledge Graph. This is called embedded prompts. Here is an example for a restaurants vertical:

"Restaurants in [[address.city]]"

This prompt will automatically loop through every possible value in the Knowledge Graph for the address.city field and populate all the combinations. Note the embedded prompt will reflect content exactly as how you have it in the Knowledge Graph, including any capitalization, punctuation, and special characters.

For example, let’s say we have 5 restaurants in our Knowledge Graph in the following cities:

  • Fort Worth
  • Corsicana
  • Fort Collins
  • Southlake
  • Norman

The restaurant vertical prompts would be:

  • Restaurants in Fort Worth
  • Restaurants in Cosicana
  • Restaurants in Fort Collins
  • Restaurants in South Lake
  • Restaurants in Norman

You can set this configuration in the UI like so:

hardcoded prompts UI

Here is what the output would look like in your search experience:

hardcoded prompts UI

Lastly, if you are using the JSON Editor to make this change, your syntax may look something like the below:

    "verticalprompts": {
      "restaurants": [
        "restaurants in [[address.region]]"
      ]
    }

Vertical Prompts on Empty Autocomplete

By default, vertical prompts are triggered when a user starts typing in the vertical page search bar. Vertical prompts (that are not embedded prompts) can also be set to appear as soon as the user clicks into the search bar.

To set this new behavior, navigate to the querySuggestions object in your JSON Editor and set "verticalPromptsOnEmpty": true, or add this property if it is not present in the config. This will return the first 10 non-Mad-Libs vertical prompts for all verticals. The default "verticalPromptsOnEmpty": false, does not return any vertical prompts on an empty search bar. Note this feature is not yet available in the Search Configuration UI.

Your syntax will look something like the below:

  "querySuggestions": {
    "popularQueriesBlacklistedTerms": [],
    "verticalPromptsOnEmpty": true,
    "universalprompts": [],
    "verticalprompts": {}
  },

Once you add this property and click save in the JSON editor, it may take a few minutes for new prompts to start appearing.

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

    The purpose of the prompts is to: (select all that apply)

    Error Success Question 2 of 3

    Where are prompt inputs defined?

    Error Success Question 3 of 3

    True or False: Prompts can support embedded fields from the Knowledge Graph

    You're out of this world! 🌎

    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