Testes
Previous versions
Previous versions
  • 3.3.1
    • User Manual
  • 3.3.0
    • User Manual
  • 3.2.4
    • User Manual
      • Glossary
      • Accessing eva
      • Introduction
      • Creating a virtual agent
      • User Management
      • Channel Management
      • Developing a virtual agent
      • Automated Tests
      • Dashboard
      • Appendices
    • Development Manual
      • Base Architecture
      • Conversation context
      • Creating channels – The Conversation API
      • Webhooks
      • Data extraction
      • Distributed Tracing
      • Appendices
    • Virtual agent Migration Guide
    • eva Installation in Azure Cloud
Powered by GitBook
On this page
  • Dialog Manager
  • Intent and answer pairing
  • Cells
  • Workspace
  • Flows
  • Jump
  • Intents
  • Bulk training
  • Building an intent file
  • Building an examples/utterances file
  • Uploading to eva
  • Entities
  • Pattern entities
  • Synonym entities
  • Answers
  • Answer types
  • Simple answers
  • Transactional answer
  • Not expected answer
  • FAQ Answer
  • Answers by channel
  • Templates
  • web/app/mobile
  • Default text answer
  • Adding buttons or options to an answer
  • Text answer
  • Image answer
  • Carousel
  • Audio
  • Video
  • File
  • Custom answers
  • Services
  • Service options
  • Input
  • Clever training
  • Load intents from NLP
  • Using entities from the NLP
  • Bot Simulator
  1. 3.2.4
  2. User Manual

Developing a virtual agent

PreviousChannel ManagementNextAutomated Tests

Last updated 3 years ago

In eva, you build virtual agents by creating dialogs, represented as flows. Those flows represent the interaction between a user and a virtual agent. They are strings of questions and answers and each line in the dialog is represented by a cell. Those cells can be a user input ( or ), a virtual agent’s response () or a call to an external system (). To ensure that your virtual agent behaves as intended, you have to it. This will make sure that your virtual agent answers the intents properly.

In this chapter, you will learn how to build the contents of a virtual agent. This includes the characteristics of a flow, its components, cell types and training.

Dialog Manager

The Dialog Manager is where you will build your virtual agent knowledge base. It allows you to build flows by organizing and connecting different cells.

The Dialog Manager has 6 (six) main sections: Workspace, Flows, Intents, Entities, Services, Answers and, if you are using Clever, Training. The Workspace is where you will build your virtual agent knowledge base. Here, you will create cells and string them together to form flows. The training section is where the NLP will process intents and extract entities. The sections flows, intents, entities, answers and services are repositories where eva stores all the created and imported components.

Empty flow repository

Example of a flow

After training, the flow above becomes a dialog. In this case, the virtual agent offers to play songs. The user just have to choose what he wants to listen. When a user asks the virtual agent above wants to listen some music, the NLP identifies the intent song_1 and runs the flow above. The conversation below is what the flow above looks like when interacting with a person.

The conversation from the flow above

Intent and answer pairing

Intents and answers doesn’t have to be connected directly to function as a flow. If an intent and an answer have the same name, they will be paired. This means that even if they are not directly connected, the intent will look for the answer with the same name.

Intent and answer with the same name

Cells

The most basic element of every flow is the cell. Each of them represent a functionality and, when strung together, they form a flow.

An intent cell

Each cell has an upper menu comprised of:

  • Add cell

  • Edit Cell

  • Remove Cell

Every cell has a function. They can be an intent (the user input), an answer (the virtual agent speech), an entity (a selection of categories), a welcome message (the virtual agent welcoming the user), a service (a connection to an external API), an input (a pause in the flow) and a not expected answer (something that appears when the input is nonsensical).

Cells falls in two categories: validation and execution. Validation cells are those that receives and process what the user says. Execution cells use those processed data to keep the flow going.

Intents and entities are validation cells. Input, services and answers are execution cells.

You can classify any cell using tags. Those tags are useful when searching cells afterwards.

You choose a cell type the moment you create it.

Workspace

When you click a virtual agent, you are taken to the Dialog Manager. Here, you will have the option to create a flow. The canvas that you will use to create your flows is called “workspace”.

Workspace

