Skip to content

NL Studio Tutorial


In Bot studio tutorial, we learned how to make keyword-based chatbot to order pizza. However, keyword-based chatbot is not so smart. In this tutorial we will learn how to enhance the chatbot using NL Studio.

Creating a NL Model with NL Studio

Login to Kata | platform

Login to Kata | Platform by entering your username and password.


Click Login to continue

Create Entity Label

After you entered to Kata Platform, click on the project you’ve created


Then, click on NLU on the side bar


Next, click Create Entity. Entity has similar definition with NL Model. It will help us to classify every input from users.


Now, create an entity called intent that with 4 labels: order, askOptions, confirm and cancel. Further explanation about entity is explained in NL Studio Docs


Create Entity Type

In this entity type, we will create an entity with dictionary type (further explanation about entity dictionary type is explained in NL Studio Docs). This entity will handle pizza type selection. Add new entity and fill in the data as follows


Then, continue filling the dictionary by adding other types


Create Entity Size

Entity size is used to handle pizzas size. In this entity, we will use Belongs to feature which binds an entity under another entity (further explanation about belongsTo usage is explained in NL Studio Docs). We will put entity size under entity type.


In dictionary section, enter a keyword as a prediction for input from users


Create Entity Crust

Next, we will create an entity named crust to find out crust type on pizza. We’ll put it under entity type.


Enter the data as follows


Create Entity Qty

In pizza chatbot which we created earlier, user must enter pizza number to purchase using regex (regular expression.)

Entity qty will use dictionary by entering numbers or keywords related to the number of pizzas ordered. Add entity then fill in the form as follows


Then, fill in as below


After you’ve created entities, try to train data using your defined entities.

Training Your Model

To start training, enter Training menu under NLU


Enter a simple phrase like “want pizza” and press “enter” on your keyboard


Then, in this section you can start tagging and classifying text. Click on Add Trait, then select intent: order.


Click Train to submit your dataset.


Then, add a few more sentences to train more data. You can follow this


In our next example, we will do partial tagging by entering text and doing text selection on the word we want to tag. The process of selecting text can be done by blocking one or more words at a time using a cursor.

You can follow the example in this following picture. On the sentence “how much american all star”, select only on the word “American all star”


Then, select entity type to classify


You can also enter a phrase “I want American all star pizza, two and bbq hand tossed one” and tag it like this


You may see a number beside an entity. That number represents how accurate an entity identifies a phrase (highest is 1.0)

Try to tag more sentences.


Next, we will define parent entity using BelongsTo. Click on BelongsTo dropdown on small phrase, then select “Pepperoni”. Final result looks like this


Testing NLU in Prediction Console

Use Test NLU to test a dataset.


Enter a word such as “i want two aas” (read: aas means American All Star). You can see the prediction result as you can see in this image


Adjusting the Dataset

When performing NLU prediction in Test NLU, sometimes the prediction result is wrong, incomplete, or still has a low confidence score.


For example, the sentence above should be tagged as intent:order. However, prediction result has no prediction to order. To improve or fix a prediction, enter Log menu.

Enter Log Menu

Go to Log menu under NLU


On this page, you will see previous dataset when you have predicted on Test NLU.

Fix The Prediction

We will adjust the dataset. Click on pencil icon (which placed in left icon)


Then, select intent:order.


Click train to revise the prediction. Trained data will be seen as follow.


You will receive a notification after you click “Train”

Test NLU with data that has been fixed

We will try to predict another dataset and see if the result has been improved. Click Test NLU and enter a phrase “hi, do you sell aas”.


Congratulations, now you have learned how to train entity in NL Studio.

Contributing to the Documentation

Is something missing/incorrect? Please let us know by contacting If you know how to fix it straight away, don’t hesitate to create a pull request on this documentation’s GitHub repository.