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

  • false

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: This instructs the page to render each letter of a received chunk, one by one.

  • chunk: This instructs the page to render each chunk of the bot response, one by one.

  • nonstream: This instructs the page to render the full bot response all at once. This will use the FullMessage event instead of the Message event.

"character"
Mode

This setting specifies the mode that the Conversational Bot uses. Possible values are:

  • SinglePage

  • Assistant

  • Hybrid

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} 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")
  • {ConversationalSearchSources} represents the list of backends where the chunks were used to generate the response. For example, "Backend1;Backend2"

  • {DocumentPathRestrictions} and {ConversationalSearchSources} are automatically replaced with values computed by the Conversational Search module based on the received chunks. The keywords are not required.

"({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:

  • Collapsed

  • Expanded

"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"
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

  • false

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

  • newConversation

"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.
-

ModuleDetails Parameters

Setting Description Default value
SearchBoxPlaceholder

This setting specifies the placeholder text for the searchbox

"Search...".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()

SmartPreviewsDetails Parameters

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

  • false

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"

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 in SinglePage mode. Hybrid or Assistant modes are not currently supported because of 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

  1. When configuring Conversational search, ensure that the mode is set to SinglePage and there are no additional search refiners enabled.

  2. In the SmartHub UI Editor, click Advanced Mode > Advanced HTML Edit.

  3. In the HTML settings file, add the following line that corresponds to the facet panel:

    <div class="coveo-facet-column"></div>
  4. 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.
  5. 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.

  6. 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, alphadescendi ng" 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>