William Raggett

October 10, 2019

3 Common LUIS Mistakes and How to Avoid Them

One of the most powerful tools for building bots is Microsoft’s Language Understanding Intelligent Service, more commonly know as LUIS. It allows you to quickly and easily train an app for understanding natural lanugage. It’s simple to learn, and can deliver great results.

However, when you’ve been working with LUIS for a while, you may find that you mkae make a few mistakes. You may even mkae make the same mistake several times. We at ChatForge are no different.

Mistakes are part of the learning process. That being said, learning from mistakes is a lot easier if you learn about the mistake before you make it. As such, we have assembled a list of our mistakes to make your LUIS experience as easy as possible.

Mistake 1: Overlapping Intents

LUIS can become confused when separate intents are used for similar utterances. An example of two such utterances could be “I want to take time on holiday” and “I want to take time off sick”.

These utterances sound alike and even function in similar ways. If they are treated separately, the bot might mistake one intent for the other annoyingly frequently. If this isn’t spotted until after deployment, you’ll need to re-train the whole app.

Solution: Combine the Intents

If the app is confusing intents for one another, it is usually the result of a plan that is insufficient and/or short-sighted. Poor Agile can often be held responsible for this and - generally - this can be circumvented by avoiding similar intents.

We would recommend combining intents that are obviously similar and parse the required information through the entities. In the example given above, it would be good practice to train an intent to detect “I want to take time on holiday” and “I want to take time off sick” as a single entity. The bot should then uses this entity to decide on what path to follow.

Additionally, try to think ahead when planning utterances and don’t be afraid to refactor if you think of a similar intent later on.

Mistake 2: Intents that are Too Short

We have found that LUIS works best when parsing full sentences. Utterances that consist of only one word are difficult to detect and cannot be scored confidently.

In the event that multiple intents consist of single words, LUIS will struggle to distinguish them all. If you try to train a bot to greet anyone who enters a variation of “Hello”, (“Hey”, “Wassup”, etc.) it is conceivable that the bot may greet anyone who enters a one word utterance such as “yes”, “thanks”, or even “Goodbye”.

Solution: Use Manual Triggers as Much as Possible for Short Utterances

The point of LUIS is to parse language and forcing it to learn short utterances can negatively affect training. Where short utterances are required, it’s a good idea to input the trigger manually as debugging in bot code is significantly easier than debugging LUIS. It’s not excessively difficult to compile a list of valid greetings for a bot to respond to.

Mistake 3: Unbalanced Training

If an intent has too many utterances, it’s scores will be inflated artificially. If you try to use training to fix this, false positives will emerge for other utterances.

To re-use an example, if you were to over-train a greeting intent, the bot may begin greeting in response to completely unrelated statements.

Solution: Train Intents Evenly and Re-Factor when needed

Training is not a viable fix here. If an intent is scoring too high, you should consider refactoring or try a manual solution instead. For the most part, you should aim to keep the number of utterances for each intent approximately equal.

The range for an acceptable number of utterances can be lost in translation when passing models between teams of people. Considering this, it’s a good idea to agree with your colleagues what this range should be as to prevent any intent from becoming overly dominant.

We hope that you find this list useful. If you find any other easily avoidable mistakes, why not let us know? We may thank you in a tweet (@chatforge) or, if we collect enough, we may thank you in another one of these blog posts.