Microsoft Bot Framework Cheat Sheet
- Powered by Azure AI Bot Service
- A comprehensive framework for building intelligent, enterprise-grade conversational AI experiences across multiple channels.
- Enables natural language understanding, multi-turn dialogues, and proactive messaging for a seamless conversational experience.
- Integrates natively with Azure AI services like Azure AI Language, Azure AI Speech, and Azure OpenAI for enhanced bot intelligence.
- Supports deployment across channels including Microsoft Teams, Web Chat, Facebook Messenger, Slack, and custom clients via Direct Line.
Important Terminologies
- Bot
A conversational application that interacts with users through text, cards, or speech to perform tasks or provide information.. - Activity
The basic unit of communication between the bot and the user. It can either be a message, a command, or a conversation update. - Turn
A single interaction that includes one message from the user and one response from the bot. - Dialog
A structured component used to manage conversation flow. It supports multi-step, multi-turn interactions with branching logic. - Channel
A platform or medium (e.g., Microsoft Teams, Facebook Messenger, Direct Line) where users engage with the bot.
Key Features
1. Bot Development Tools
- Bot Framework SDK: Develop bots using open-source SDKs for .NET, JavaScript, and Python. Includes support for dialogs, adaptive cards, and rich message handling.
- Bot Framework Composer: Visual authoring canvas to design and manage dialogs, triggers, and language generation (LG) templates without heavy coding.
- Bot Framework CLI: Command-line tools to automate bot management tasks like publishing, QnA setup, and configuration.
2. Natural Language Understanding (NLU)
- Azure AI Language: Integrate state-of-the-art intent and entity recognition for natural language processing in bots.
- Conversational Language Understanding (CLU): A feature of Azure AI Language that enables bots to understand user intent and extract key information from natural language input
- Orchestrator: Route user input across multiple LUIS apps or QnA knowledge bases using transformer-based models.
3. Conversation Management
- Dialogs: Manage multi-turn conversations using waterfall dialogs, adaptive dialogs, and declarative dialog definitions.
- Memory Scopes: Store and manage user, conversation, and turn-specific data within dialog contexts.
- Interruptions & Event Handling: Handle unexpected inputs, cancellations, or proactive messages gracefully during conversations.
4. Proactive Messaging
- Bots can initiate conversations based on external triggers (e.g., alerts or scheduled events).
- Supports storing conversation references and sending messages outside of user-initiated sessions.
5. QnA and Knowledge Integration
- Azure AI Language Question Answering: Build knowledge-based bots that respond to FAQs using unstructured or semi-structured content.
- Combine QnA with NLU for hybrid bots that can switch between knowledge and task-based interactions.
Integration with other Azure services
Azure Service | Integration Capabilities |
Azure AI Language | Recognizes user intents and extracts entities to drive intelligent conversation flow. |
Azure OpenAI Service | Allows bots to generate dynamic, human-like responses using powerful language models. |
Azure AI Speech | Adds voice interaction by converting speech to text and generating spoken responses. |
Azure Logic Apps | Automates workflows by connecting bot actions to backend services like databases, emails, or ticketing systems. |
Microsoft Entra ID | Secures bot interactions by handling user authentication and access control. |
Sample Use Cases
- Handle FAQs, troubleshoot issues, escalate to human agents, and assist with internal IT, HR, or administrative support.
- Help users schedule appointments, manage tasks, navigate applications, and access personalized information.
- Guide users through product discovery, provide recommendations, handle purchases, and track orders.
- Support sensitive or regulated interactions such as checking balances, scheduling medical appointments, delivering health or government service information, and sending alerts.
- Deliver course materials, manage enrollment or scheduling, answer academic questions, and guide users through learning paths.
- Survey, Feedback, and Notification Collect user feedback, conduct polls, and send proactive updates such as reminders, alerts, or announcements.
Pricing
- Azure AI Bot Service offers the following:
- Free tier for standard channels.
- Premium channels like Direct Line and SMS are billed per message or session.
- Direct Line is priced based on the number of messages exchanged between the user and the bot.
- Azure AI Language (CLU) charges based on the number of text records analyzed for intent and entity recognition.
- Azure OpenAI Service is billed per token (input and output) used during text generation.
- Azure AI Speech is priced based on the duration of audio processed for speech-to-text or text-to-speech conversion.
Microsoft Bot Framework References:
https://learn.microsoft.com/en-us/azure/bot-service/bot-service-overview
https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-basics
https://learn.microsoft.com/en-us/azure/bot-service/bot-service-quickstart-create-bot
https://azure.microsoft.com/en-us/pricing/details/bot-services/