1. Knowledge Base
  2. AI Blocks and Flows

How do I create an AI block?

Step-by-step guide on AI blocks

Creating your custom model is the bread and butter of what we do. Let's take a step-by-step look at all the different options you have.

You have two options on how to get started - either go with a template (a pre-trained model) or create your own AI block, trained on your data. You can naturally weigh the pros and cons - but we'll guide you through the latter option here.

Creating the block

You can start by clicking AI Blocks on the left menu, and then clicking the Create an AI Block button on the right-hand corner of the AI Blocks section:

This will give you the option of the type of model you wish to build. Make your selection by clicking on one of the options.

Congratulations, you've created a block! You will want to rename it so you can identify it easily within your account. By default it will be labeled as Untitled.

rename it

Adding Learning Data

You might have noticed you are launched right into uploading data, and this is because the next step is feeding the model with some data to learn from.

Training an AI model is like teaching a baby new words - with enough examples and repetition, you teach the them how to see the shapes, colors, and patterns that make up the object. Eventually, the brain builds enough of a model to be able to tell the difference between a dog and a cat. 

Click on the Import button, or drag and drop into this upload space. Most common file types should work depending on the type of classifier you are building, for example, you can upload JPGs, PNGs, and TIFF files to the image classifier. 

calico

Once your file is uploaded into the model, it will show a tile of the data, and will allow you to type your label directly on it. In the above example, we're training our model to identify calico cat breeds. 

Tip: At 20 cat images per label, our block was fairly unsure of the difference between a tuxedo and a calico cat breed. At 100 images per label, it was getting over 90% confidence. Adding more data and retraining is a great way to improve the performance of your AI block.

Training

Once you have created more than 2 labels and added more than 20 data points to each label, you can train your model.

You'll see a large button to start training, and once you click it you will see a pop-up to confirm your action. The screen will progress through a preparation screen and an in-progress screen.

This process could take anywhere up to 10 minutes, depending on the amount and type of data you have, and your internet connection. In case you're running into any problems, you can do a quick troubleshooting yourself.

training

Testing & Human review

Once the training is finished, click on the Test item to get a performance score. This is the first indicator of how well your model performs in "real life".

test2

Before you'll set your model up in an automated workflow, you can test it out either by uploading a file from your computer or copying a URL of a file.

You'll get a prediction and the confidence rate - this will give you a good indication of how your model behaves in different situations.

And by the way - Congrats! You now have a working AI block!

You now have a couple of different options here to make sure your model does exactly what you want it to do by: