SnatchBot Support

Welcome to the SnatchBot Support. You'll find comprehensive guides and documentation to help you start working with SnatchBot as quickly as possible, as well as support if you get stuck. Let's jump right in!

The community forum is not a helpdesk
Let’s put this in the front - the vast majority of people here do not work for SnatchBot.

Get Started    SNATCHBOT API

Create your NLP models

A step-by-step guide

1. Getting started with NLP

Before you can assign NLP decision-making capability to your chatbots, you'll need to create NLP models that you can use to analyse the user's sentences. Each NLP model that you create will be available to all your bots.

Log in to your SnatchBot account and click NLP.

Your first step should be to avail of the Pre-trained models. They are free after all and drawn from enormous datasets that would take you weeks to create if you were starting from scratch. Click on the grey term, 'Pre-trained models'.

Now click the blue, 'GET DEFAULT MODELS', a warning sign will pop up, to check you want to do this, say Confirm. A pop-up menu lets you choose your language. Select your language and GET MODELS.

In just five clicks, you have placed powerful NLP models at your disposal. At this point, if the Pre-trained models have the focus you want (e.g. sentiment analysis or recognition of persons, places, dates, time, money, percentages or miscellaneous nouns) you can skip to the next document, which is all about how to use NLP in your chatbot's conversation.

2. Custom Models

If you want NLP models that focus on Intents or Entities that are not in the pre-trained models, then you'll want to create your own. This is a bit more involved than clicking five buttons, but really, it's not much more difficult. We've done as much as we can for you behind the scenes to allow you to build easily a great NLP model.

Click on + CREATE NEW MODEL and then you'll see a pop-up box with some choices.

Firstly, decide whether you want the model to identify Entities or Intent under NLP TYPE. Note that you can create as many models as you need, so you can build both types in due course.

Choose a training type. If your model is the Intent type, there is only one option for training it, the Bernoulli Naïve Bayes model. This is our choice of algorithm to allow the model to analyze sentences in the light of the samples you have provided.
Intent type requires a great amount of samples to work correctly compared to Entity type and must contain both false and true samples to be able to learn properly from the context. In some cases, we advise you to go with Entity type - List and highlight matching words.

If your model is of the Entity type you can choose between two types of training, List or Conditional Random Field (CRF).

List is the simpler type of training as the model identifies Entities based on the known lists of terms for the same concept.
The CRF type of training is more sophisticated, with the model making an assessment of the likelihood of certain words being linked. The only reason not to choose CRF as your training model is that it requires a lot - hundreds minimum - of samples to become accurate. If you don't have the time or dataset to invest in establishing effective CRF training it might be best to use List.

Give your new model a name. As this is the name that you will see when you are building your bot's conversation and intend to add NLP options, you'll want the name to identify the model's purpose. So for example, you might call it Intent booking, or Intent travel, or Entity car parts, etc.

Pick a language for the model from our drop down menu of over 130 languages.

Add a description of the purpose of the model, then click the blue CREATE button.

At this point, your model is completely in the dark about how to look for the meaning you want, so you need to train it.

Whether it is an Intent model or an Entity model, you need to add Samples.

Having clicked on Samples, you are brought to a new page where you can see your existing Samples and add new ones.

You need to provide three pieces of information here if you are building an Intent model: a text that the model inspects, description (it is optional) and the result. Then click Add sample when you are satisfied with it.

The result of the NLP's examination of the text will be either True or False and you can choose between them with the Intent 'Match' button.

If, for example, you are making an NLP model that detects enthusiasm, you will want to provide text such as: this chatbot is awesome and flag the sentence true (i.e. slide the Intent match slider to the right).

For the same model, you would also mark sentences like, meh and I'm getting fed up with False (i.e. the Intent match slider is to the left).

For Entity models, adding Samples is just as simple. Just create sentences with words that correspond to the Entity you want the model to detect. Having highlighted the keyword in the sentence this word will pop up for you to teach the model by clicking on the '+Add' button

You can add as many key words as appropriate and click Add sample when you are done.

That's it! Except it is time to add another. And another. The more the better! The pre-trained models, for example, utilise tens of thousands of names and locations.

Let's assume you've created a large amount of samples. Now they have to be added to the model. Click on Custom models (top left). You'll see that the Status of the model has changed to training needed.

To train the model in the use of the samples, you need to hook it up to our Application Programming Interface (API) with training settings.

For Intent models, the algorithm has been pre-populated (Bernoulli Naïve Bayes mode) and the only question you need to decide is whether you want the text in your Samples to be case sensitive true or not false.

For Entity type modes, there are two choices, CRF or List.
For List the available settings are: case sensitivity true or false, and match level (0-2).

Match level is responsible for morphological analysis of text.
0: text is divided by words, the match will be found if words are matching competely. For example, "go together" will not be counted as a match for "go to".
1: text is divided into morphemes (roots, affixes etc.)
2: texts are compared by symbols, the combination may be found inside any word.

For English there are two additional parameters available if you choose match level 0:
Train poshtags, if true, the model will be trained taking into account the exact part of speech in context.
Normal form parameter: if true, the algorithm will convert the words into normal form before matching.

For CRF you can configure case sensitivity for all languages.
For English language, there are two additional parameters available:
Part of Speech, if true, the model will be trained taking into account the exact part of speech in context.
Normal form parameter: if true, the algorithm will convert the words into normal form before matching.

You may skip this step, in this case, the default settings will be as follows:

Entity - List
Entity - CRF
Intent - BNB mode

case sensitivity - true
match level - 2

case sensitivity - true

case sensitivity - true

After you press COMPLETE you will see a new button has appeared: Train Model.

Click this button and you will see the Status change to training, this might take some time. When the training is complete, you will see that the status has changed to trained and a 'Test' button has appeared.

Go ahead and Test your model. The Test invites you to enter some text and then gives you the result of the model's analysis.

Crucially, did the model correctly identify (with TRUE) the Entity or Intent of the sentence if the sentence was one that you wanted a positive match for. If you are testing a sentence which should not be recognized by the Intent or Entity of your NLP model, it should return a Status: false message.

If you are not happy with your test results, you will want to create more samples and retrain the model. Once you are satisfied, you are ready to place your NLP model in your chatbot.


Next Steps

Once you've created your NLP models, it's really straightforward to apply them to your chatbot's conversations.

Applying your NLP models to your Chatbot

Create your NLP models


A step-by-step guide

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.