Using Microsoft Copilot agents as chat suggestion sources
AI agents are a great way to help your users in Unblu conversations. For example, they can provide your advisors with chat suggestions based on the knowledge sources your organization already has.
Setting up the Microsoft Copilot agent
The basics of setting up agents in Microsoft Copilot Studio for use with Unblu Spark is covered in a separate article, Creating Microsoft Studio Copilot agents for Unblu Spark.
The sections below cover aspects of setting up agents that are specific to their use as chat suggestion sources.
Custom topics
When you create a new topic in Microsoft Copilot Studio, you create a custom topic. Custom topics can have different types of trigger. For chat suggestions, the phrases trigger is the most relevant.
If you want the agent to react to certain phrases in a specific way, create a custom topic and add a number of related phrases to the topic as the trigger. These phrases are used as training phrases for the agent.
When a user requests a suggestion for a phrase similar to the training phrases, the agent triggers the custom topic. The custom topic then processes the nodes you defined for it. (The actions these nodes can define are outside the scope of this article.)
For chat suggestions, you must ensure that the agent returns a message. When configuring the response, bear in mind the following points:
-
Don’t include any questions in your topics. Questions block the flow of the topic until Unblu Spark sends an answer. For agents used as suggestion sources, this never happens. As a result, the agent never returns a suggestion.
-
Agents used as suggestions sources should only ever send a single answer. Even if your topic returns multiple answers, Unblu only ever uses the first answer as a chat suggestion and discards the other answers.
-
The message your agent returns can be supplemented by a
ChatSuggestionResponse. For more information, refer to Using chat suggestion data types with Copilot agents below.
Conversational boosting
One particularly interesting topic in the context of chat suggestion sources is conversational boosting. It’s a system topic that’s triggered when the agent can’t find another topic with which to process the input it received. Conversational boosting uses generative AI to make suggestions based on the knowledge sources you added to the agent.
The trigger type for conversational boosting is "On Unknown Intent". You can’t select this trigger type in the UI, although you can use it in code representations of a topic and upload it to Microsoft Copilot Studio.
Using chat suggestion data types with Copilot agents
If a Microsoft Copilot agent is configured as a chat suggestion source in Unblu, Unblu Spark communicates with it using the data types for chat suggestions.
When a user requests a chat suggestion, Unblu Spark sends the Microsoft Copilot agent a message activity. The message activity has numerous attributes, but the two Unblu uses are text and value:
-
The
textattribute contains the text of the message for which the agent should generate a suggestion. -
The
valueattribute contains aChatSuggestionRequest. It allows Unblu to provide the agent with more context for the suggestion request. This can be especially useful if a topic uses actions that access another of your organization’s systems to generate a suggestion.If you allow your users to customize the prompt, the text that they entered is in the
customPromptattribute of theChatSuggestionRequest. However, Unblu also ensures that the custom prompt is inserted in the activity’stextattribute.
When your agent responds to Unblu, it also sends a message activity. You can transmit your agent’s suggestion in one of two ways:
-
By default, Unblu Spark expects the
textattribute to contain the chat suggestion. -
If you include a
valueattribute in your agent’s response, Unblu Spark disregards the contents of thetextattribute. Instead, it interprets the contents of thevalueattribute as aChatSuggestionResponse, and attempts to read that schema’s attributes,suggestionTextandsuggestionComment.
To return a ChatSuggestionResponse, you must create a variable in your topic with the attributes mentioned above and assign the suggestionText attribute a value. You must also specify that the activity include the variable in its value attribute.
The contract between the Unblu Spark chat suggestion integration, on the one hand, and Microsoft Copilot Studio, on the other, isn’t enforced technically. However, if your agent doesn’t adhere to the contract, chat suggestions won’t work.
See also
-
For a quick guide to creating agents in Microsoft Copilot Studio, refer to Creating Microsoft Copilot Studio agents for Unblu Spark.
-
For detailed information on working with Microsoft Copilot Studio, refer to the Microsoft Copilot Studio documentation.
-
For more information on chat suggestions in general, refer to Providing agents with suggestions in text chats.
-
For information on requesting chat suggestions in conversations, refer to Requesting chat suggestions in the Agent Desk guide.
-
For information on setting up suggestion sources in the Account Configuration interface, refer to Suggestion sources in the Account Configuration interface guide.