Skip to content

Custom question answering

Element Name: Custom Question Answering

Category: Cognitive

Description: Allows handling the knowledge base (questions and answers) created in the Microsoft Azure portal.

Functionality: Displays answers from the knowledge base in a unified manner.

Prerequisites:

  • Build resource. For further guidance: Access the Microsoft Azure portal (portal.azure.com) in the Create Resource section. For more information, refer to Azure AD B2C information https://learn.microsoft.com/en-us/azure/active-directory-b2c/.

  • Build items, each with their respective questions or possible answers.

  • For some of the following fields, locate in the Azure AI / Language Studio / Custom Question Answering environment in the "Deploy Knowledge Base" section. There, you should find the option "Get Prediction URL," which opens a popup with the necessary data:

QNAMakerV2 Configuration (Required)

[Expression to Evaluate]: String field where an expression, in the form of an entity or a quoted expression, must be entered for evaluation.

[QNA MAKER EndpointKey (Optional if no AUTHORING_KEY)]: String field where authorization keys for connection configuration should be entered. Obtain these from the Azure environment by locating the created resource in the Keys and Endpoint option:

[OCP-APIM-SUBSCRIPTION-KEY]: String field where subscription keys for connection configuration should be entered. Obtain this from the "Get Prediction URL" popup.

[Minimum Evaluation Score. Valid values between 1 and 100]: Dropdown list allowing the definition of the percentage match for answers.

[PROJECTNAME]: String field where the project name is defined. Obtain this from the "Get Prediction URL" popup.

[DEPLOYMENTNAME]: String field expression.

[Maximum Menu Iterations. Valid values between 1 and 5]: When the response is a menu, this dropdown list allows defining the maximum number of accesses to the menu.

[Entity to Save the Menu]: When the response is a menu, this dropdown list allows selecting the entity where the menu will be saved.

[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_MAKERV2_ERROR.]: Dropdown list where the entity name for error handling must be selected.

Example of Custom Question Answering Implementation

--Prerequisites:

Resource Created: xxxxxx

Item: Menu

Response:

Other available plans 3 play

Go Home

--Input

[Expression to Evaluate]: ‘Hello’

[QNA MAKER EndpointKey (Optional if no AUTHORING_KEY)]: ‘https://xxxxxx.cognitiveservices.azure.com’

[OCP-APIM-SUBSCRIPTION-KEY]: x56797vv98vc6cv789ooo

[Minimum Evaluation Score. Valid values between 1 and 100]: 70

[PROJECTNAME]: ‘Project_1’

[DEPLOYMENTNAME]: ‘Production’

[Maximum Menu Iterations. Valid values between 1 and 5]: 4

[Entity to Save the Menu]: MENU_2

[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_MAKERV2_ERROR.]: ERROR_Project_1

--Result (Lynn Simulator Window)