Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This article shows you how to integrate an existing CLU model to an agent.
Note
Ensure the environment for your agent is in a region supported by Copilot Studio with an equivalent CLU region.
Not all regions supported by Copilot Studio have an equivalent CLU region.
Prerequisites
- A fully trained CLU model, including intents for all system topics and for any custom topics you want to author
- The key and prediction URL for the deployed model
- The CLU project name and deployment name
- An account key for Cognitive Services
- A site URL for Azure Cognitive Service for Language
- A Copilot Studio account
- A Copilot Studio agent
- A Copilot Studio language connector configured to use maker authentication
Prepare your agent
Go to the Settings page for your agent.
Select Language understanding.
If your environment isn't yet connected to Azure Cognitive Service for Language, select Manage connections, to create a CLU connection in Power Apps.
Back in Copilot Studio, select the desired CLU connection, and select Save. A window appears, prompting you to save a snapshot of your agent.
Select Save snapshot, and save the resulting ZIP archive, named botContent.zip by default, to the desired location. The ZIP archive contains a single YAML file named botContent.yml with your agent content, including trigger phrases and messages.
Select Yes, delete my trigger phrases and then select Continue.
Enter the name and model deployment information for the appropriate Azure Cognitive Service for Language project, and select Save.
Note
Changing the language understanding configuration for your agent back to Microsoft Copilot Studio NLU removes the Analyze Text system topic. It also requires you to manually add example phrases for topics currently mapped to external intents.
Now that you're done preparing your environment, you're ready to map intents and entities to CLU model data.
Prepare your conversational language understanding project
If you don't have an Azure subscription, create a free account.
Create a language resource in Language Studio, with the conversational language understanding feature enabled.
To ensure Copilot Studio functions correctly, you must create intents for all Copilot Studio system topics and for any custom topics you add to your agent.
Author the entities you want to use for your Copilot Studio agent.
Train and deploy the CLU project in the same region as your Copilot Studio agent.
Map CLU intents and entities
You create a new Copilot Studio agent by mapping existing topics to CLU intents. You can manually map intents and entities, or perform bulk mapping.
Manually map CLU intents to a topic
Go to the Topics page for your agent.
Select the desired topic.
On the Trigger node, select Edit.
Under Add phrases, enter the name of the CLU intent that you want to map to this topic.
Note
The CLU intent name must be typed exactly as stored in the CLU model, including matching case.
Repeat for any remaining intents you want to map to this topic.
Select Save.
Manually map entities
Go to the Settings page for your agent.
Select Entities.
Select Add an entity > Register an external entity.
In the panel that opens, enter the desired name and a description (optional).
To access your CLU prebuilt entities:
Select From sample data from the Data Type list.
Select Get schema from sample JSON and enter the JSON code snippet for your CLU entity.
Use the Bulk tool wizard
You create a new agent by bulk mapping existing topics to CLU intents using the Add intents and entities wizard. With the wizard, your agent can automatically utilize existing intents from your CLU model rather than trigger phrases to determine which topic to map to.
Begin by uploading your CLU model data file and automatically map CLU intents to your Copilot Studio agent.
From the left navigation, select Language, then Add topics and entities from model data.
In the File name option, select Choose file to select the data file from which you want to upload your CLU model.
Your model data file appears in the Preview window.
Select Next to continue.
select Add intents and entities.
In the Map existing topics to CLU intents screen, select a CLU intent to map to the corresponding topic.
Review your selections, then select Save.
(Optional) For those intents that aren't mapped to an existing topic, you can create new topics for each intent.
In the wizard, you can see a list of CLU intents that aren't yet mapped to a topic. In the field Create a new topic, enter a name for each of the topics that you want to create, and then select Next.
Note
The wizard ignores any fields that you leave blank.
Once all CLU intents and entities are mapped to topics, select Done.
Once you're done with this procedure, you can go to the Topics page to review your topics. For more information, see Manage topics.
Create a CLU connection in Power Apps
In Power Apps, if the Connections page isn't already in focus, select Connections in the left pane.
Select New connection.
Select Azure Cognitive Service for Language (use the search field to narrow down the list if needed). A window appears prompting you for authentication information.
For the authentication type, select Api Key, and enter the required account key.
Enter the appropriate root site URL, if any.
Select Create. The new connection, with the default name "Azure Cognitive Service for Language," appears in the list of connections for your environment.
Select the More Commands icon (…) next to this connection and select Edit.
In the window that appears, replace the default display name with something else, to distinguish this connector from other CLU connectors, and select Save.