Get started with conversational language understanding integration

This article includes the step-by-step procedures you need to get started with conversational language understanding (CLU) integration. Let's get started.

To create an agent using an existing CLU model:

  1. Prepare your environment.

  2. Prepare your conversational language understanding project.

  3. Map CLU intents and entities.

Prepare your environment

Before you begin, make sure that you have your CLU model project name, deployment name, Cognitive Services account key, and site URL for Azure Cognitive Service for Language.

  1. Create a Copilot Studio agent.

    Note

    Ensure the environment for your agent has been created in a region supported by Copilot Studio with an equivalent CLU region.

    Not all regions supported by Copilot Studio have an equivalent CLU region.

  2. With your agent open, select Settings on the top menu bar.

  3. Select Language understanding.

  4. If you you see the following, then your environment isn't connected to Azure Cognitive Service for Language. Select Manage connections in Power Apps, to create a CLU connection.

    Screenshot showing the Natural language understanding area of the Language settings page, when your Copilot Studio environment isn't connected to Azure Cognitive Service for Language.

    In the Natural language understanding area of the Language settings page, Microsoft Copilot Studio NLU is selected by default.

  5. Select the desired CLU connection from the NLU Resource list and select Save.

    Screenshot showing an external NLU resource, in the Natural language understanding area of the Language settings page.

    A window appears, prompting you to save a snapshot of your agent.

  6. Select Save snapshot, and save the resulting ZIP archive, named botContent.zip by default, to the desired location. The ZIP archive contains a single YML file named botContent.yml with your agent content, including trigger phrases and messages.

  7. Select Yes, delete my trigger phrase and then select Continue.

  8. Enter the name and model deployment information for the appropriate Azure Cognitive Service for Language project, and select Save.

Note

Changing the NLU configuration for your agent back to 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

  1. If you don't have an Azure subscription, create a free account before you begin.

  2. Create a language resource in Language Studio, with the conversational language understanding feature enabled.

  3. To ensure Copilot Studio functions correctly, you need to create intents for Copilot Studio system topics and for any custom topics you want to create.

  4. Author any custom entities you want to use in your Copilot Studio project.

  5. Train and deploy the project in the same region as your Copilot Studio resource.

Map CLU intents and entities to Copilot Studio prebuilt data types

You create a new Copilot Studio agent by mapping existing topics to CLU intents. You can manually map intents and entities, or for bulk mapping, see Use the Bulk tool wizard.

Manually map intents

  1. Open your Copilot Studio agent.

  2. From the left navigation, select Topics and plugins and select an intent.

    Select Topics from the left navigation.

  3. In the Phrases section of the Trigger node for the intent, select the Edit link.

    Select the Edit link.

  4. In the Add phrases box, enter the name of the CLU intent that you want to map to.

    Enter CLU intent name.

    Note

    The CLU intent name must be typed exactly as stored in the CLU model, including matching case as uppercase and lowercase characters.

  5. To save the intent, click the + (plus) sign to the right of the Add phrases box.

  6. Repeat for the other intents.

Manually map entities

  1. Open your agent.

  2. From the left navigation, select Entities.

    Select Entities from the left navigation.

  3. Select New entity on the Entities page.

    Select + New entity to create a new entity.

  4. In the New entity pane, Add a name, description (optional), and Data Type for your entity.

    Enter the name, description, and data type for your new entity.

  5. To access CLU prebuilt entities, from the Data Type drop-down menu, select From sample data, and select one of the CLU prebuilt JSON code snippets.

  6. (Optional) If you want to import JSON schema from a sample file, select Get schema from sample JSON to access the external file.

Use the Bulk tool wizard

You create a new agent by bulk mapping existing topics to CLU intents using the Map 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.

  1. From the left navigation, select Language, then Add topics and entities from model data.

  2. 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.

  3. Select Next to continue.

  4. select Add intents and entities.

  5. In the Map existing topics to CLU intents screen, select a CLU intent to map to the corresponding topic.

    Map existing topics to CLU intents.

  6. Review your selections, then select Save.

    Review your selection and then select Save.

  7. (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 are not 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.

    Create new topics for CLU intents.

    Note

    Any fields that you leave blank are ignored by the wizard.

  8. Once all CLU intents and entities are mapped to topics, select Done.

    Add intents and entities and select Done to finish.

Once you are done with this procedure, your agent topics now appear in the Topics page. For more information, see Manage topics.

Create a CLU connection in Power Apps

  1. In Power Apps, if the Connections page isn't already in focus, select Connections in the side navigation pane.

  2. Select New connection.

  3. 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.

  4. For the authentication type, select Api Key, and enter the required account key.

  5. Enter the appropriate root site URL, if any.

  6. Select Create. The new connection, with the default name "Azure Cognitive Service for Language," appears in the list of connections for your environment.

  7. Select the More commands icon () next to this connection and select Edit.

  8. In the window that appears, replace the default display name with something else, to distinguish this connector from other CLU connectors, and select Save.