Set up your first classification model

This article walks you through creating a classification model from scratch, from naming it to measuring its accuracy. If you are not yet sure whether classification is the right model type, read the "What is a classification model?" article first.

Prerequisites

Before you begin, make sure you have:

  • Access to the Models section of the Tekst platform.
  • A clear idea of the categories (labels) you want the model to choose from.
  • A few real example messages in mind that you can use to check the model's behavior.

Step 1: Create the model

  1. Go to the Models section and select Add model.
  2. Choose Classification model as the type.
  3. Select Let's get started.
  4. Enter a Model name and an optional Model description.
  5. Under Analytics, choose whether the model is Tracked or Not tracked in analytics. It starts as Not tracked. If you choose Tracked, select the inboxes to include under Inboxes to include.
  6. Select Create Model.

The Create a classification model form with the Model Name and Model Description fields, the Analytics choice between Tracked and Not tracked with Not tracked selected, and the Back and Create Model buttons

Tekst creates the model and opens its detail page, where you will configure the rest.

Step 2: Add your labels

On the model detail page you will see the label configuration table. This is where you define the categories the model can assign.

  1. Select Add label.
  2. Enter a clear name for the label.
  3. Add a description that explains, in plain language, when this label should apply. Good descriptions make a large difference to accuracy, so be specific.
  4. Repeat for each category you need.

If your categories naturally nest, you can add child labels under a parent label to build a hierarchy.

The label table of a draft model with the Orders label expanded to show New order and Order change, a blue dot next to the new Complaints label, the Monthly volume of each label, and Add label and Improve accuracy at the bottom

Your labels are saved as a draft as you go. A blue Draft badge appears next to the model name, and the changes stay out of live message processing until you publish in step 5. You can close the model and come back to the draft later.

Step 3: Build a test set

A test set is a collection of real messages for which you have confirmed the correct label. It is how Tekst measures the model's accuracy and how the model learns your business.

  1. Add conversations to the test set.
  2. For each one, confirm the correct label (the "ground truth").
  3. Aim for a representative spread across all of your labels, including the ones that occur less often.

Step 4: Review accuracy

Once you have a test set, Tekst evaluates the model and reports its accuracy. Open the model's accuracy view to see how it is performing overall and per label, and to spot which labels need clearer descriptions or more examples.

For a full explanation of how the score is calculated, see the "How classification accuracy is measured" article.

Step 5: Publish the model

Everything you have configured so far lives in a draft. Publishing is what makes it the version that processes live messages.

  1. Check the Draft badge next to the model name. It confirms there are unpublished changes.
  2. Select Publish in the top right of the model header.

The header of the Customer intent model with the Draft badge next to its name, the accuracy reading 90% (Published: 82%), and the Publish button with an amber dot, the revert arrow and the overflow menu on the right

Tekst confirms with Model published. The Draft badge disappears, the status dot on the button turns green, and the button reads Published.

From here on, every change you make goes back into a new draft, so you can keep refining the model without disturbing what is running. To throw a draft away and return to the published version, use the revert arrow next to Publish.

For the full picture, see the "What is a model draft?" article.

What happens next

As your team accepts or corrects the model's predictions, those corrections feed back into the model and improve it over time. Tekst continuously monitors performance and retrains as needed - see How often are the AI models retrained?.

0 comments

Please sign in to leave a comment.