Direct Answers - Fields and Featured Snippets | Yext Hitchhikers Platform

What You’ll Learn

In this section, you will learn:

  • The Two Types of Direct Answers
  • How to Configure Direct Answers

Overview - Direct Answers

Direct Answers are meant to directly answer a user’s question by extracting information from results. There will not be a Direct Answer for every query, and you as the Admin will determine which Knowledge Graph fields and data are eligible for a Direct Answer.

Direct Answers are different from the searchable fields you learned about in previous units. Searchable fields are meant to control which entities and verticals the user sees below a Direct Answer. Direct Answers, on the other hand, control how information is extracted from those results to show Direct Answers at the top of a results page.

Direct Answers can easily be configured within the Search Configuration UI. Each vertical in your Configuration will have a section for activating Direct Answers:

direct_answer_snippet

As you can see in the UI pictured above, Yext Search has two types of Direct Answers: Field Values and Featured Snippets. We will cover these in the next sections.

Field Value Direct Answers

Field Value Direct Answers answers users’ questions directly from eligible fields in the Knowledge Graph, such as a doctor’s phone number or a location’s address. These Direct Answers come from structured data.

Field Value Direct Answers can be configured within the Search Configuration UI by simply selecting the eligible field in the “Field Values” section. In the example below, we have enabled the mainPhone and address fields as Direct Answers on Yext’s own Search experience for the Locations vertical:

direct_answer_snippet

On the frontend, the Field Values will appear at the top of the results page to the user when they are querying with Search. Using the example above, the user searched “what is the yext nyc office phone number”, and Search has returned the Yext NYC office entity’s phone number due to mainPhone being set as a Field Value Direct Answer:

direct_answer_snippet_field

Field Value Direct Answers also have what is called a Prediction Mode which allows you to configure how assertive the algorithm is when surfacing a Field Value Direct Answer.

prediction_mode_field_values

For example, if you are a single location business and you want to surface Field Value Direct Answers for queries like “what are your hours?” (where the query does not mention or resolve to a single entity), you can set up a Field Name prediction mode which shows Field Value Direct Answers regardless of which entities are returned, if any.

Field Name (Assertive): The algorithm will show a direct answer whenever it detects an eligible field name, regardless of which entities are returned, if any. This is recommended for single-location businesses.

Classifier (Default): The algorithm uses an NLP classifier to decide whether the user is seeking a direct answer.

One Entity (Conservative): The algorithm shows a direct answer only if the search returns one entity and a field name is detected.

Featured Snippets extract answers to users’ questions from any fields for which Document Search (which you learned about in Unit 6: Document Search ) is activated. These Direct Answers come from unstructured data such as blogs, help articles, or people bios. Featured Snippets also have a Prediction Mode setting, which lets you choose whether Featured Snippets need to be validated in Experience Training (see last section in this unit!) to be shown to end users.

Featured Snippet Direct Answers can be configured within the Search Configuration UI. By default, Prediction Mode will be set to Allow All.

direct_answer_snippet

Right now, there are two simple prediction modes (Allow All and Approve Only), and in the future there will be more options. Here are the definitions for each of them:

  • Approve Only: When activated, this will make it such that Featured Snippets only show once they are explicitly approved in experience training (more on Experience Training in the Post Launch Optimization module ).
  • Allow All: (Default) When activated, this will show all Featured Snippets produced by the algorithm. The Featured Snippets don’t need to be approved in order to appear in the experience. With the Allow All prediction mode, users can still train the algorithm by rejecting Featured Snippets.

On the frontend, the Featured Snippet will appear at the top of the results page to the user:

direct_answer_snippet

Configuring Direct Answers with JSON

Direct Answers can optionally be configured with JSON via the JSON Editor in your Configuration. Here’s an example of how the directAnswers object might look in a US Presidents vertical search:

{
  "$schema": "https://schema.yext.com/config/answers/answers-config/v1",
  "$id": "presidents_search",
  "name": "US Presidents Search",
  "verticals": {
    "documents": {
      "entityType": "president",
      "searchableFields": {
        "c_biography": {
          "documentSearch": true
        },
        "name": {
          "phraseMatch": true
        }
      },
      "directAnswers": {
        "featuredSnippets": {
          "predictionMode": "APPROVE_ONLY"
        },
        "fieldValues": {
          "eligibleFields": [
            "c_birthday", "c_partyAffiliation", "c_vicePresident", "c_termRange"
          ]
        }
      }
    }
  }
}

Experience Training

Admins are able to train the Search algorithm by giving feedback on its predictions for featured snippets. As you’ll learn in the Post-Launch Optimization module in the Experience Training unit , you have the ability to reject, change, or accept the Featured Snippets in the experience and affect the results shown.

experience_training

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

    What are the two types of Direct Answers?

    Error Success Question 2 of 2

    If you want to only show approved Featured Snippets, how would you configure this in the backend?

    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