Teneo Developers

Working with Classes and training data

Open the Class Manager

The Class Manager is available in the top ribbon of Teneo Studio, simply click the button to open the window.

Class Manager button

For a quick introduction to the Class Manager window, please see here.

Create Class

The Class Manager allows to add Classes both manually, one-by-one, and through import of a file prepared outside Teneo Studio.

Add Classes manually

To add a Class to the solution, follow the below steps:

  • In the Class Manager window, click Add Class in the top ribbon, the new class will appear in the list of classes in the Class list
  • In the Class details view (right side of the window) give the new Class a name
  • Add training data by entering the text in the Enter Training Data field and then click Add or press Enter
  • Remember to click Save in the Class Manager to conserve the modifications.

Copy/paste training data from an external list by using the keyboard shortcuts (Ctrl+c to copy, Ctrl+v to paste).

The user will be prevented from saving if a new Class is created, but no training data entered.

Import Classes

The Class Manager allows to import several Classes and training data in one simple go from an external file.

To import an external file, follow the below steps:

  • In the Class Manager, click Import Classes
  • Browse to the location of the .tsv file, select it and click Open
  • Remember to click Save in the Class Manager to conserve the modifications.

File requirements

The requirements of the external file are as following:

  • plain text file, saved in the .tsv format
  • each line needs to contain a valid class name separated from the training data example with tab
  • one line per training data example

Plain text file with tab separation

Class name

The requirements for the Class names are:

  • the Class name must be unique
  • the Class name must be upper case
  • the Class name cannot contain:

If no Class name is specified by the user, Teneo Studio will give the Class the name CLASS and, as the user adds more classes add an incremental number in the end, for example: CLASS, CLASS_1, CLASS_2.

Class name as annotation

The Class names are used by the Machine Learning model in Teneo Predict when generating annotations for the Classes with the confidence score for each user input, and the name of the annotation is the Class name provided in Teneo manager.

This means that the Class name is visible in any place where annotations are usually visible, for example in Try Out or scripting, and users are therefore encouraged to give each Class a unique and easily recognizable Class name.

As the Class names are applied within the Teneo Platform as annotations, these can also be used within conditions using the Teneo Linguistic Modelling Language (TLML).

Training data

For optimal performance, users are recommended to provide a minimum of ten unique training data examples per Class, and it is not possible to add two identical examples to a Class. To avoid duplicated training data, the Class Manager will prevent the user from saving changes if two or more training data entries are exactly the same.

To train the machine learning model, more than one Class needs to be added to the solution and on top of this, the Class Manager will display an error if a user tries to save an empty Class (Class without training data).

To runClass Performance (Teneo backstage: Solution > Optimization > Class Performance), each Class in the solution must contain a minimum of 5 training data examples.

Edit Class

To edit an existing Class, simply double-click the Class in the Class list to open the Class details in edit mode. Alternatively, select the Class and click Edit in the top ribbon.

Remember to click Save in the Class Manager to conserve the modifications.

Delete Class

To delete a Class, simply select the Class in the Class list and click Delete in the top ribbon.

The selected Class(es) are marked for deletion until the next Save action is performed in the Class Manager or until the user clicks Apply in the Class details section.

If a Class was marked for deletion by mistake, select the Class again and click Cancel in the Class details section.

Remember to click Save in the Class Manager to perform the actual deletion of the selected Class(es).

Filter Classes and Training Data

In the top ribbon of the Class Manager two text filters are available: one to filter Classes and one to filter training data.

The two filters allows the user to filter entries separately in the Class list and the training data examples. Both filters operate directly over the lists and are kept while the user is working on the Classes, so if a filter is applied on training data, the filter is applied to training data examples of any selected Class in the list. Both filters are case insensitive.

To use either of the filters, simply write the word to filter on in the wanted text filter field in the top ribbon.

Save Classes

New and modified Classes can be saved in two ways:

  • Individually by clicking the Save button in the Class details view, or
  • all at once using the Save button in the top ribbon of the Class Manager.

Note that the following restrictions are bound to the save action of Classes:

  • the Class name cannot contain spaces or reserved characters
  • every Class must contain at least one training data entry
  • Classes cannot contain duplicated training data entries.

The information related to a Class, such as the name, Id and training data, is searchable in the Search tab of the main Teneo Studio window.

The Id of a Class is available at the bottom of the training data in the Class details of the Class Manager when selecting the Class. To copy the Id, simply right-click it and select copy from the context menu.

Class Id

For more information please see Search.

Match Requirements in Triggers and Transitions
Classifier
Class Performance
Machine Learning in Teneo
Reserved characters
Teneo Linguistic Modelling Language (TLML)