Tensorflow NLU Engine
Last updated
Was this helpful?
Last updated
Was this helpful?
The Tensorflow NLU Engine is a Natural Language Understanding (NLU) solution built using Tensorflow, an end-to-end platform for machine learning. This engine seamlessly integrates with models hosted on HuggingFace, enabling robust and scalable NLU capabilities.
Install the Hexabot CLI running this command
Create your Hexabot project using this Ludwig custom template:
Navigate to your project directory and initialize it using the following commands. You can customize your project configuration in my-chatbot/docker/.env
file:
Kickstart your newly created chatbot by running:
This ensures that Hexabot uses the Tensorflow based NLU engine for processing intents and language detection.
Navigate to “Settings” from the main menu.
Select the “Chatbot” tab.
Ensure that the “Default NLU Helper” is set to "tensorflow-nlu-helper".
Navigate to “Settings” from the main menu
Select the “Tensorflow NLU Engine” tab.
Update NLU Engine Settings:
The Tensorflow NLU engine is already pre-configured to connect with the Tensorflow based NLU API provided in the template. You only need to update the Tensorflow NLU engine's endpoint and API token if you are not using the default setup.
A Confidence Threshold is also available, it’s set by default to 0.1, this value is the minimum probability required for a prediction to be accepted. Be sure to adjust this threshold based on the specific model you are using and your desired balance of precision and recall.
Navigate to the "NLU" from the main menu and then select the "NLU Entities" tab to add some entities and/or intent values. Check the Manage NLU Entities section in the docs for more information on how to add and manage your NLU entities :
Use the NLU training tool to test out some text against the NLU intent you just added and see if predictions are good.
Finally, you can use NLU Entities when configuring triggers in the blocks within the Visual Editor. You can check the Regular Blocks section in the documentation to help understand how to trigger blocks using NLU intents.
While the TensorFlow NLU Engine provides robust capabilities for running inference on TensorFlow-based models deployed on HuggingFace, it comes with certain limitations. The engine is not designed to be extensible, meaning users cannot modify the pre-existing models or customize their internal logic. This lack of flexibility may require careful selection of models to ensure they meet the specific requirements of your application. It is ideal for scenarios where the focus is on leveraging pre-trained models without the need for further adaptation.