Conversation
CATDAB
commented
Mar 19, 2026
- RAI Error Handling — Catch OpenAI RAI content filtering errors in the OnError topic, classify by subcode (violence, hate, sexual, self-harm, jailbreak, indirect attack), and return targeted user-friendly responses instead of generic error messages
- Deterministic MCP Server Tool Calls — Two approaches for ensuring MCP tools fire reliably: naming them in agent instructions or wrapping them in a dedicated child agent with trigger phrases
- Citations in Adaptive Cards for Teams — Replace default Teams citation rendering with a collapsible Adaptive Card showing numbered, clickable references using ForAll() over CitationSources
…s, and update RAI error handling Added four new best practice files and updated existing ones: - knowledge-hold-message: randomized hold message during knowledge search - start-over-restart-conversation-v2: channel-aware Start Over with Adaptive Cards and Reset Conversation v2 - line-breaks-in-messages: using <br /> tags for paragraph spacing in message and question nodes - rai-error-handling: updated with corrected full topic YAML
e714436 to
0b2f2b2
Compare
There was a problem hiding this comment.
Like the approach.
But we should add a bit more information before adding it :
- Do we targer every channel or only Teams / Copilot ?
- in the Challenge / Why highlight limited support for streamind UI patterns that would diplay planner actions.
- in the solution share that we are actually send a message that will induce a behavior change. We've seen customers not liking multiple messages in a response.
Also I would strongly push back on Option B as OnKnowledgeRequest topics are run sequentially adding latency on top of normal processing. AI Prompt usually takes between 4 to 6 sec e2e adding too much latency. A normal knowledge search take 7s so we are adding near to 80% more.
There was a problem hiding this comment.
Agree on all counts. Will update the best practice accordingly.
There was a problem hiding this comment.
Step one you should apply the same filtering logic to only change that for the teams channel using the channelID condition used in another BP you shared. Today CA publish in Teams are published in Copilot that might not be the same in output.
For me this one need a big change as it covers only topics with Generative answer node.
I would extend this BP to leverage this article : https://microsoft.github.io/mcscatblog/posts/remove-citations-in-copilot-studio-answer/ so we are more comprehensive in the response generated.
There was a problem hiding this comment.
Pulled this one from the PR will combine with citation delete.
There was a problem hiding this comment.
I'm not sure the AI prompt is needed.
I believe that the RAI Subcodes is included in the System.Error.Code so just the condition approach would be good and way faster.
There was a problem hiding this comment.
100% agree subcode checking is faster. I confirmed today that they are currently not being returned for a customer of mine and in my environments with gpt5 ICM here: https://portal.microsofticm.com/imp/v5/incidents/details/763985063/summary. I can pull this one out of the pr until we get closure. If subcodes are indeed broken we'll go with the prompt method, if they start working again I'll update to subcode check condition first with a prompt as a backup.
There was a problem hiding this comment.
For the Knowledge-hold-message I would change that phrase :
Read this best-practice when:
- The user specifically complains about latency or slow response times during knowledge search
It should be : "The user complains about the lack of activity or streaming UI during knowledge search"
Your BP is not helping about reducing the response time, it could be missleading :)
…ling from PR - Added channel targeting, streaming UI limitations, multiple message trade-off, and latency warning against AI prompts in OnKnowledgeRequested - Updated SKILL.md trigger criteria for knowledge hold message pattern - Removed RAI error handling best practice from this PR (to be published separately)
…riable, and RAI error handling - chain-of-thought-logging: surfaces intermediate reasoning steps as messages during complex orchestration - conversation-history-variable: captures conversation transcript into a variable for escalation, ticketing, or tool input - rai-error-handling: classifies OpenAI RAI content filtering errors by subcode with targeted responses - Updated SKILL.md index with new entries and search keywords
|
PR now contains 7 best practice files plus the SKILL.md update:
|
|
@CATDAB please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|