How to Automatically Generate Answers to User Questions
About The Question & Answers feature
Questions & Answers(Q&A) is a feature that helps administrators automatically generate answers to unanswered user questions entered as search queries. See the image "Questions & Answers" below.
Note: Question & Answer provides functions to users similar to How to Personalize User Queries.
Tip: Q&A differs from other SmartHub question features in that it enables you to set an intent for questions.
Intent
An example of the benefits of using intent (how to set up intent is shown below) in a question is below:
-
"What is Burt Neuborne's address"
With Intent set, the question can be asked with the same text in a more random order ("what is the address of Burt and Newborne"), with different punctuation, and still the answer will be found and returned to the user.
No Intent
With no intent set (how to set up intent is shown below), such as when using Delayed Answers or Featured Results, in the same question:
-
"What is Burt Neuborne's address"
The question text must be entered in the exact order as set in the Delayed Answers feature, with no change in text order or punctuation, in order for the answer to be found and returned to the user.
Configuring an intent for Question & Answers
Q&A enables you to set an intent for questions.
- This enables users to ask the same question in different ways, but still receive accurate answers.
- For example, when a question contains a specified word or phrase, the bot can be set to return a specific message and answer.
- Intent is set in the Q&A administration settings, as shown in the steps below.
The Conversation Topics and NLQ Q&A features are more flexible than Featured Results when it comes to questions asked by the user.
- Featured Results
- Requires the user ask a question using the exact text in the exact order as specified in the Featured Results configuration.
- Conversation Topics and NLQ Q&A
- Uses the configured intent to answer questions.
- The user does not need to input questions using the exact text configured in SmartHub to receive an answer.
- Navigate to the SmartHub Administration page.
- From the left side panel, select Questions & Answers.
- Add and configure a new Conversation Topic or NLQ Q&A.
- Intent is set on the line "When the user talks about...".
- "Add item" is an intent as set in your NLQ provider:
- "favorite movie," "last quarter's results," "my business results," etc.
- For ideas of most popular user intents in queries, use SmartHub Analytics such as How to Track User Queries and Selections.
- The bot message and answer can then be entered/selected.
- All questions that match the intent item you add here receive the selected message and answer. This behavior is unique to the NLQ Q&A feature.
- If you configure Featured Results instead of NLQ Q&A, an exact search query must be entered instead of an intent phrase.
- Any question entered by the user must exactly match the question set in SmartHub (see "Pending User Questions" under Q&A) for an answer to be returned.
Conversation Topics / NLQ Q&A
Featured Results
How do Users Use Auto Q&A in SmartHub?
Auto Q&A can be used by users to automatically receive an answer to any question they ask using the Delayed Answers functionality.
User Answer Options
Administrators can configure automatic answers.
The predefined automatic answers are set as follows:
- It's ok. I will ask for something else
- The system will ignore the query and not trigger the delay answer capability
- Find an answer for me
- If a user chooses Find an answer for me, the question is entered into the admin queue of Pending User Questions.
- The system can be either set up to automatically find answers or disabled and in this case the admin can click the Predict Answer button:
How to Test Auto Q&A
Once you have questions populated in your table, you can test, or simulate, the answer SmartHub will provide if a user enters the question shown.
- To see the answer to a question, select Predict Answer from the Action column for a given question.
See below:
Predict Answer option - The question is run against your NLQ service (LUIS, in this case), for a matching intent. The proposed answers, based on the intent matched, are returned and displayed.
- Select the desired answer and click Save.
Proposed Answers to Prediction Request
Once you choose one of the suggested answers as correct, the system checks if:
- There is an intent associated to this question and if so it will create a new entry under NLQ Q&A.
- If no intent matches the question, the system will generate a Featured Result
Pending User Questions
- Select "Pending Questions" from the navigation menu to open a list of pending user question.
- Click Settings to open a dialogue box with the options to automatically generate Q&A as well as modify the predefined Q&A template.
- See the window below.
Automatic Q&A
These automatically created entries can be found under "NLQ Q&A" and "Featured Results."
The admin can also generate answers by:
- Providing a list of questions
- Using the questions identified by Analytics as being unsuccessful queries
- Using the unanswered questions stored under Pending User Questions
- If Review answers is checked, the admin will be automatically asked to review the answers and decide if the suggested answer is correct or delete it.
- Both the answer and the context can be edited before accepting the answer.
- The bulk update option on the top right will either accept or remove all suggested answers.
How to Set Up Auto Q&A
This functionality depends on different providers and SmartHub's integration with Haystack.
To install and configure Haystack, follow the recommendations listed here.
To set up a Q&A provider in SmartHub use the following steps:
- Open the SmartHub Administration page at: http(s)://<web-app-url>/_admin
- Go to Questions and Answers > Auto Q&A Settings. See the left-side navigation menu in the screenshot below.
- Provide values for the required fields.
Note: Without a Tika extractor endpoint configured, only files with .txt extension will be accepted on
Feed the Index
Haystack will use the documents pushed into its index to find answers to the user questions
To feed this index:
- Open the SmartHub Administration page at http(s)://<web-app-url>/_admin.
- Go to Questions and Answers > Feed And Index.
- Drag-and-drop text documents (files must have extension .txt) into the box.
Remove All Files from Index
All pushed files into Haystack can be deleted.
Right after this action, the Auto Q&A system will not be able to answer to any question.
WARNING! Removing all files cannot be undone!
To purge the index:
- Open the SmartHub Administration page at http(s)://<web-app-url>/_admin.
- Go to Questions and Answers > Feed And Index.
- Click on Remove under Remove files from Auto Q&A provider system.
Set Up Using an AutoClassifier Pipeline Stage
As an alternative, you can feed the index at crawl time using Connectivity Hub and AutoClassifier.
-
In AutoClassifier, add a SmartHub Q&A Document Feeder stage.
The stage assumes Haystack is set up to use Elasticsearch for indexing.
Parameters required include:
- Elasticsearch address
- Index name
Source document property name represents the metadata name from Connectivity Hub.
The connection between Connectivity Hub and AutoClassifier is done through the enrichment component.
See here how to set it up.
How to Set Up Haystack
In order to install, configure, and run Haystack, please follow the How to install and configure Haystack steps.