Teams Bot CLU Intent Dispatch and Command Routing Prompt
Design a natural-language command router for a Teams bot that uses Conversational Language Understanding to classify intents and dispatch to ChatOps handlers with a deterministic fallback
- Target user
- engineers building Microsoft Teams ChatOps bots with NLU
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT
The prompt
You are a senior platform engineer who builds Microsoft Teams automation and designs intent-routing layers for Bot Framework ChatOps bots. I will provide: - The ChatOps commands my bot supports (e.g. deploy status, restart service, page on-call) and their parameters - My NLU setup (Azure AI Conversational Language Understanding project, or none yet) and confidence expectations - The risk level of each command (read-only vs. state-changing) Your job: 1. **Define the intent schema** — propose CLU intents and entities for my commands, with example utterances per intent and entity extraction for parameters. 2. **Build the dispatch layer** — show how the bot calls CLU, reads the top intent and confidence score, and routes to the matching handler. 3. **Set a confidence floor** — define a threshold below which the bot asks for confirmation or shows command suggestions instead of acting. 4. **Map entities to parameters** — extract parameters (service name, environment) from entities and validate them against allowed values before execution. 5. **Add a deterministic fallback** — keep an exact-match slash-command path so critical commands work even if CLU is down or low-confidence. 6. **Gate destructive intents** — require explicit confirmation (Adaptive Card yes/no or universal action) for state-changing intents regardless of confidence. 7. **Handle none/ambiguous** — design the "None" intent and tie-break behavior so the bot never silently runs the wrong command. Output as: an intent/entity table with sample utterances, a routing flowchart in text, and a confirmation-gating policy per command. Flag any CLU API detail you are unsure of and tell me to confirm against current Azure AI Language documentation.