Applying feedback to your conversational search responses
When using SmartHub conversational search, you can enable the ability for users to provide feedback on the documents that are returned by the bot's response. When a user provides feedback, an email is generated to a configured email address stating question asked by the user, the answer generated by conversational search, the status of the document feedback (liked or disliked), and additional details provided on the feedback module.
Prerequisites
Note the following prerequisites when using the feedback for conversational search feature.
-
In your Conversational Search settings, the EnableFeedback setting must be set to true.
Add a feedback module to conversational search results
To add feedback functionality to your conversational search page, you can enable the feature through the UI Editor.
-
In the SmartHub administration portal, click UI Editor.
-
Click Select a page from the top menu.
-
Select an HTML page, such as the Results.html page.
-
Upland BA Insight recommends that you use a custom page and folder when modifying your settings. Leave the default files as templates.
-
For example, Customizations/CustomResults.html. Copy the code from the default Results.html page, located at the top most SmartHub directory. For more information, see Creating custom pages.
-
-
Select the Advanced mode from the top right of the page.
-
Select Advanced Settings Edit.
-
Scroll down and locate the text
SH.ConversationalSearchFeedback.CustomSettings.SH.ConversationalSearchFeedback = SH.ConversationalSearchFeedback || {};
SH.ConversationalSearchFeedback.CustomSettings = {}; -
Click Default Settings at the top right.
-
A new browser tab opens with all the available SmartHub module settings.
-
Search for the word "ConversationalSearchFeedback" on the page to quickly navigate to the default settings, shown below:
SH.ConversationalSearchFeedback = SH.ConversationalSearchFeedback || {};
SH.ConversationalSearchFeedback.DefaultSettings = {
Title: "Feedback",
ButtonTemplatePath: SH.RootLevelURL + "/modules/ConversationalSearchFeedback/templates/buttonTemplate.html",
ContentModalTemplatePath: SH.RootLevelURL + "/modules/ConversationalSearchFeedback/templates/conversationalSearchFeedbackModalTemplate.html",
MailTo: "search@bainsight.com",
BodyEmailTemplate: "The answer: \"{Answer}\" provided by the Conversational Bot for the question: \"{Question}\" was \"{Status}\".\n {Details}.",
DislikedReasons: [
"I should not see this (access issue).".toLocaleString(),
"Old/Outdated content.".toLocaleString(),
"Innapropriate content.".toLocaleString()
]
LikedReasons: [
"The answer was correct".toLocaleString(),
"The answer was informative".toLocaleString()
]
SkipModalForLikes: true,
SkipModalForDislikes: false,
SkipEmailForLikes: true,
SkipEmailForDislikes: false,
ModuleDetails: {
LikeButtonLabel: '',
LikeButtonHoverLabel: 'Like',
DislikeButtonLabel: '',
DislikeButtonHoverLabel: 'Dislike',
DetailsMessage: 'Tell us more about the answer.'.toLocaleString(),
AditionalDetailsMessage: "Please provide some details about the issue:".toLocaleString(),
CancelButtonLabel: "Cancel".toLocaleString(),
SubmitButtonLabel: "Submit".toLocaleString()
}
} -
Copy the ConversationalSearchFeedback settings section from SH.ConversationalSearchFeedback.DefaultSettings.
-
Go back to your Advanced settings edit tab.
-
Paste the copied settings into the SH.ConversationalSearchFeedback.CustomSettings section.
-
Modify settings as desired. Refer to the ConversationalSearchFeedback parameters table below.
-
Click Save changes.
-
Click the Preview <html> file.html link at the top of the code editor.
-
Review your HTML page in the new tab that opens.
-
Make any necessary changes back in the code editor. Repeat steps 14-18 as necessary.
-
Click Save changes
ConversationalSearchFeedback Parameters
| Setting | Description | Default value |
|---|---|---|
| Title |
This setting specifies the title of the feedback modal window. |
"Feedback" |
| ButtonTemplatePath | This setting specifies the path to the html template for the Like and Dislike buttons. | SH.RootLevelURL + "/modules/ConversationalSearchFeedback/ templates/buttonTemplate.html" |
| ContentModalTemplatePath | This setting specifies the field from the source system that contains the document url. |
SH.RootLevelURL + "/modules/ConversationalSearchFeedback/ templates/conversationalSearchFeedbackModalTemplate.html" |
| MailTo | This setting specifies the email address where the feedback will be sent. | "search@bainsight.com" |
| BodyEmailTemplate |
This setting specifies the template for the email body. The following placeholders can be used:
|
"The answer: \"{Answer}\" provided by the Conversational Bot for the question: \"{Question}\" was \"{Status}\".\n {Details}." |
| DislikedReasons | The setting specifies a list of reasons for disliking an answer. The user can select one or more reasons from this list. |
|
| LikedReasons | This setting specifies the list of reasons for liking an answer. The user can select one or more reasons from this list. |
|
| SkipModalForLikes | If this setting is set to true, the feedback modal window will not be shown when an answer is liked. | true |
| SkipModalForDislikes | If this setting is set to true, the feedback modal window will not be shown when an answer is disliked. | false |
| SkipEmailForLikes | If this setting is set to true, the email containing the feedback will not be sent when an answer is liked | true |
| SkipEmailForDislikes | If the setting is set to true, the email containing the feedback will not be sent when an answer is disliked | false |
| ModuleDetails | This setting specifies the UI labels and text that the user can customize without creating a new html template. | - |