Here are all the tools you will need to build conversational flows.

The Dialog Manager menu has links to the workspace and flows, intents, services, answers and trainings respective repositories.

First step of a flow creation

When building a flow, you can zoom in and out and move it freely to see different components.

Flows

A flow is the simplest structure in a virtual agent. It behaves like a human dialog: a question showing the speaker intention followed by an answer that leads to a new question that leads to a new answer.

eva does that. When a user talks to a virtual agent, eva sends the user's sentence to the NLP. The NLP looks for an intent that matches the user message by processing it and comparing to previously loaded examples in each intent. If the NLP matches the message to an intent, it will send it to eva to match the intent to an answer. If there is an answer with the same name as the intent, eva delivers that answer. If not, eva looks for a flow that begins with that intent. If no flows are found or if the NLP cannot match the message to an intent, a not expected flow is executed so the user can be directed to an answer or flow.

To create a flow, add a cell clicking the plus icon (+)

Plus button

You can start a flow with an intent (the user input), a welcome message or a not expected answer.

Each one of those cells start a different type of flow:

  • A welcome flow works as a greeting to the user. It is the first thing a user sees when interacting with a virtual agent.

  • A user journey flow, which is the dialog per se, built with all the conversational tools that eva offers.

  • The not expected flow is executed when the virtual agent cannot identify what the user is saying.

  • Flows with only an intent and an answer can be created as FAQs (Frequently Asked Questions), explained in the chapter Flows.

Important: virtual agents must have welcome message and not expected microflows to function properly.

If you want, you can reuse an intent as the first step of a flow, as long it does not start another flow.

Creation of the first cell

Intent creation

First cell of a flow

When you click the plus button, a modal opens showing cell types you can add to your flow. You cannot add an intent after other intent. You can, however, insert an answer, an entity or a service. eva knows that and only shows you the possible options when you click to add a cell.

Creation of the second cell

After the answer, an intent was created. Alongside the intent, an option to insert a not expected answer automatically appears. If the user responds to the virtual agent message in a way that doesn’t fit the intent that follows, this message is delivered to him.

After the second intent, comes a second answer and so on.

Important: every flow must end with an answer. If a flow ends with a jump to another flow, the other flow must end with an answer.

Example of a Flow

Any created flow is stored in the flow repository. Here you can access any flow that is part of a virtual agent. You can find relevant information such as the quantity of cells of any given flow, who last edited it and when.

Flow repository

You can access any created flow by clicking on the eye icon.

Any flow can be edited (by clicking on the pencil) and deleted (by clicking on the trash can).

Important: Deleting a flow is an irreversible action.

When building a flow, view it as a funnel. Always go from the broad to the specific. The order of the factors can alter the way your virtual agent behaves significantly. An entity for soup flavor might hinder a flow if it comes before an entity for food in general.

Jump

You don’t have to follow the flow direction all the time. The jump function allows you to go from the last created cell to any other cell in a flow and continue from there. In practice, you allow your user to go to other places in a flow not in the vicinity of each other.

Jump cell selection

After clicking the jump icon, just choose the cell you want to jump to.

Jump cell confirmation

After you choose the cell you want to jump to, you will have to confirm it.

Finished jumo

When you jump, the flow continues on the cells that comes after the destination. You cannot jump to a non-existent cell or create a jump children cell. You have to create the cell you want to jump before the jump, and not after.

Intents

A conversation always starts with a person saying something that has to be interpreted by someone else. A simple “hi” has to be decoded to know what it means. An intent is a person saying something that has to be decoded by a virtual agent. Every flow starts with an intent, something said by a person.

Empty intent repository

If you choose to create an intent, this modal will open after you click:

“create intent”.

You have to name it and, if you wish, describe it. Then, you have to write down examples/utterances. Those are phrases that a user might employ to express an intention. They do not have to be literal, as the NLP can detect deviances.

Therefore, the example/utterance “I want soup” will have the same effect of “Bring me soup”. Both of them will make the NLP go to the intent “order_soup”.

Create intent

Important: Intents cannot share a name.

The intents you create are stored in your virtual agent intent repository. There, you can edit or delete any intent you want. You can modify tags, names, examples/utterances, etc.

