Accelerate Language Cognitive Services customization with Azure OpenAI
Published Apr 05 2023 09:02 AM 4,276 Views
Microsoft

A few weeks ago, we announced the ability to quickly label your Custom NER and Custom text classification projects with generative models. Today, we’re adding more features powered by Azure OpenAI, and introducing utterance suggestions for Conversational Language Understanding. This continues our journey of enhancing Language services with GPT to improve and accelerate our customization experiences.

 

Conversational Language Understanding allows you to create custom models to detect a user’s intent and extract relevant information from their queries. A significant part of that process is providing data to train machine learning models in the form of utterances that represent what your users say and which intent or entities they belong to. Data is also used to evaluate how accurate your project’s model is when testing against a separate set of examples. Users would have to either create data on the spot, or pull from a source of their data. However, it’s possible that neither option is sufficient to build a comprehensive project.

 

CLU’s new suggest utterances feature allows you to provide only a few examples to an intent and uses GPT models through Azure OpenAI to recommend similar utterances that can be directly added to your dataset.

 

To demonstrate, let’s build a new project with CLU and use the new suggest utterances feature. Follow the guide to create a new project in CLU. We’ll build a project related to flight booking requests for an airline. The user intents we’ll build out will be booking new flights or requesting refunds. After adding those intents, we can go to the data labelling page and add the following examples to each intent:

  • Book Flight:
    • Book me 2 tickets to Cairo
    • I’d like to go from Paris to Montreal
    • Are there any flights to Tokyo?
    • Get me a plane to Amsterdam on January 3rd
    • I’m interested in going to Beijing first class
  • Request Refund
    • I’d like a refund for my flight that just got cancelled
    • You should issue me a refund as soon as possible
    • Why have I not gotten any money back for a flight that was changed last minute?
    • Get me a refund for that Tuesday flight please
    • I want my money back!

Make sure to save your changes once you’re done.

 

Data labelling - CLU.png

 

 

Now click on the Suggest utterances button in the middle of the page. This opens a right-hand pane that allows you to select which intent you’d like to generate similar utterances for.

 

Suggest Utterances Pane.png

 

 

 

To be able to use this feature, you need access to the gated Azure OpenAI resource. You can apply for access here.

 

Once you’ve gotten access, you should create an Azure OpenAI resource, in the same subscription as your language resource, and a deployment of a GPT model. We recommend using text-davinci-002 or text-davinci-003 for the best results. When you select your Azure OpenAI resource in the suggest utterances pane, you’ll need to click Connect next to the resource to provide access to your Language resource to the Azure OpenAI resource. You may need to add your Language resource the role of Cognitive Services User to your Azure OpenAI resource.

 

Once connection is complete, go ahead and select the intent you want suggestions for and click on Generate utterances. In a few seconds, you should see suggestions for new utterances show up in your utterance page with a dotted line and an additional note “Generated by AI”. After doing this for both intents, you can now begin reviewing which ones you’d like accept or reject. You’ll notice each suggested utterance has a green accept button or red reject button next to it. It’s up to you to decide which suggestions you’d like to be part of your data. Remember, you decide what qualifies as a good utterance that represents what your users might say! You can also decide to accept all or reject all with the buttons in the toolbar.

 

Suggested Utterances.png

 

 

In our case, these all look like good suggestions, so we’ll go ahead and accept all of them, and they’ll simply be added to our project. Remember, you have the final decision on whether a suggestion is deemed relevant and accurate to be added to your project’s data, and you must add it to take effect!

 

You can now repeat this process multiple times, for any intent, and get a project with dozens of more data points within minutes.

 

We’re excited to continue our path of infusing large language models as part of our authoring experiences to improve productivity and efficiency!

5 Comments
Co-Authors
Version history
Last update:
‎Apr 05 2023 09:02 AM
Updated by: