How to configure the Cognitive Search Results component

This article will explain the Cognitive Search component and how to configure the component in the Experience Designer.

Cognitive Search

When the virtual assistant doesn’t understand what is being asked, relevant search results can be used to help the user. This can be achieved using the Cognitive Search feature.

Cognitive Search Results are displayed on an Adaptive Card. All styling should be handled via the Adaptive Card. The Cognitive Search is available only for the Chatbot and not for the Voice skills.

Cognitive Search Results

 Steps to configure the Cognitive Search feature

  1. The Cognitive Search can be implemented using the Cognitive Search node in the Experience Designer

  2. The Cognitive Search node can be found in the left pane of the Experience Designer under the Orbita section

    Cognitive Search Node

     

  3. The Cognitive Search node takes the following parameters as input

    1. msg.cognitiveSearch.subscriptionKey

    2. msg.cognitiveSearch.customConfigId

    3. msg.cognitiveSearch.query

    4. msg.cognitiveSearch.count

    5. msg.cognitiveSearch.offset

  4. The inputs can be configured in a function node like below

     

    Function node code snippet:

    msg.cognitiveSearch = { subscriptionKey: "5axxxxxxxxxxxxxxxxxxxx2f47d", customConfigId: "789xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxb", count: 3, offset: 0, query: "Who is the cto of orbita?" }

     

  5. We get the msg object as output from the Cognitive Search node.

Input Parameters

Property

Description

Property

Description

msg.cognitiveSearch.subscriptionKey

This is the custom subsciption key of the Cognitive Search. Please contact support@orbita.ai to provide a custom subscriptionKey.

msg.cognitiveSearch.customConfigId

This is the custom key of the Cognitive Search. Please contact support@orbita.ai to provide a custom customConfigId.

msg.cognitiveSearch.query

This is the search query for which we will get the results in the output of the Cognitve Search node

For Example the query can be “Who is the CTO of Valley Health?”

msg.cognitiveSearch.count

This determines the number of search results to be displayed initially.

For Example if the search result has 10 records and the count is 3, the first 3 results will be shown with a load more button.

msg.cognitiveSearch.offset

This count defines the number of records to be skipped.

For Example if the search results has 10 records and the offset value is 2, the first 2 records will be skipped and the remaining 8 results will be available in the output

Please connect these Experience Designer nodes to your Bot flow.

 Related articles