You can categorize your intents using up to five tags to find intents more easily.

Important: Deleting an intent is an irreversible action and may have undesired consequences on flows that uses the intent, deleting the cell and removing its children.

​

Intent List

There are some best practices when building intents:

  • Ideally, your intents should have at least 50 examples. Intents with fewer examples might have trouble to understand the user or lead the NLP to the wrong intent.

  • Avoid similar examples in different intents. This might confuse the virtual agent when choosing an intent.

  • Avoid a large disparity of examples between intents. A balanced knowledge base make your virtual agent more accurate.

  • Not only check what your user says, but how your user says.

People talk differently between channels. Pay attention to regional patterns, slang, social groups and writing proficiency.

Bulk training

You might have a lot of intents or examples/utterances. To save the work of registering each one individually, eva allows you to upload those intents and examples/utterances in one file.

The upload of a file containing a massive number of intents or examples/utterances is called Bulk Training and there are two types: the massive import of intents with utterances or only the utterances of one intent. They are basically the same, the main difference being that the bulk training of examples/utterances is the import of more than one phrase that might be used by a user to a specific intent that you have in the repository. The bulk training of intents is the import of more than one intent with utterances attached.

To import more than one utterance or intent, first you have to make sure that they are written following certain standards.

Important: You can write only one example/utterance per line.

Building an intent file

You have to write intents without diacritics. Your intent can be just order or, but it must be a verb.

In a CSV (Comma Separated Values) file with intents and utterances, the latter can be written using any character apart from the comma (,). You can write an example utterance with a comma (,) as long as it is between quotation marks (“”). This is because commas are used to separate examples/utterances and intents. Your intent can be {I want pizza,order_pizza} or {“a pizza, please”,order_pizza}.

Important: You can write only one example/utterance per line.

If your intent has more than one example/utterance, you have to write each one, followed by the intent, like the model below:

Example/utterance1,intent1 Example/utterance2, intent1

Check the template below:

Building an examples/utterances file

You have to follow far fewer rules to build an examples/utterances file. Just write down any phrase, without character restrictions. But it is important not to insert duplicated examples/utterances and put each one in a line.

Uploading to eva

Now that you organized them in a file, upload it to eva. Go to the intent repository. If you want to import intents, click on the “import” button bellow the “create intent” button.

Import intents button

If you want to import examples/utterances, go to the intent you want to add the examples/utterances and click on the “Import examples/utterances” button below the “Description” field.

Import examples/utterances button

Both will open a modal where you can select which file you want to import.

Import intents modal

After that, if your file is valid, click on “continue. A progress bar will appear on the lower corner of the screen.

Progress bar

After your file is imported, this progress bar becomes a button so you can check details about your file.

Entities

Everything has unique features. Entity cells allow your bot to delve deeper in a conversation by giving intents and answers lists of characteristics. If you insert an entity cell after an answer, you will allow your bot to explore better your user desires. If you put an entity cell after an intent, you allow your user to show your bot what does he wants more accurately.

You have two kinds of entities: system entities and custom entities. System entities are those feature lists that comes with some

NLPs. These entities can only be enabled or disabled. Custom entities are those that you can create, edit and delete. In eva, you can create entities if you are using Clever.

Entities repository

This is the entities repository. Here you can find your custom entities in a tab and system entities in another.

To create an entity, first click “create entity”, then name it and select its category:

Create entity modal

After you create an entity, you can assign one or more values to it in a flow. This is useful when you are creating options to branch a flow.

Instead of creating a lot of entities, you create one entity and add it repeatedly in the same validation level, selecting different values to each cell.

Value selection

Custom entities from Clever can be divided in two categories: patterns and synonyms.

Pattern entity

Pattern entities

To create a pattern entity, you need technical knowledge, as you have to create a RegEx, or regular expression. Those are sequences of characters that define a search pattern.

The first part, ^[A-Z0-9._%+-], looks for characters from A to Z and 0 to 9, followed by a @ and then by [A-Z0-9.-]+\, representing characters

from A to Z and 0 to 9. This is followed by a dot (.) and [A-Z]{2,}$, representing characters from A to Z. This allows eva to look for patterns that are similar to each other.

To avoid entities that overwrites each other, use one RegEx by entity and do not repeat the same pattern in two entities. You can use a pattern entity more than once in a flow. Also, be careful to choose patterns that points to different universes.

Important: eva blocks the same expression in two different

entities, but similar expressions can overwrite each other. Example:

Check the following Regular Expressions:

.+ - (any character 1 or more times)

\d+ - (any number 1 or more times)

\d{3} - (any number of 3 digits)

The sequence 123456 suits the three different regular expressions, making the three overwrite each other.

Venn diagram showing RegEx overlapping

Synonym entity

Synonym entities

Synonym entities recognizes semantically close words in a category. So, for a given category, like “color”, you can specify color types as values, such as “blue”, “green” or “yellow” and, for each one of those, you can add synonym, like:

Blue: aqua, navy.

Yellow: jaune, amber, gold.

To build synonym entities, create a value, such as “blue” and add synonyms: blue, aqua, navy, aquamarine, etc. Synonyms are added like tags, by hitting enter.

Remember to insert the value name as one of the synonyms. The blue entity must have “blue” besides “navy” and “aqua” as synonyms.

Important: entities cannot share names.

Pay attention to value names and their synonyms. Different entities with similar values might overwrite each other. The same happens with entities containing similar synonyms for different values. An entity with values too similar to each other (a value to “blue” and another one to “aqua”) will not work properly as the cognitive engine will not know which value to use.

There are some best practices when building entities:

  • When building a synonym entity, pay attention to how a user use synonyms to refer to something. Example: “cold tomato soup”, “gazpacho”, “salmorejo” and “gaspacho”.

  • Instead of creating multiple intents referring to similar actions, such as order_pizza and order_soda, create a single intent, such as order, and an entity to refer to these objects, such as “soda” or “pizza”.‘

Answers

Human speech is, in its simplest form, a two-way exchange of questions and answers. The “question and answer” configuration that it is true to a conversation between humans is replicated by eva. An answer is, in its simplest form, a speech from a bot in response to an input from a human.

Your bot, like any person, will show its personality through its speech. When building your answers, you will have two instances to show your bot traits: the answer content and form.

When you bot answers a person, the form that the message is delivered says a lot.

Like a doctor telling someone the result of a test, you will have to know how to say a message depending on the user, channel and moment.

The same message “Your package is on the way” has a very different meaning if the person has ordered a pizza, a toy or allergy injections. Someone waiting for a pizza might be hungry, but can wait. The person who ordered the toy might be wishful. The person who ordered the allergy shots will probably be desperate.

The sentence “your package is on the way” might be read like this:

“Be patient and soon you will be satisfied. Do you want some soda with your pizza?” to the person who ordered pizza.

“The toy you bought is very nice. Are you interested in action figures?” to the person who ordered a toy.

“Call 911. You need medical attention.” to the person who ordered allergy shots.

The channels you choose says a lot too. A WhatsApp channel might be suited to a light-hearted conversation or a contest, but might not be the smartest choice to communicate frauds.

Even after thinking about technical matters when choosing templates, you must consider that the answer format choice sends a message. A video answer might not be the better choice for a tech support bot. The user is probably angry and want immediate answers.

If your bot has no answers, you can create one.

Empty answer repository

You will see this modal when clicking “create answer”.

Create answer

First, name your answer. Then, you can describe it and add up to 5 (five) tags.

Important: answers cannot share names.

You can make your answer evaluable. This means the answer will have a thumbs up/thumbs down evaluation, for the user to like/dislike it.

Evaluable answer

Those answers are stored in a repository so that they can be edited and deleted, as explained below.

Important: Deleting an answer is an irreversible action.

Answer repository

Answer types

Not all answers are created equal. Some intents can be answered by the bot knowledge base. Others needs external research. Others still are a simple communication test, like a “hello” on the phone. Answers in eva falls into five categories: simple, transactional, frequently asked questions (FAQ), welcome and not expected.

A simple answer is something that an editor will add directly in the bot knowledge base to respond an intent. Transactional answers are more complex, as they depend on an external database to search for information before answering the user. Not Expected answers are how a bot reacts to a question it does not understand. Frequently Asked Questions (FAQ) are answers that are tied to a specific intent.

Simple answers

A simple answer is straightforward. A user asks something and the bot answers based on its knowledge base. Here is an example of a simple answer.

To create one, just click “create answer”, the possible contents for an answer will be explained later on in this chapter.

Simple answer

Transactional answer

A transactional answer depends on external sources. Your bot will have to look elsewhere to answer your user and you have to show where.

When you turn on this option, you will have to insert a webhook. This is an external API called by eva that must be created following the rules in the development manual. The Header and Value fields can be left blank or a developer can insert a customized header and value.

Important: A webhook is an integration agreement between two platforms. It is a URL.

Transactional answers need webhooks

After you insert a webhook and click on next, you are taken to a regular answer creation modal, but with the added option to edit the error message that eva delivers automatically. Sometimes those integrations don’t work and eva delivers an error message to the user automatically. You can edit this message by clicking on “add error message”.

Not expected answer

Not expected answers are delivered when the user says something that a particular flow wasn’t expecting. Technically speaking, the not expected answer is how eva responds when it cannot link what a user is saying to an intent or when a user answer something that eva wasn’t expecting.

When you are building a flow, Not Expected cells are added automatically by the system on the same level of validation cells. You cannot add not expected answers by yourself, but you can edit them as regular answers. This means that you can build transactional answers and apply templates.

Not expected answer

When you edit your not expected answers, you can guide your user better through the flow. You can build not expected answers that leads your user back to the previous answer and correct his path.

For example, if the previous answer dealt with tomato soup, pea soup and pizza and your user answered “airplane”, if the not expected answer is built like “I didn’t understand you. Do you want pea soup, tomato soup or pizza” might lead to one of these responses.

Not expected answers are stored in the answer repository.

FAQ Answer

eva also allows you to build answers that are independent of flows. Those are the Frequently Asked Questions (FAQ) answers. They are tied to a specific intent and are independent of flows.

To build a FAQ answer, create an intent and an answer and give them the same name. When eva recognizes the intent, it will search for the answer with the same name and give it to the user.

Paired intent and answer

Answers by channel

A person will talk differently as the surroundings change. A playful pub banter gives way to a formal conversation in the office, even when the same people are involved. A bot face the same challenge. Different channels means different users. Your answers must not only answer your users and be compatible with the chosen channels specs, but its tone must fit the channels. A gif might be adequate to a conversation with a teenager about skateboarding on Facebook messenger, but it might be offensive to a senior citizen that was victim of fraud trying to solve his problem in a proprietary chat.

The channel selection will affect directly what your bot delivers to your users. You can create an answer that works in multiple channels. eva offer some templates so you can build answers according to some models. If you want, you can build your answer template and insert as a JSON in the custom option. Its template, aesthetics and functionalities will have to respect all the selected channels rules.

Most templates allow quick reply, buttons that elicit a user response. Some templates allow buttons so you have the option to keep the user in the flow or redirect him to an external URL.

These templates also allows a technical text, a code snippet that you can add to complement an answer. The technical text is a code that you add to you to program events in a channel. It allows you to insert specific elements to your answer. For example, if you want a calendar so your user can pick a date, you can add it using a JSON.

The standard channel selection is “ALL”. It is the default text template (check Default Text Answer below) that works on all channels. This answer is delivered if there isn’t a specific channel tied to an answer. If you assigned a specific channel to an answer, eva will deliver that answer in the channel assigned. If that fails, eva will deliver the generic answer.

There are some best practices when creating answer:

  • Always build answers that works in all channels as fallbacks to channel-specific answers.

  • Pay extreme attention to which channel you are building your answer. Not only channels have different specifications but also users behave differently in each channel. A user might be one person in a proprietary chat and another very different person in WhatsApp.

The templates you choose are part of your bot personality, so pay attention to who your bot is talking to when choosing how you will build your answers.

Templates

The templates you use will depend on the channels you selected for your bot. Some channels support a diverse array of options to build your answers, others are very limited. While Facebook Messenger allows you to build answers using text, images, audio, video and files, using buttons, quick replies and a host of options, WhatsApp only allows you to use text. You will have to study thoroughly the channels you chose to build your answers, even (and specially) with custom templates.

web/app/mobile

Template dropdown

The web/app/mobile option offer a diverse array of templates. Depending on which one you choose, you can attach images, audio, video or files.

Default text answer

Text answer modal

The text answer is the standard answer. It is the default template and works for all channels (even the ones that doesn’t support templates). It is a 640 characters text that can be accompanied options, that works as buttons but are rendered as text. Just type your answer and, if you wish, add options. You can add as many options as you want, as long they respect the character limit.

Adding buttons or options to an answer

To add buttons, options or quick replies to an answer, click on “Add button”, “add option” or “add quick reply” below the text box. After you click it a field will appear so you can insert a call to action (what will appear to the user, such as “tomato soup” or “pea soup”). After that, a field will appear below so you can insert a value for this button.

This value can be an intent example, a synonym entity value or an expression predicted by a pattern entity

For example, you can name a button “order tomato soup” and insert “tomatosoup” as a value, and then add an intent with an example named “tomatosoup”. You can also add an entity with “tomatosoup” as a value.

After you insert this value, you will have to add a cell for each button, option or quick reply.

There is a limit of 3 (three) buttons so the card doesn't exceed the chat window height. This limit doesn’t exist for quick replies.

In some templates, if you add buttons, two options will appear to you: direct to URL and continue on flow.

  • If you click on “direct to URL”, a field will appear so you can insert a URL. When a user click a button, eva will direct him to any URL inserted here.

The URL field

  • If you click on “continue on flow”, a field will appear so you can insert a value name. This value has to be tied to an intent or entity.

The Button Value f ield

Button to intent

To tie a button to an intent, after you build an answer with buttons, create one intent for each button and add them to the same validation level.

Example: for an answer with tomato soup, pea soup and garlic soup as options, you will have to create separate intents for tomato, pea and garlic soup.

Answer buttons

Each of those intents must have at least an example written exactly like the button. The button “tomato soup” is tied to the intent “tomato_soup”, that must have the example “tomato soup”.

Intent tied to a button

The flow will branch accordingly.

Intents tied to buttons

Button to entity

To tie a button to an entity, after you build an answer with buttons, create an entity where each button is a value. Then, add the same entity repeatedly, in the same validation level, but select only one value per button.

Example: for an answer with tomato soup, pea soup and garlic soup as options, you will have to create a synonym entity with values and synonyms for tomato, garlic and pea soup. Then, add the same entity repeatedly in the same validation level, but with different values selected.

Entity with values tied to buttons

The flow will branch accordingly.

Entity with different values selected

You can also create a button using a value from a pattern entity. To do so, insert in the value field something predicted by the RegEx in the pattern entity that will come later in the flow.

Text answer

There is another text template that appears when you specify a channel. Depending on the chosen channel, you can add buttons by enabling the quick reply option. You can also insert a technical text if the selected channel supports it.

Image answer

Answer with image modal

You can create answers with just images. Just insert the image URL. Supported formats: JPG, PNG, GIF.

You can add buttons by enabling the quick reply option. You can also insert a technical text if the selected channel supports it.

Carousel

Carousel answer modal

You can create a sequence of up to 11 cards with an image, title, subtitle and buttons.

This template is very useful if you want to present more than one option to your user. You can show 11 possibilities in one answer. A practical example is a bot that sells tickets to a game. You can show in a single answer various categories of seats. It saves time for you, that doesn’t have to build up to 11 intents, and for the user, that doesn’t have to ask 11 times.

You can add buttons by enabling the quick reply option. You can also insert a technical text, a code snippet that complement an answer.

Audio

Answer with audio modal

You can create an audio answer. Just insert the audio URL on the required field. Supported formats: MP3, WAV, OGG

You can add buttons by enabling the quick reply option. You can also insert a technical text, a code snippet that complement an answer.

Video

Answer with video modal

You can create a video answer. Just insert the video URL on the required field. Supported formats: MP4.

You can add buttons by enabling the quick reply option. You can also insert a technical text, a code snippet that complement an answer.

File

Answer with f ile modal

You can create an answer that is just a downloadable file. Just insert the file URL on the required field. You can name your document.

You can add buttons by enabling the quick reply option. You can also insert a technical text, a code snippet that complement an answer.

Custom answers

Custom answer modal

If you have a JSON or XML file, you can create a custom template. It is important that the developers of your channel understand how this custom template is created for them to show other types of answers for the user.

Before adding a custom template, study the channels you are using and check if it is supported.

Services

Sometimes you have to look for information outside your knowledge base. To do so, you use a service cell. When you insert a service cell, you are redirecting users to different points in a flow based on options you have created. Services are always connected to an external API through a webhook.

When you create a service cell, you redirect users based on their position on an external database. A good example is sorting users that are registered as clients from users that are not and might be considered prospects.

The first step of a service cell

They are automatically saved in the repository when you create them.

To create a service cell, talk to your development team in advance to define what outcomes you are expecting. For example, if you are creating a flow for when the user asks for his balance, you might want to check if he is a client first, so an agreement with the development team could be “create a service that give me the options CLIENT or NOT_CLIENT”. These options will then be used to create the flow, as seen below in the service options section.

After you click “create service”, this modal opens. You have to name it and insert a webhook, which is an URL that points to an external API following the rules explained in the development manual. The Header and Value fields can be left blank or a developer can insert a customized header and value. You can describe it and add up to 5 (five) tags. After that, you can add options. Any created service will be

sent to the repository. There, it can be edited or deleted (this actions may have consequences on flows that uses them).

It is important that services don’t share names.

Create service modal

Service options

After you point where your service cell will look for information, you have to set where your flow will go. To do so, you have to create options based on what the API will deliver to your bot. Those options will define where the flow will go. So, after every option, you have to add an answer. They are not buttons, but conditions that have to be met and that allow to disambiguate the flow.

External services might not work. Expecting those occurrences, eva creates a service error option automatically. As service errors are treated by eva like any other service option, you can add answers after it.

Service cell with options and service error

Input

In eva, there are two cells that interrupts the flow to wait an input from the user: intents and input cells. The intent is a general sentence that will be interpreted by the NLP. The input cell just stops the flow so the user can insert a very specific information that will be interpreted later by an entity.

This information is user-specific and it might be a birth date, a ZIP code or a token.

Create input modal

There are three templates:

Date template

Date - the user insert a specific date, ex January 3. This template activates a calendar where the user can select a date.

Time template

Time - the user insert a specific time, ex 3:15 pm. This template activates a clock where the user can select a time slot.

Custom template

Custom - you define, using a specific pattern, the input structure. This is useful for country-specific information, such as id numbers

.

Remember input switch

The switch “remember input” will save the information the user inserted for later use in the same session. This information will be stored for the duration of the interaction between user and bot.

You can use those templates at the web/app/mobile channels, as they are the only ones that accept them.

You can add a call to action describing what information your user have to insert.

Example:

Insert your zip code.

Input cells aren’t saved in a repository, so you must create them every time you must use them. You can’t name them, but you can describe them if you want to signal them to others.

Clever training

If you are using NTT DATA Clever, you will have to train your intents and entities. When an intent or entity is changed in a flow, the button “Train” will appear at the training section. Just click it. When you alter something in an intent or entity cell, the bot becomes trainable again.

Train button

To train a bot, you have to go to the training repository.

Training repository

To train a flow in Clever, you must have at least five (5) intents with at least five (5) examples each. A bot will not be trainable if it has any intents with less than five (5) examples. If you delete an intent or example/utterance in the repository, the training will be invalid. Entities doesn’t have minimum values.

All trained versions (valid and invalid) are kept in the training repository. The latest trained version will be automatically published.

Important: You can publish only one version at a time.

Load intents from NLP

You can store intents from the NLP you are using and build flows in eva.

Load intents

When you click on "load", eva download all intents saved in the NLP you are using and store them in the repository. All the loaded versions are shown in a separate screen.

Last loaded intents

Those intents can be found in the intents repository. To use them, build a flow and, when selecting the “intent” option, search in the repository the intent you want to use.

Intent repository

Remember that you can’t alter those intents. You can only edit their description and tags.

Edit intent modal

To change something, such as adding examples/utterances, you have to go back to the NLP and edit your intent there.

After finishing, you have to go back to the NLP and train your flow.

