How to identify multiple entities in RASA

南笙酒味 提交于 2019-12-24 10:37:15

问题


I want to extract multiple entities from a user input. Example- "Service httpd is not responding because of high CPU usage and DNS Error" So here I want to identify below: Httpd High CPU usage DNS Error

And I will be using this keywords to get a response from a Database.


回答1:


Just annotate them accordingly, e.g.

## intent: query_error
- Service [httpd](keyword) is not responding because of [high CPU usage](keyword) and [DNS Error](keyword)

Having the sentence from above, Rasa NLU would extract 3 entities of type keyword. You can then access these entities in a custom action and query your database.

Regarding the number of examples which are required: this depends on

  • the NLU pipeline which you are using. Typically tensorflow_embedding requires more training examples than spacy_sklearn since it does not use pretrained language models.
  • the number of different values your entities can have. If it is only httpd, high CPU usage, and DNS error then you don't need a lot of examples. However, if you have a thousand different values for your entity, then you need more training examples

One intent is enough if you always want to trigger the same custom action. However, if you want to classify different type of problems, e.g. server problems and client problems, and trigger different databases depending on the type of problems, you might consider having multiple intents.

Sorry for the vague answers, but in machine learning most things are highly dependent on the use case and the dataset.



来源:https://stackoverflow.com/questions/53404259/how-to-identify-multiple-entities-in-rasa

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!