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 a 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 AI Language
- A Copilot Studio account
- A Copilot Studio agent configured to use classic orchestration
- A Copilot Studio language connector configured to use maker-provided credentials
Prepare your CLU 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 your Copilot Studio agent functions correctly, the CLU model you create must have intents for all system topics and for any custom topics you add to your agent.
Define the entities you want your Copilot Studio agent to use.
Train and deploy the CLU project in the same region as your Copilot Studio agent.
Prepare your agent
Go to the Settings page for your agent. Settings for the Generative AI category appear.
If generative orchestration is turned on, switch to classic orchestration: under Orchestration, select No.
Select Language understanding in the side pane.
Select Utilize prebuilt Azure NLU.
If your environment isn't yet connected to Azure AI Language or if you want to use a new connection, select Manage connections, go to Power Apps, and create a CLU connection.
Select the desired CLU connection.
Select Save. A window appears, prompting you to save a snapshot of your agent before deleting all existing trigger phrases for your topics.
Select Save snapshot, and save the resulting ZIP archive (botContent.zip), to the desired ___location. The ZIP archive contains a single YAML file (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 AI Language project, and select Save. Once this operation completes, you can see a new system topic named Analyze Text. This topic is connected to your CLU model and its purpose is to recognize intents and entities in conversations between customers and your agent.
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.
Map CLU intents and entities
In your Copilot Studio agent, start mapping existing topics to CLU intents. You can manually map intents and entities, or perform bulk mapping.
Manually map CLU intents to topics
Go to the Topics page for your agent.
Select the desired topic.
On the Trigger node, select Edit. The Phrases panel appears.
Under Intent name, enter the name of the CLU intent that you want to map to this topic. The intent name appears on the Trigger node under External intent.
Note
The CLU intent name must be typed exactly as stored in the CLU model, including matching case.
Select Save.
Repeat these steps for any remaining topic you want to map to an external CLU intent.
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).
For Data Type, select From sample data.
Select Get schema from sample JSON, enter a JSON code snippet for your CLU entity, and select Confirm. Find example JSON snippets at Entity registration for conversational language understanding integration.
Select Save, and close the panel.
Repeat these steps for any remaining entity you want to map to an external CLU entity.
Perform bulk mapping
Go to the Settings page for your agent.
Select Language understanding.
Select Add topics and entities from model data. The Add intents and entities wizard appears.
Select Choose file to select the file with your CLU model data.
Your model data appears in the Preview pane.
Select Next. The Map existing topics screen appears.
Select the desired CLU intent for each topic.
Review your selections and select Next. The Create new topics screen appears, showing intents that aren't mapped to an existing topic.
If desired, create a new topic for each of these intents: under Create a new topic, enter a name for each topic you want to create.
Note
The wizard ignores any fields that you leave blank.
Select Next. The Register entities screen appears, showing the CLU entities from your model data file.
Select the appropriate data type for the entities you want to use, then select Next. The Review screen appears.
Review the mappings on the Existing topics, New topics, and New entities tab, and select Save.
Review the information on the Success screen, and 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 three dots (⋮) next to this connection and select Edit.
In the window that appears, replace the default display name with something else, to distinguish this connection from other CLU connections, and select Update.