Decision tree For chatbots
Decision Tree Algorithms for Building Chatbots
A decision tree is a decision support tool that uses a tree-like graph or model
of decisions and their possible consequences, including chance event outcomes, resource costs, and utility. It is one way to display an algorithm that
only contains conditional control statements.
How Does a Decision Tree Help?
Decision trees are simple to write and understand, but they are a powerful representation of the solution made for the problem in question. They inherit a unique capability to help us understand a lot of things.
How Does a Decision Tree Help?
Decision trees are simple to write and understand, but they are a powerful representation of the solution made for the problem in question. They inherit a unique capability to help us understand a lot of things.
- • Help in creating a full picture of the problem at hand. Looking at the decision tree, we can easily understand what’s missing or what needs to be modified.
- Helps debug faster. Decision trees are like a short bible or, say, a visual representation of a software requirement specification document, which can be referred by developers, product managers, or leadership to explain the expected behavior or make any changes if needed.
- AI is still not at that stage that it can be trained with lots of data and perform with 100 percent accuracy. It still requires a lot of handholding by writing business logic and rules. Decision trees help wherever it becomes a little tough to ask a machine to learn and do it.
Let’s take a simple example and try to understand how it helps in building chatbots.
Look at the example diagram for a chatbot that starts with a question of whether the user
is looking for a t-shirt or jeans, and based on the input the diagram flow goes further to
give options related to the product by asking more questions. You don’t need to create a
full-fledged decision tree, but you should definitely have a flow of questions defined at
every step before starting to build chatbots.
Suppose you were building a similar chatbot that helps people buy apparel online.
The first thing you would do is to make a similar decision tree or a flowchart to help your
chatbot ask appropriate questions at the right time. This is really needed to set the scope
of each step and what needs to be done at that stage. You will need the state diagrams
or a simple flowchart later when you actually code your first chatbot. Remember to not
be too stringent while creating a diagram; keep it as simple as possible
and then add the extended functionalities later. The benefit of such a process is the
development time will be cut down, and later on the functionality will be loosely coupled
and would start making sense as components. Like in the example, after creating the
basic functionality, you can add color choices, price range, ratings, and discount options
as well.
Ref Link For Book :- Building Chatbot Using python
Comments
Post a Comment