Ludwig NLU Engine
Last updated
Last updated
The Ludwig NLU Engine is a robust Natural Language Understanding (NLU) solution built using Ludwig AI, a high-level, declarative machine learning framework. This engine simplifies the process of extracting intents, entities, and other language features by leveraging Ludwig’s intuitive design and powerful machine learning capabilities. It uses models deployed on HuggingFace or your own locally trained models for inference...
Install the Hexabot CLI running this command npm install -g hexabot-cli
Create your own chatbot using the command: hexabot create my-chatbot --template Hexastack/hexabot-template-ludwig
Initialize your project and customize your configuration in my-chatbot/docker/.env file: hexabot init
Kickstart your newly created chatbot running: hexabot dev --services ludwig-nlu,ollama
Navigate to “Settings” from the main menu.
Select the “Chatbot” tab.
Ensure that the “Default NLU Helper” is set to "ludwig-nlu-helper".
This ensures that Hexabot uses the Ludwig based NLU engine for processing intents and language detection.
Navigate to “Settings” from the main menu.
Select the “Ludwig NLU Engine” tab.
Specify the Ludwig NLU engine's endpoint, API token and Probability Threshold. A Probability Threshold is the minimum probability required for a prediction to be accepted.
Step 3: Test the Ludwig NLU Engine
Navigate to the "NLU" from the main menu and then select the "NLU Entities" tab to add some entities and/or intent values.
Use the NLU training form to test out some text and see if predictions are good.
Finally, you can use NLU Entities when configuring triggers in the blocks within the Visual Editor
Performance and Limitations: The Ludwig NLU Engine supports inference using both Hugging Face models and locally trained models. Each prediction logs a confidence score to provide insight into its reliability. To get started, explore the two provided HuggingFace models, which support intent detection and language classification.
Extensibility: The Ludwig NLU engine is designed with extensibility in mind, allowing users to train and leverage their own models independently of Hexabot. By doing so, you can customize the engine to meet specific requirements while still seamlessly integrating it with Hexabot for enhanced functionality. For detailed instructions on training your own models and integrating them with the engine, refer to the README file in the original repository. You may also wish to try this dataset as a starting point for training your custom models. It is uploaded on HuggingFace.