How to use pipeline action: AI Chatbot

Overview

AI Chatbot Pipeline Action starts a chat session between a guest user and Azure OpenAI Chatbot. A guest is able to solve issues before they reach an agent with a customizable AI helpdesk agent.

Pipeline Configuration

Next Stage - ID of the next pipeline item to invoke. Leave blank to end chat.

Next Stage if Chatbot Deflects - ID of the next pipeline item to invoke if the chatbot fully handled the request. Leave blank to end chat.

Drop Stage - ID of pipeline item to invoke if chat session is dropped.

Chatbot Display Name - Display Name that will be used for the chatbot.

Chatbot ID - Unique ID for identifying the chatbot.

Chatbot Avatar - Avatar that will be used for the chatbot.

System Message Prompt - This will instruct the AI about how it should respond to the user. This is the field where a user can define the chatbot behaviour such as a Service Desk Agent or the response language.

Number of Previous Messages to Include - Number of previous messages to send as context for the AI to use in its response.

Chatbot Message Template - Adaptive Card that will be used to display the chatbot's response. The card must have a container element with the ID 'chatbotResponse' that will be used to display the chatbot's response. Submit actions with the data: of '{action":"/deflect"}' will be used to send the guest to Deflect pipeline stage. Submit actions with the data of '{"action":"/agent"}' will send the guest to the Next pipeline item.

Chatbot Greeting Template - Greeting that will be sent to the user when they connect to the chatbot.

Error Response Template - Response that will be sent to the user if the AI cannot generate a response.

Advanced Parameters

Choice Count - Number of alternate responses to return for a prompt

Max Tokens -Maximum number of tokens to generate in the response

Temparature - Sampling temparture to use that controls the apparent creativity of generated completions. Higher values will make output more random while lower values will make results more focues and deterministic.

Top P - Controls randomness of response. Lower values are more deterministic.

Frequency Penalty - Controls repetition in response. Positive values will make tokens less likely as their frequency incerases and decreass the model's likelihood of repeating the same statements verbatim.

Presence Penalty - Controls repetition in response. Positive values will make tokens less likely to appear when they already exist and increase the model's likelihood to output new topics.

Knowledge Base Search Extension Settings - Options for Knowledge Base Integration

Use Cognitive Search - Allow chatbot to access indexed knowledge base resources (FAQs, etc.) to enrich responses

Restrict Bot Responses to Knowledge Base - When enabled, the chatbot will only suggest resposnes based on information recovered from knowledge base resources (FAQs, etc). If it cannot find any relavant resources, it wil inform the user. When disabled, the chatbot will suggest responses based on information recovered from knowledge base resources (FAQs, etc) but can also respond using data from its base model ifno relevant information is found.

Strictness - Controlls how closely the chatbot will match searched documents to the user's query. Raising the value means a higher threshold for relevance and filters out less-relevant documents for responses. Setting this value too high might cause the model to fail to generate responses due to limited available documents.

Maximum Retrieved Documents - The maximum number of top-scoring docuvments to provide the chatbot as background to generate a response. Increasing this value may improve the quality of responses if there are many short documents in the knowledge base.

Search Query Type - Users can choose between 'Simple' and 'Semantic' search query types.

FAQ Citation Link Options - Users can opt to display cited documents as footnotes, where URLs are included at the end of the message, inline within the response, or choose not to link the source documents at all.

In MS Teams client, open FAQ links in a pop-up window (Task Module Window) - The FAQ document is displayed in a pop-up task window when in Teams rather than opening in a internet browser window.

Example Pipeline

The following example pipeline has three AI Chatbot pipeline actions. Each of these have a unique Chatbot ID, Chatbot Avatar, and System Message Prompt. Each chatbot has a different response language that is set using the System Message Prompt.

English:

Spanish:

French:

Pipeline:

Guest Experience

After making a Chatbot selection the response is displayed in the configured language.

French Chatbot:

To further enhance your understanding, here are some related resources:

Cognitive Search and Indexing if FAQ content

Integration of AI into our service desk agent chat client

Azure AI
bmorris