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.
In this article, learn how to build a CLU model that implements entity slot filling to facilitate multi-turn conversations. With this approach, your model can incrementally collect the required information across multiple conversation turns. Users don't need to provide all the details in a single interaction. As a result, you can complete tasks more naturally and efficiently.
Prerequisites
Azure subscription - If you don't have one, you can create one for free.
Required permissions - Ensure that the person establishing the account and project has the Azure AI Account Owner role at the subscription level. Alternatively, the Contributor or Cognitive Services Contributor role at the subscription scope also meets this requirement. For more information, see Role based access control (RBAC).
Azure Language in Foundry Tools resource - Create a Language resource in the Azure portal.
Note
You need the owner role assigned on the resource group to create a Language resource.
Microsoft Foundry project - Create a project in Foundry. For more information, see Create a Foundry project.
Deployed OpenAI model - Deploy an OpenAI model in Foundry as described in the Deploy an OpenAI model section.
Configure required roles, permissions, and settings
Begin by configuring your Azure resources with the appropriate roles and permissions.
Add required roles for your Language resource
Navigate to your Language resource page in the Azure portal and select Access Control (IAM) from the left navigation pane.
Select Add > Add Role Assignments, and assign either the Cognitive Services Language Owner or Cognitive Services Contributor role for your Language resource.
Under Assign access to, select User, group, or service principal.
Select Select members.
Choose your user name from the list. You can search for user names in the Select field. Repeat this step for all required roles.
Repeat these steps for all user accounts that require access to this resource.
Connect your Azure Language resource to Foundry
To enable secure access, create a connection between your Language resource and Foundry. This connection provides secure identity management, authentication, and controlled access to your data.
Note
The multi-turn capability is currently only available in the Foundry (classic) portal.
Navigate to Foundry (classic).
Access your existing Foundry project for this tutorial.
Select Management center from the left navigation menu.
Select Connected resources from the Hub section of the Management center menu.
In the main window, select + New connection.
Select Language from the Add a connection to external assets window.
Select Add connection, then select Close.
Deploy an OpenAI model in Foundry
Deploy an OpenAI model to provide the foundational intelligence and advanced reasoning capabilities for your CLU model.
Select Models + endpoints from the My assets section of the navigation menu.
From the main window, select + Deploy model.
Select Deploy base model from the dropdown menu.
In the Select a model window, choose a model. The gpt-4 base model is recommended for this project.
Select Confirm.
In the Deploy gpt-4 window, retain the default values and select Deploy.
The model deployment is now complete.
Build your multi-turn model
Now that your Language resource, Foundry project, and OpenAI deployment are configured, you're ready to build your CLU model.
Create a CLU project
In this section, you create a travel agent model and deploy it using Quick Deploy.
Navigate to Foundry (classic).
If you aren't already signed in, the portal prompts you to authenticate with your Azure credentials.
Once signed in, create or access your existing projects within Foundry.
If you're not already in your project for this task, select it.
In the left navigation pane Overview section, select Fine-tuning.
From the main window, select the AI Service fine-tuning tab, then select + Fine-tune.
In the Create service fine-tuning window, choose the Conversational language understanding tab, then select Next.
In the Create CLU fine-tuning task window, complete the following fields:
- Connected service - The name of your language service resource should appear by default. If not, select it from the dropdown menu.
- Name - Provide a name for your fine-tuning task project.
- Language - English is set as the default and should already appear in the field.
- Description - Optionally provide a description or leave this field empty.
Select Create. The creation operation may take a few minutes to complete.
Add intents
From the Getting Started menu, select Define schema.
In the main window, select Add Intent.
The Add Intent window contains two required fields:
- Intent name(Pascal case)
- Intent description (required for Quick Deploy)
After completing these fields, select + Add to create your intents.
After defining all intents, select Add Intent.
Add entities
Select the Entities tab, then select Add entity.
The Add an entity window contains two required fields:
- Entity name (Pascal case)|
- Entity description
After completing the entity fields, select Add an entity.
Associate intents with entities
Select the Associations tab.
Select each intent and link it to the required entities from the Available entities section. This step ensures the model knows which slots to fill for each intent.
All entities must have an association with at least one intent. After configuring the associations, select Update associations.
Once all entities have associations, you can proceed with Quick Deploy using a large language model (LLM).
Quick deploy with LLM
From the Getting Started menu, select Train model.
In the Train your model section, select Quick deploy with LLM.
Complete the Quick deploy with LLM window fields:
- Deployment name - Provide a name for the deployment.
- Select Azure OpenAI Model Deployment - Choose the Azure OpenAI model deployment you created for this project.
- Deployment regions - Select the region associated with your Azure Language resource.
Select Create. Foundry manages the configuration and deployment processes through backend operations.
Test in playground
From the Getting Started menu, select Deploy your model.
In the main window, select your model.
Select Try in playground.
In the playground, select the Conversational language understanding tile.
Under the Configuration menu on the left, verify that the following fields are completed correctly:
- Project name - Ensure this matches the project you created for this CLU fine-tuning task.
- Deployment name - Verify this matches the name you assigned to your OpenAI model.
Select the Multi-turn understanding checkbox.
Simulate a multi-turn dialog by entering a conversation.
Select Run.
The model returns a response in both Text and JSON formats.
In the Details panel on the right, review the Top Intent and detected Entities.
That's it! You successfully created a multi-turn CLU model with entity slot filling capabilities to collect required information across multiple dialog turns.
Clean up resources
To clean up and remove an Azure AI resource, delete either the individual resource or the entire resource group. Deleting the resource group removes all contained resources.
Related content
Learn how CLU handles entity slot-filling across multi-turn conversations