If you rename any intent in the NLP, eva will load it as a new intent. The one with the old name will disappear from the flow along the cells in sequence.

Using entities from the NLP

Use entity from the NLP

When you integrate a NLP that is not Clever, the entity database that you built there is synchronized with eva. This means that you can keep building your flows with entities that you have made in the NLP.

Using a Watson entity

To use a NLP entity, you have to insert its name exactly as it is written in the NLP. If you are using system entities, you can find their correct names in the NLP documentation.

Example: if the entity is saved as @tomato_soup 151451 in the NLP, to use it in eva you have to write it down in the modal (even the double underline and numbers).

If you want to use a specific value, you have to insert its name exactly as it is written in the NLP.

Example: as with the entities, if the value is saved as “gaspacho”, you will have to write it down in the modal as “gaspacho”, not “gazpacho”.

You can use those entities in your flow, and edit their values, names, description and tags.

It is not recommended to change an NLP entity name or values because it can affect the synchronization.

After finishing, you have to go back to the NLP and train your flow.

Bot Simulator

After you train your intents in Clever (or use the ones from other NLPs), you can see how your dialogs will work in a simulated chat. The bot simulator allows you to test your bot by checking if its intents, entities, services and other cells are behaving properly. To access the bot simulator, click the balloon button on the lower right corner.

Bot simulator button on the lower right corner

A modal will open for you to choose a channel.

Channel selection

The bot simulator will show you the last trained version (if the bot uses Clever) or the last loaded intents (if the bot uses any other NLP).

Some eva functionalities doesn’t work in the bot simulator, but works properly in a flow.

This does not mean that they will not work in a flow, just that they will not be shown in the bot simulator.

Line breaks in answers will be rendered as a space in the bot simulator.

For example, the following answer,

Thank you for ordering the tomato soup. We will serve it in a second.

Enjoy your meal.

Would appear like this in the bot simulator:

Thank you for ordering the tomato soup. We will serve it in a second. Enjoy your meal.

Bot simulator window

You now can write any phrase to see if your flows work properly. If you want to see which intent a sentence leads to, check the “Show intents” box.

Show intents box

Using the bot simulator, you can test every training. For example, consider the following soup ordering flow:

Partial soup ordering flow

After this flow is trained, it becomes the following dialog:

Dialog on the bot simulator

The simulated conversation shows the intent which the sentence was tied to. In this case, the first intent was “soup1” and the second, “cold”.

Sentences and intents

​

A welcome message (the virtual agent welcoming the user), or a not expected answer (the virtual agent reaction to a nonsensical input) are flows contained in one cell. A virtual agent can have only one welcome message and one not expected microflow at the beginning. Any other flow must start with an intent. As they are structured as answers, to create welcome and not expected messages, check the chapter “”.

When starting a flow with an intent, you can create one or use one from the repository. To learn more, check the .

Intents represent the wants of your user and they will be interpreted by the NLP. To learn more, check ​

Here is an example of a created flow. This particular flow was started by an intent, followed by an answer (to build answers, check . This first intent represents the user message that made eva lead him to this flow. The first answer, or the virtual agent message, has to respond adequately the first intent.

Be aware of linguistic diversity. Even inside a city, the same object can have different names. “Arugula”, Rocket”, "ruchtetta", "rucola", "rucoli", "rugula", "", and "roquette" refer to the same leafy vegetable.

Pattern entities recognize a model that you insert so you do not have to write a different utterance for every time a user insert new information that follows a specific pattern. A good example is emails. Instead of creating an intent for every possible email, you create a pattern entity that recognizes the structure of an email address ().

For example, to create an email pattern entity, you would have to build a RegEx for emails. The email (and every other email) would be rendered as:

^[A-Z0-9._%+-][A-Z0-9.-]+\.[A-Z]{2,}$

You can also make the answer transactional to create dynamic answers. To know more, check the section .

Example: for an email pattern entity.

​​

​ ​

Answers
chapter Intents
Intents.
Answers)
colewort
[email protected]
[email protected]
[email protected]
Transactional answers
[email protected]
If you are using Luis, check the appendice “Using system entities in
Luis”.
intent
entity
answer
service
train