{{announcement.body}}
{{announcement.title}}

Modifying Your Virtual Assistant to Use Custom Entities – Here’s How You Do It in Teneo

DZone 's Guide to

Modifying Your Virtual Assistant to Use Custom Entities – Here’s How You Do It in Teneo

Learn how you can modifying your virtual assistant and make it fit your business needs in Teneo Studio.

· AI Zone ·
Free Resource

Virtual assistants and chatbots are great tools for improving customer service in any company. However, to be able to become a great customer service agent there is some work to do to make it fit your business needs.

Businesses today have their own way of naming things and the same way you would need to train any co-worker on the business vocabulary, you need to train the virtual assistant. That is when customization starts.

Teneo comes with a collection of pre-built Entities that you may use in your flows. If your business has certain sets of entities that you need your conversational AI assistant to know, you can customize these in Teneo Studio. For example, this is the case for coffee sizes and different kinds of coffee types that are served at Longberry Baristas. We will in the following walk you through the creation of these two.

Create a ‘Language Objects’ folder

Before we create our entities, it might be a good idea to create a folder that we can use to store them. This is not required, but as a solution grows, folders help to structure your Teneo assets. To create the folder, proceed as follows:

  1. Make sure none of the folders on the left are selected, by clicking on the white area below the folders in the ‘Explore’ section.
  2. Click the ‘Folder’ icon in the ‘New’ group in the Ribbon.
  3. Give your folder a name, for example Language Objects and hit Enter.

Coffee Sizes

Let’s create the entity for coffee sizes. In Teneo, an entity can either contain words, phrases or language objects. For simplicity, we start with words here. Moreover, we add a variable called size which can be used to map different names of the same size to the same internal representation. For example, both “medium” and “regular” will result in a “medium” sized coffee at Longberry Baristas.

This is how we go about:

  1. In your main solution window, select the ‘Language Objects’ folder and click ‘Entity’ in the ‘New’ section of the Ribbon. This will create a new entity in the selected folder.
  2. Call the entity COFFEE_SIZES (the type .ENTITY is automatically defined).
  3. Use the left arrow on the top to get to the HOME tab of the entity.
  4. Copy the following table onto the clipboard:
Coffee size coffeeSize
small small
medium medium
regular medium
large large
big large
supersize large
  1. In the Home window of the Entity, select the field Click here to add a new entry.
  2. While the Entity field is marked, use ctrl+V to paste the table into the Entity.
  3. You will now be asked whether the first row of the table you are about to paste contains variable names or belongs to the data set. Select ‘First row is variable names’.
  4. Hit ‘Save’ and close the entity window.

Coffees Served

Now that we have the coffee sizes in place, it is time to add an entity to recognize the different kinds of coffees that are served at Longberry Baristas. In addition to words, this entity will also contain phrases and language objects. The usage of language objects ensures a broader coverage with respect to plural forms, declinations and synonyms of the words. For example, %AMERICANO.NN.LEX will not only recognize “Americano”, but also the plural form “Americanos”.

Let’s go ahead an create the entity:

  1. In your main solution window, go to the ‘New’ section of the top ribbon an select ‘Entity’. This will create a new entity.
  2. Call the entity COFFEES_SERVED (the type .ENTITY is automatically defined).
  3. Use the left arrow on the top to get to the HOME tab of the entity.
  4. Copy the following table onto the clipboard:
Coffee name coffeeType
%AMERICANO.NN.LEX americano
%CAPPUCCINO.NN.LEX cappuccino
%CORTADO.NN.LEX cortado
%ESPRESSO.NN.LEX espresso
%FRAPPUCCINO.NN.LEX frappuccino
%LATTE.NN.LEX latte
%LUNGO.NN.LEX lungo
%MACCHIATO.NN.LEX macchiato
%RISTRETTO.NN.LEX ristretto
flat white flat white
flat whites flat white
brewed coffee brewed coffee
brewed coffees brewed coffee
filtered coffee brewed coffee
filtered coffees brewed coffee

Note that filter coffee and brewed coffee are considered synonyms and both should return the type ‘brewed coffee’.

  1. In the Home window of the Entity mark the field Click here to add a new entry.
  2. While the Entity field is marked, use ctrl+V to paste the table into the Entity.
  3. You will now be asked whether the first row of the table you are about to paste contains variable names or belongs to the data. Select ‘First row is variable names’
  4. Hit ‘Save’ and close the entity window.


Topics:
artificial intelligence, chatbot, chatbot development, conversational ai, conversational ai chatbot

Published at DZone with permission of Gareth Walters . See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}