Skip to content

Custom question answering Json

Category: Cognitive

Description: This extension module allows managing a knowledge base composed of questions and answers, created in the Microsoft Azure portal. It facilitates the creation, maintenance, and updating of content, ensuring that the information is always available and up to date. The responses obtained in the Lynn application will be provided in JSON format.

Functionality: Use this extension module to extract information from a knowledge base and utilize the responses delivered in JSON format as cognitive assistance. This module is used to find the most appropriate answer to any query within the knowledge base and can be integrated into platforms like webchat or WhatsApp. This improves the efficiency of query resolution and enhances the user experience when accessing a digital channel.

For more detailed information, click Here

Prerequisites

  1. Create Resource in Azure

    • Sign in to portal.azure.com.
    • Navigate to "Azure AI" and select "Create resource".
  2. Configure QNAMakerV2

    • Go to "Language Studio" and then create or deploy the knowledge base.
    • Complete the deployment process.

To access a step-by-step guide on these requirements, click Here

Implementation

Expression to evaluate: A string field that allows you to enter an expression to be evaluated. It can be completed with an entity or text which must be enclosed in single quotes to be identified as such.

QNA MAKER EndpointKey (Optional if you don't have an AUTHORING_KEY): A string expression field where the authorization keys for configuring the connection should be entered. It is obtained in the Microsoft Azure environment, located in the created resource under the Keys and Endpoint option.

OCP-APIM-SUBSCRIPTION-KEY: A string expression field where the subscription keys for configuring the connection should be entered.

PROJECTNAME: A string expression field where the project name is defined.

DEPLOYMENTNAME: A string expression field that indicates the unique name identifying the deployment instance.

These fields are obtained from the Get prediction URL pop-up window from the Sample request section in the Azure AI | Language Studio portal.

Entity where the evaluation result will be deposited: A dropdown list field that will allow you to select the entity where the evaluation result will be stored.

The intent to execute in case of error. The action flow will be interrupted, and the error description will be passed to the selected intent with the name: 'QNA_MAKERJSONV2_ERROR': Dropdown list where the name of the intent for error handling must be selected.

Implementation Example

Field Value
Name: QNAMaker
Expression to evaluate: INPUT
QNA MAKER EndpointKey (Optional if you don't have an AUTHORING_KEY): 'https://lynn-latam.cognitiveservices.azure.com'
OCP-APIM-SUBSCRIPTION-KEY: '05f6cb5927edXXXXXXXXXXXXXXXXXXXX'
PROJECTNAME: 'LynnPruebaQnaMaker'
DEPLOYMENTNAME: 'production'
Entity where the evaluation result will be deposited: QnaMenu
The intent to execute in case of error. The action flow will be interrupted, and the error description will be passed to the selected intent with the name: 'QNA_MAKERJSONV2_ERROR': Error_Handler

For better visualization of specific fields, it is recommended to add the extension module JavaScript Code, where you can assign a format adapted for its presentation.