Using Converse API to extract entities only

Can anyone give me the advice to use the converse API for extracting the entities only? Because every time I use the converse API. BP always inits a new conversation.

Hi @Nghia_Nguyen,

Converse will always trigger a new conversation, it is designed to behave as if the caller is exchanging with the bot, as is the case with other channels.

You probably want to point your API calls directly to Duckling instead, this is the entity extractor we use.

Hope this helps!
Happy Building :robot:

1 Like

Thank you so much. Can I reuse the entities and intents that I have trained for the bot on the Botpress NLU?

That probably will complicate the process some more, but once you have your entity, you can always pass it on through the API, have a hook catch it and work on that entity.

I don’t understand your use case though, maybe you would like to explain it a little more so we can think of a better solution?


1 Like

Thank you for responding to my question, I am trying an inline query bot with Telegram that is able to understand users’ behavior. For example, the user said “Pizza near London”. the bot will recognize that the user wants to search “pizza” and the venue should be near “London”. That’s why I just need something for extracting the entities only. I really appreciate it if you give me a code example or some instruction. Thank you again.

Hi @Nghia_Nguyen,

As Maxime said, the converse Api will give you the entities and the intent but you can just ignore the later if you don’t need it and only use the entities. With this solution you will keep all the data you trained in your bot.

Futhermore, it’s still good to have the intent :
“is there any pizza near london” -> search_pizza
“book me a pizza near london” -> book_restaurant

Only getting pizza and london will not allow me to get the nuance.

If you don’t want to use the botpress pipeline, have a look on CRF (conditional random fields) to extract entities, this is what we use and you need to train it.
As Maxime said as well, for time and date and classic entities you could use the duckling API, we use it as well helping the CRF.
This solution is much more complicated and we already done the work for you, it would be easier to use our pipeline and just remove what you don’t want :slight_smile:

Happy building !

1 Like