AI News, How to handle multiple intents per input using Rasa NLU TensorFlow pipeline
- On Thursday, October 4, 2018
- By Read More
How to handle multiple intents per input using Rasa NLU TensorFlow pipeline
With the release of Rasa NLU 0.12, we introduced a new, TensorFlow based, Rasa NLU pipeline and we are stoked to see developers getting excited about it — big thanks to everyone who has already tried it and shared their feedback!
In short, the new pipeline tackles two main problems which chatbot developers face: In this post, we are going to take a comprehensive look at how the TensorFlow-based pipeline can help us solve the second problem: multiple intents.
A little disclaimer — for reproducibility reasons I am not going to use any fancy APIs, but I would like to encourage you to play around with the code, implement custom actions, connect to real-time meetup, location or other APIs and make this chatbot a lot more fun!
It consists a processing parameter intent_featurizer_count_vectors which defines how model features are extracted (you can read more about the parameters here) and one more component intent_classifier_tensorflow_embedding which states that we are going to use TensorFlow embeddings for intent classification.
By setting the flag intent_tokenization_flag: true, we tell the model that we want to split intent labels into tokens which means that the model will know which intents are multi-intents, and with intent_split_symbol we define which character should be used to make a split, which in this case is a +.
Once the NLU data is ready, we can train the model by executing the following command: It calls the Rasa NLU train function, provides pipeline configuration and data files, sets a fixed model name and prints out the training results.
We can load the model using the following code (check the load_nlu_model.py file): The method Interpreter.load loads a model and interpreter.parse parses the provided input and returns the intent classification results.
To demonstrate how all the pieces fit together let’s build a dialogue management model with a few templates as responses (as mentioned before, for the sake of reproducibility and simplicity we are not going to use any real-time APIs or databases).
The domain file contains templates, which dialogue management model will use to respond to the user (check the domain.yml file): These templates are going to be used as responses to user inputs depending on how they are used in creating stories data.
For example, the story find_meetup_03 has two actions as a response to a multi-intent thanks+goodbye, however, just like in the story find_meetup_04, it is totally ok to skip an action for one of the tokens. The decision of which approach is the best to use highly depends on the domain and the logic of the chatbot — in some cases creating separate actions for multi-intents is absolutely not necessary and you can use all the same actions as responses for multi-intents and for single-intents.
To train the model we can use the command below which calls Rasa Core train function, passes previously defined domain file and stories data, defines the location where the model is going to be saved and how many epochs should be used to train the model.
- On Thursday, October 17, 2019
Conversational AI: What's New? : Build 2018
Companies across the globe are laying out visions for their digital transformation, and Conversational AI is key part of that vision. In this session, we will share ...
Lecture 12: End-to-End Models for Speech Processing
Lecture 12 looks at traditional speech recognition systems and motivation for end-to-end models. Also covered are Connectionist Temporal Classification (CTC) ...
AI for customer 360: Leveraging text language and vision AI capabilities to derive - BRK2479
Learn how pre-trained cognitive services can help with your customer lifecycle. Build intelligent solutions to help with customer acquisition, understanding, ...
Microsoft Business Forward 2018 keynote | James Phillips on Digital Transformation with the Cloud
James Phillips, CVP, Business Applications Group at Microsoft shares the vision, strategy for business applications at Microsoft and demonstrates the latest ...
Microsoft Build 2018 // Vision Keynote
CEO Satya Nadella takes the stage at Microsoft Build, our annual developer conference, at 8:30AM PT Monday, May 7. Join us to learn what's next for ...
Knowledge Graph Search with Elasticsearch — L. Misquitta and A. Negro, GraphAware
Emil Eifrem highlighted knowledge graphs in his keynote at GraphConnect Europe. Last year, Forrester said "Knowledge graphs provide contextual windows ...
Harnessing Propensity to Buy Data to Create Sales Ready Conversations
[38:03] Not all traffic sources are created equal. Therefore not all marketing qualified leads are created equal. In this conversation, Diana Eadington Reed ...
Corruption (Destiny Machinima Movie)
Based on the lore of the video game Destiny, this is a fan-made movie detailing the fall of Rezyl Azzir and the rise of Dredgen Yor, and the chronicle of the two ...
Ecommerce on Facebook | AWeurope 2017
Ecommerce on Facebook: Deep Diving into the Current Landscape of Products and Strategies Ecommerce, it's the hottest vertical in 2017. Why? The industry's ...
Martin Fowler in Barcelona, by ThoughtWorks
Software Design in the 21st Century =================================== In the last decade or so we've seen a number ..