Configure the conversational search module for your SmartHub pages
Overview
The Conversational Search module allows you to integrate a Conversational Bot in a SmartHub or external web page. The conversational search module supports three types of integrations:
-
SinglePage: This integration runs standalone in a SmartHub page, taking up entire page.
-
Assistant: This integration is added to a results page and is rendered on the side panel. The user has the ability to manually collapse and expand the panel.
-
Hybrid: This integration combines the SinglePage and Assistant integrations by adding the conversational bot to a results page and using the query from the main SmartHub search box to start a conversation. This integration is usually rendered in the middle of the page, above the search results.
The conversational search module offers additional actions known as ContentActions. For more information, see the Conversational Bot Parameters.
Additionally, if you would like to use the functionality of traditional SmartHub search and SmartHub conversational search from a single page, you can configure a content container module through the UI Editor to display related document results in a split-screen view. After doing so, you must enable the SplitScreenMode parameter and configure the RelatedDocuments parameters.
Configuration procedure
The Conversational Search Module can be configured or modified using the UI Editor in Advanced Mode. For information about how to access the UI Editor as well as who can access it, see Using the UI Editor.
SH.ConversationalSearch.CustomSettings = {
"ConversationalSearchBot": { <settings object described in table below>}
}
Conversational Bot ID
| Setting | Description | Default value |
|---|---|---|
| Conversational Bot ID |
This setting specifies an ID for your conversational bot. When configuring your Conversational Bot Settings, this field contains the Conversational Bot Parameters. |
ConversationalSearchBot |
Conversational Bot Parameters
| Setting | Description | Default value |
|---|---|---|
| Enabled |
This setting enables or disables the Conversational Bot. The possible values for this setting are:
|
true |
| EnableFeedback | When this setting is set to true, the ConversationalSearchFeedback module will be enabled. This allows users to submit feedback for any answer provided by the conversational search bot by clicking the Like or Dislike button for the answer. | true |
| DisableOnRefinersInteraction |
When this setting is set to true, the bot will not trigger a new question if the user applies or has applied search refiners on the page. This setting only applies for Hybrid and Assistant integrations
|
true |
| ParentSelector | This setting specifies the parent selector that is used for appending the compiled template of the Conversational Bot. | ".conversationalSearch" |
| ConversationalBotName | This setting displays the name of the Conversational Bot, as configured in the SmartHub administration portal. For more information, see Configure the conversational bot settings. | "Conversational Bot" |
| ChatHistoryMessagesLimit | This setting specifies the Chat History messages limit | 5 |
| ChatHistoryCharactersLimit | This setting specifies the Chat History characters limit. | 500000 |
| TextRenderingMode |
This setting instructs the Conversational Search page on how to render the bot response. This setting has the following 3 possible values:
|
"character" |
| Mode |
This setting specifies the mode that the Conversational Bot uses. Possible values are:
For more information, see the overview section. |
"SinglePage" |
| SinglePageSearchTemplatePath | This setting specifies the path to the template used when rendering in SinglePage Mode. | SH.RootLevelURL + "/modules/ConversationalSearch/templates/s inglePageConversationalSearchTemplate.ht ml" |
| SplitScreenMode | This setting enables split screen mode for the Conversational Search. When enabled, documents that are related to the chat conversation are displayed alongside the chat interface. | true |
| RelatedDocumentsContainerId | This setting specifies the id of the content container that renders the related documents pane. | "ConversationalSearchCBS" |
| DocumentPathMetadata |
This setting specifies the metadata that is used to sort the received chunks and in generating the value for {DocumentPathRestrictions} in the RelatedDocumentsQueryTemplate setting. {DocumentPathRestrictions} represents a list of property restrictions based on the DocumentPathMetadata setting. For example, (clickUri="some/path/to/document.pdf" OR clickUri="another/path/to/document.pdf")
|
"clickUri" |
| RelatedDocumentsQueryTemplate |
This setting specifies the QueryTemplate that is used by the ContentContainer as defined in the RelatedDocumentsContainerId setting. Note the following:
|
"({DocumentPathRestrictions}) FederatorBackends:\"{ConversationalSearchSources}\"" |
| AssistantSearchTemplatePath | This setting specifies the path to the template used when rendering in Assistant and Hybrid Mode. | SH.RootLevelURL + "/modules/ConversationalSearch/templates/a ssistantConversationalSearchTemplate.html" |
| HybridModeCollapseStatus |
This setting specifies the state that the Conversational Bot will render in during Hybrid Mode. The possible values are:
|
"expanded" |
| HybridModeSearchEvent | This setting specifies the event that the Conversational Bot will listen for in order to start a conversation while in hybrid mode. | "newQuery" |
| HybridModeSearchTabIds |
This setting specifies a semicolon separated list of search vertical IDs to restrict the conversational search query to one or multiple search verticals. By default, this setting is empty, meaning that the query will execute on all search verticals. For example, HybridModeSearchTabIds: "b29924a9-ec32-4c10-8892-a544b69ee121;459dd1b7-216f-4386-9709-287d5d22f568" |
"" |
| UserReplyTemplatePath | This setting specifies the path for the template that renders the user message. | SH.RootLevelURL + "/modules/ConversationalSearch/templates/u serReplyTemplate.html" |
| UserAvatarPath | This setting specifies the path for the avatar used by the user. By default the avatar is the user’s profile picture. | "" |
| BotLoadingTemplatePath | This setting specifies the path for the template that renders the loading animation for the bot before a reply. | SH.RootLevelURL + "/modules/ConversationalSearch/templates/b otLoadingTemplate.html" |
| BotReplyTemplatePath | This setting specifies the path for the template that renders the bot message. | SH.RootLevelURL + "/modules/ConversationalSearch/templates/b otReplyTemplate.html" |
| BotAvatarPath | This setting specifies the path for the avatar used by the bot. | SH.RootLevelURL + "/modules/chatbot/images/chatbotIcon.png" |
| SourceDocumentsTemplatePath | This setting specifies the path for the template that renders the list containing the source documents for the generated answer | SH.RootLevelURL + "/modules/ConversationalSearch/templates/s ourceDocumentsTemplate.html" |
| ShowContentActions |
This setting allows you to enable Content Actions. The possible values are:
|
true |
| ContentActionsTemplatePath | This setting specifies the path for the template that renders the Content Actions. | SH.RootLevelURL + "/modules/ConversationalSearch/templates/c ontentActionsTemplate.html" |
| ContentActionsEvent |
This setting specifies the event that triggers the Content Actions rendering. The possible values are:
|
"beforeUserInteraction" |
| ModuleDetails | This setting is used to configure different text snippets from the module. | - |
| SmartPreviewsDetails |
This setting is used to configure conversational search and Smart Previews integration. If you are using document previews you must be using SmartHub 7.1 and Smart Previews 4.0.x or later.
For more information, see Using SmartPreviews with conversational search. |
- |
ModuleDetails Parameters
These settings specify the UI labels and text that the user can customize without creating a new html template.
| Setting | Description | Default value |
|---|---|---|
| SearchBoxPlaceholder |
This setting specifies the placeholder text for the searchbox |
"Search...".toLocaleString() |
| RefinersAppliedSearchBoxPlaceholder | This setting specifies the placeholder text for the searchbox when filters are applied and DisableOnRefinersInteraction is set to true. | "Assistant is disabled when filters are applied".toLocaleString() |
| Send | This setting specifies the tooltip for the send button | "Send".toLocaleString() |
| NewConversation | This setting specifies the tooltip for the new conversation button | "New Conversation".toLocaleString() |
| Title | This setting specifies the visible name when the Conversational Bot is used in Hybrid or Assistant mode. | "Assistant".toLocaleString() |
| Filters | This setting specifies the title for the filters window | "Filters".toLocaleString() |
| ClearFilters | This setting specifies the label for the clear filters button | "Clear Filters".toLocaleString() |
| ApplyFilters | This setting specifies the label for the apply filters button | "Done".toLocaleString() |
| Disclaimer | This setting specifies the Upland Disclaimer for using Generative AI. | "The BA Insight Smart Hub Conversational Chat Bot provided by Upland Software, Inc. allows our customers and their users to access certain services, including AI- powered tools and resources provided by third parties with whom our customers may have existing contractual relationships, through integrations with Upland Software's applications and online services. As such, as between you and Upland, you acknowledge and agree to use these AI tools or resources at their own risk and discretion. The decision to implement or rely on these tools rests solely with you. As between you and Upland, you accept full responsibility for any consequences, damages, or losses that may arise from their use, and it is your responsibility to assess and evaluate the suitability, compatibility, and potential risks associated with the use of these tools for your specific needs. You should exercise caution and undertake proper due diligence before using any AI tool or resource.".toLocaleString() |
| ErrorMessage |
This setting specifies the error message that the Conversational Bot will show when there is an error with the Conversational Search Service. |
"Something went wrong. Please contact the administrator.".toLocaleString() |
| SourceDocumentsMessage | This setting specifies the message shown before listing the source documents. | "This information was extracted from:".toLocaleString() |
| LikeButtonLabel | This setting specifies the label value for the Like button. | ' ' |
| LikeButtonHoverLabel | This setting specifies the label value for the Like button when it is hovered over. | 'Like' |
| DislikeButtonLabel | This setting specifies the label value for the Dislike button. | ' ' |
| DislikeButtonHoverLabel | This setting specifies the label value for the Disike button when it is hovered over. | 'Dislike' |
| DetailsMessage | This setting specifies the text that precedes the feedback options in the feedback window. | 'Tell us more about the answer.'.toLocaleString() |
| AditionalDetailsMessage | This setting specifies the text that precedes the additional details text box in the feedback window. | "Please provide some details about the issue:".toLocaleString() |
| CancelButtonLabel | This setting specifies the label value for the Cancel button. | "Cancel".toLocaleString() |
| SubmitButtonLabel | specifies the label value for the Submit button. | "Submit".toLocaleString() |
SmartPreviewsDetails Parameters
These settings allow you to configure Smart Previews for your conversational search instance. For more information, see Using SmartPreviews with conversational search.
| Setting | Description | Default value |
|---|---|---|
| Enabled |
This setting enables or disables the Smart Previews integration with Conversational Bot. The possible values for this setting are:
|
true |
| DocumentSourceTitleField | This setting specifies the field from the source system that contains the document title. | "title" |
| DocumentSourceUrlField | This setting specifies the field from the source system that contains the document url. | "clickUri" |
| DocumentChunkBodyField | This setting specifies the field from the source system that contains the body of the document chunk. | ESC_Chunk_Body" |
ConversationalSearchFeedback Parameters
These settings allow you to configure the feedback feature for your conversational search instance. For more information, see Applying feedback to your conversational search responses.
| 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. | - |
ChatWithDocument Parameters
These settings allow you to configure the chat with documents feature for your conversational search instance. For more information, see Using chat with documents.
| Setting | Description | Default value |
|---|---|---|
| Enabled |
This setting enables or disables the chat with document feature for conversational search. The possible values for this setting are:
|
true |
| EnabledBasket | This setting enables or
disables the basket for the chat with document feature, allowing users to add selected documents to their basket, which they can then use to filter their conversational search chat when needed. The possible values for this setting are:
|
true |
| ChatBotMode |
This setting specifies the conversational search mode that is applied. The possible values for this setting are:
|
"SinglePage" |
| BasketKey | This setting specifies the name of the SmartHub basket, as configured in the SmartHub Basket instructions. | ".basketButton" |
| BasketLabelChatWithAllDocuments | This setting specifies the text that is displays for the "Chat with all documents" control in the SmartHub basket. | "Chat with all favorite documents" |
| BasketLabelChatWithSelectedDocuments | This setting specifies the text that is displays for the "Chat with selected documents" control in the SmartHub basket. | "Chat with selected documents" |
| ConversationalSearchBotID | This setting specifies the ID for your conversational bot, as configured in the conversational search instructions. | "ConversationalSearchBot" |
| WarningMessage | This setting specifies the text that is displays when a user attempts to add the same document to a chat session. | "This document is already active in the chat session" |
| WarningMessageSelector | This setting specifies where the warning message will render on the page. | ".sh-row-body.sh-body-grid.coveo-main-section .sh-column-right" |
| ConversationalSearchPagePath | This setting specifies the path to your conversational search page. | "/ConversationalSearch.html" |
| DocumentTitleProperty | This setting specifies the field to use to populate the title of the document. | "title" |
| DocumentExtensionProperty | This setting specifies the field to use to populate the file extension of the document. | "FileExtension" |
| PropertyUsedForRestriction | "clickUri" | |
| InfoMessageTemplatePath | This setting specifies the path to the info message template file. | SH.RootLevelURL + "/modules/ChatWithDocument/templates/InfoMessageTemplate.html" |
| ModuleDetails | This setting specifies the UI labels and text that the user can customize without creating a new html template. | - |
Note the following:
-
The html elements specified in the ParentSelector setting will have to exist in the html of the page. The elements can be added via the UI Editor in Advanced Mode.
-
When specifying SmartPreviewsDetails parameters, you must update the property values (DocumentSourceTitleField, DocumentSourceUrlField, and DocumentChunkBodyField) according to the source system you are working with.
-
These properties must match the ones configured in the Original Document Properties field of the conversational bot settings to ensure SmartPreviews functions correctly.
-
-
The split screen feature is available only when the Conversational Search Bot is running in the SinglePage mode. In desktop mode, queries are executed only when the Related Documents side panel is expanded.
-
Changes made at ContentContainer level are still supported and are done through the UI Editor.
-
The following ContentContainer settings should not be changed: TriggerNewQueryOn and QueryTemplate.
-
Using Conversational Search filters
You can configure filters that users can apply to their Conversational Search chats. These filters work similar to SmartHub refiners, but they are applied to the knowledge sources that are used by your chosen LLM to provide answers. For example, if you filter by filetype:pdf, the LLM will only use pdf files to find an answer. Once configured, users will be able to apply a filter and select the desired value from the ConversationalSearch.html page. When filters are applied, the number of filters is displayed.
After applying filters, they will be taken into consideration when a subsequent question is asked. They will not be used for any question that was asked before the filter was applied. Users also have the option to clear their applied filters, and all filters will be cleared when a new conversation is started or the page is refreshed.
Limitations
Note the following limitations with Conversational Search filters:
-
Conversational Search refiners are only supported on the standalone conversational search page. For example, "ConversationalSearch.html". Conversational Search refiners are not supported when integrated in the SmartHub results page, due to conflicts with page refiners.
-
Currently, only one facet container is supported per page.
-
All refiner types are compatible, with the following limitations:
-
The refiners must be On Demand facets. In other words, the data-preload-values refiner setting property must be false.
-
The results count must be disabled. In other words, the data-show-count refiner setting property must be false.
-
Only the general apply button must be available for the Refinement Panel, and the individual apply buttons must not be enabled. In other words, the data-general-apply-button refiner setting property must be true, and the data-general-apply-button refiner setting property must be true
-
Each facet must have a Conversational Search Bot Id assigned. Only one Conversational Search Bot Id is supported per page. The value must match the bot ID in the Conversational Search settings. For example, using the example in the Configuration procedure section, the Conversational Search Bot Id is “ConversationalSearchBot”.
-
Add and edit your Conversational Search filters
-
When configuring Conversational search, ensure that the mode is set to SinglePage and there are no additional search refiners enabled.
-
In the SmartHub UI Editor, click Advanced Mode > Advanced HTML Edit.
-
In the HTML settings file, add the following line that corresponds to the facet panel:
<div class="coveo-facet-column"></div> -
The FederatorBackends parameter must be updated for the data-expression attribute in the CoveoTab element to correspond to the selected Search Engines from the Conversational Search Bot settings.
<a class="CoveoTab" data-icon="fas fa-globe" data-id="b29924a9-ec32-4c10-8892-a544b69ee121"
data-expression='{searchboxquery} FederatorBackends:"BackendA;BackendB"' data-caption="Everything" data-automation-id="everythingVertical"></a>The search engines that are specified in this parameter MUST be enabled in the Search Engines section of the SmartHub General Settings. -
Return to Basic Mode in the UI editor and select the Refiners tab. This tab allows you to add a new refiner, but you must ensure that you follow the limitations stated above.
-
Click Apply and Save.
The following are the default facets that are configured on the ConversationalSearch.html page:
<div class="coveo-facet-column">
<div class="CoveoFacet" data-conversational-search-bot- id="ConversationalSearchBot" data-default-state="collapsed" data-title="Result type" data-field="@filetype" data-lookup-field="@filetype"
data-available-sorts="occurrencesdescending,occurrencesascending, alphaascending, alphadescending"
data-enable-settings="false" data-searchbox-position="bottom" data- preload-values="false" data-enable-toggling-operator="false"
data-enable-facet-search="true" data-show-apply-button="false" data-is-dynamic- facet="false" data-use-radio-buttons="false" data-general-apply-button="true"
data-show-count="false">
</div>
<div class="CoveoFacet" data-conversational-search-bot- id="ConversationalSearchBot" data-default-state="collapsed" data- title="ContentSource" data-field="@ContentSource"
data-lookup- field="@ContentSource" data-available-sorts="occurrencesdescending,occurrencesascending,alphaascending,alphadescending"
data-enable-settings="false" data-searchbox-position="bottom" data- preload-values="false" data-enable-toggling-operator="false" data-enable- facet-search="true"
data-show-apply-button="false" data-is-dynamic- facet="false" data-use-radio-buttons="false" data-general-apply-button="true"
data-show-count="false">
</div>
<div class="CoveoFacetDatepicker" data-conversational-search-bot- id="ConversationalSearchBot" data-start="auto" data-end="auto" data-default- state="collapsed" data-title="Modified Date"
data-field="@date" data-lookup- field="@date" data-available-sorts="occurrencesdescending,occurrencesascending,alphaascending,alphadescending" data-preload-values="false">
</div>
<div class="CoveoFacet" data-conversational-search-bot- id="ConversationalSearchBot" data-default-state="collapsed" data- title="Display Author" data-field="@DisplayAuthor"
data-lookup- field="@DisplayAuthor" data-available-sorts="occurrencesdescending,occurrencesascending,alphaascending,alphadescending" data-enable-settings="false"
data-searchbox-position="bottom" data- preload-values="false" data-enable-toggling-operator="false" data-enable- facet-search="true" data-show-apply-button="false"
data-is-dynamic-facet="false" data-use-radio-buttons="false" data-general-apply-button="true" data-show-count="false"></div>
</div>