Using SmartPreviews with conversational search

When using SmartHub conversational search, users are able to preview the relevant sources that powered the conversational search bot's response with Smart Previews integration. By clicking the Sources button under the response, a list of documents will display. Selecting one of these documents will allow users to go directly to the source or preview the document.

When previewing the document, a new panel will open to the right of the conversational search response, opening the preview on the relevant page from the document.

Prerequisites

Note the following prerequisites when using chat with documents

Limitations

Note the following limitation when using conversational search:

  • Content that is relevant to the user's query and response is not highlighted in the related documents.

Add Smart Previews functionality to conversational search

To add Smart Previews functionality to your conversational search page, you can enable the feature through the UI Editor.

  1. In the SmartHub administration portal, click UI Editor.

  2. Click Select a page from the top menu.

  3. Select an HTML page, such as the Results.html page.

    1. Upland BA Insight recommends that you use a custom page and folder when modifying your settings. Leave the default files as templates.

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

  4. Select the Advanced mode from the top right of the page.

  5. Select Advanced Settings Edit.

  6. Scroll down and locate the text SH.ConversationalSearch.CustomSettings.

    SH.ConversationalSearch = SH.ConversationalSearch || {};
    SH.ConversationalSearch.CustomSettings = {};
  7. Click Default Settings at the top right.

  8. A new browser tab opens with all the available SmartHub module settings.

  9. Search for the word "ConversationalSearch" on the page to quickly navigate to the default settings, shown below:

    SH.ConversationalSearch = SH.ConversationalSearch || {};
    SH.ConversationalSearch.DefaultSettings = {

    }
  10. Copy the ConversationalSearch settings section from SH.ConversationalSearch.DefaultSettings.

  11. Go back to your Advanced settings edit tab.

  12. Paste the copied settings into the SH.ConversationalSearch.CustomSettings section.

  13. In the SH.ConversationalSearch.DefaultSettings section, locate the SmartPreviewsDetails settings:

    SH.ConversationalSearch = SH.ConversationalSearch || {};
    SH.ConversationalSearch.CustomSettings = {
        "ConversationalSearchBot": {
            SmartPreviewsDetails: {
                Enabled: "true",
                DocumentSourceTitleField: "title",
                DocumentSourceUrlField: "clickUri",
                DocumentChunkBodyField: "ESC_ChunkBody"
            }
        }
    };
  14. Modify these settings as desired. Refer to the SmartPreviewsDetails parameters below for more information.

  15. Click Save changes.

  16. Click the Preview <html> file.html link at the top of the code editor.

  17. Review your HTML page in the new tab that opens.

  18. Make any necessary changes back in the code editor. Repeat steps 14-18 as necessary.

  19. Click Save changes.

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"