Botframework-sdk: LUIS: Intents are limite to only 20 ?

Created on 2 Sep 2016  路  12Comments  路  Source: microsoft/botframework-sdk

Using LUIS as a NLP for our Bot it seems the intents are limited to 20. It's very few for a bot ...

I know we can provide multiple LUIS Id (but I assume it makes multiple HTTP Request ?)

How bot creator handle that ? Is it a technical limit ?

Most helpful comment

This limit is set due to performance reasons. But relaxing it is one of the top priorities on our roadmap, stay tuned :)

All 12 comments

https://docs.botframework.com/en-us/technical-faq/#how-can-i-use-more-than-the-maximum-number-of-luis-intents

Feel free to ask more questions.

Yes in a Nutshell Dialog send an HTTP request for each model.
My question is more why only 20 / model ?

This limit is set due to performance reasons. But relaxing it is one of the top priorities on our roadmap, stay tuned :)

Is there an easy way to add models more programmatically? besides just stacking up [LuisModel] annotations? I'd love to be able to store the model references in a config file somewhere, and easily grow/shrink the amount used, or change them, without having to go to my bot dialog code and change the annotations.

You can use the constructor that takes a number of ILuisService:

https://github.com/Microsoft/BotBuilder/blob/master/CSharp/Library/Dialogs/LuisDialog.cs#L146

There's no requirement to use the LuisModelAttribute on the class - you can construct a LuisService from the LuisModelAttribute and then pass that ILuisService to the constructor.

If you're using autofac or equivalent, you should be able to resolve all ILuisService implementations from the container.

@willportnoy Would it be possible to refactor LuisModelAttribute into a new ILuisModel interface and have the LuisService constructor take that as a parameter instead? This issue has come up a few times previously (see #549 and #1081), so I think it might be worth revisiting. I also feel like that could be more scalable and would help for projects like ours that load these values from a config.

I can look into a PR for this if there's interest :)

@cglong LuisModelAttribute is just the POCO container for the configuration - as in those items, you can instantiate the LuisService with LuisModelAttribute instances that you obtain from whatever source you like (e.g. your DI container).

I'm not adverse to the interface, if you feel inheriting from attribute makes the LuisModelAttribute too heavy.

@cglong thank you for the pull request - we've merged it, so I'm going to close this issue. Feel free to open a new issue for further discussion.

@CarolHanna It seems the limit has been raised, I currently have 23 intents. But what exactly is the new maximum? I can't find anything in the docs.

@mikob any update on the maximum?

@rnjailamba I don't see it documented on https://www.luis.ai/Help - if you open a top-level issue, we can ask the appropriate people to respond.

Hey!, check this out https://docs.microsoft.com/en-in/azure/cognitive-services/luis/luis-boundaries
The limit for intents was raised from 80 to 500 that is a massive improvement hurray! 馃

Please check the mention link for the limits on other things as well such as entities, I recommend to go with a single LUIS app and a single LuisDialog instead of choosing a top level (RootDialog) and multiple child level dialogs or the factory pattern for finding the best fit intent method from a number of LuisDialogs until unless you are about/near to reach the limit, when you are about to reach the limit only then think of the design changes, don't overcomplicate from the beginning itself and try to focus on the development, that's what I would suggest :)

Happy coding!

Was this page helpful?
0 / 5 - 0 ratings