Can I add the tested utterances into my LUIS model automatically without review?

Viewed 209
2 Answers

Yes, you can do it using REST APIs.

  • First, you need to get intent programmatically, from here.
  • Then change model programmatically from here.

PS: You may need to Serialize and Deserialize JSON objects, check this library which can be downloaded from NuGet.

First, consider what you're doing. If you tell LUIS to add all utterances to the intents that LUIS already predicted for them, then your intention must be for LUIS to continue predicting the same intents that it already had been. Even though adding new labeled utterances will surely change confidence scores a bit, using a script to automatically label unlabeled utterances isn't very different from doing nothing at all.

Even if you do want to do something about the utterances, you might consider just clearing your logs to get rid of them, which is apparently what the versions - Delete unlabelled utterance API does because unlabeled utterances seem to be drawn from your logs. On the other hand, you might as well just not log anything to begin with.

If you really want to automate the process of adding utterances to their aligned intents, you'll have to download the logs and then add the utterances from the logs as example utterances. You could then use the example utterances - Review labeled examples API to see which utterances are labeled and use that to determine which utterances from the logs are unlabeled, but you're in luck because you don't have to. You can just add all the utterances from the logs without worrying about whether or not they're already labeled.

You could do something like this:

  1. apps - Download application query logs
  2. example utterances - Batch add labels
  3. train - Train application version
  4. apps - Publish application
Related