Intents
------
------
An intent defines how the bot should react to what the user says.
An intent in your agent represents a mapping between what a user says and what action should be taken by your product. Every intent you create should correspond to one question. In the intents you will write all the different ways of how those questions may be phrased by your customers. Don’t worry, you won’t have to write all of them. API.AI is using machine learning to train your agent to understand a lot more variations based on the examples you provide in intents.
User Says
---------
We can have several 'User Says' for a single intent.So we have input many different variations in which the user can as for the same intent.
The API.AI platform uses machine learning to train agents to understand more variations of these examples. Even with a small number of examples, the agent can understand a lot of variations. You can try it with this agent. The more examples you add, the better the agent learns.
Note that while you’re writing examples in the 'User Says' section, the system will try to annotate them automatically to extract the relevant information from your customer requests. If you don’t like the way your examples are annotated, you can change it any time you want. You can change the entities used, parameter names, and the part of the annotated phrase. Or perhaps you want to remove the annotation altogether.
ACTION
------
The 'Action' section of the intent view is used to determine the actionable data that can be passed to your business logic to handle complex scenarios.
If there is no special logic that needs to be applied to provide a response, you can write it right here in the intent. That’s what we did.
RESPONSE
--------
Once we’ve added several examples of how people may talk to our bot, we need to teach our bot to respond. We’ll use the 'Response' section of the intent view to define the answers.The bot is expected to respond with text. You can click the 'ADD MESSAGE CONTENT' button to add several ‘Text response’ elements. In the supported messaging platforms, they will appear as sequential messages sent from the bot.
To avoid repetition and make your bot sound more natural, you can add variations within a ‘Text response’ element. A different response will be picked when the the intent is matched. Text responses can also include emojis.
There are a few ways of how you can deliver responses to your customers:
1. Write responses directly in the intents, just like we did in our demo agent. This is the simplest way, which is convenient if no conditional logic is required to form the responses. Basically, it’s good for Q&A types of agents.
2. Use a webhook to connect to your business logic.
3. Use one of the SDK’s to send requests and get responses from our API.
IMAGES
------
choosing the Image option from the 'ADD MESSAGE CONTENT' menu and providing a public image URL. The supported image format for all currently supported integrations is PNG. If the provided URL is a valid image link, the picture will appear in the ‘Image’ element box.
CARDS
-----
If you use Facebook integration you can display the pictures as a horizontal scrollable carousel, by adding them as Cards. Just choose the Card option from the 'ADD MESSAGE CONTENT' menu for each of your images, and enter the URL and the title of your pictures. You can change the order of your cards by simply dragging and placing any of the cards to the order you like.
QUICK REPLIES
-------------
we choose the Quick replies option and type in the question ‘Would you like to take a look at my portfolio?’ in the 'Title' field with two answer options below (‘Yes’ and ‘No’, each in the separate field below). These answer options will appear in the app as clickable buttons. When clicked, the button query will be sent to the bot as user input.
CONTEXTS
--------
Context is a very powerful feature which you can use to build a conversation scenario with multiple follow-up questions, pass parameter values from one request to another, or use information from your app, device, or your user profile to help your business logic form the best response.
For the agent to understand that these inputs are actually the answer to the question. we create a context in the Contexts section at the top of the intent page.
Contexts will appear in your agent just under the intent title. You should see two fields here: input and output contexts. Corresponding input and output contexts in intents will determine whether they follow or precede one another.
To add a context, just type its name into the field and press enter. The context will now appear as a box with a colored border.
All contexts have a very important property – lifespan.By default the lifespan value is set to five. It means that the context will last for the next five matched intents. So if you have different input/output contexts in each of the following intents, all of them will be collected in the next five stages of the dialog, like a chain of contexts.While this feature can be very useful, at times you may want to get rid of a context after the following intent is reached. In these situations you can simply change the lifespan to one.
The other important function of the context is its ability to collect the parameters’ values.
Enabling built-in Domains
-------------------------
-------------------------
To make our bot able to handle the general small talk inputs, we enabled the Small Talk domain in the Domains section from the left side menu. The Domains are pre-defined knowledge bases in our platform.In the Small Talk domain, you can customize responses to the most popular requests. So we’ve modified some of the small talk responses to better represent Bots's personality.
One-click integrations
----------------------
----------------------
With one-click integrations, you can easily start using your bot without extra coding. Just go to the Integrations section, choose the platform that you need and follow the instructions. For this particular bot we enabled Facebook, Slack, Telegram, and Kik.
Testing
-------
-------
Now our agent is ready for testing. You can test it out in the Test Console (‘Try it now...’ section) on the right side of the page.
Entities
--------
--------
System entities are entities that the API.AI team created for you, so you don’t have to. If you don’t find an entity you need, you can create yours.
Composite entities can contain other entities. When you create a composite entity untick the ‘Define synonyms’ option and list entities (or combinations of entities) with the name of their alias after : (e.g., @sys.geo-city:city).
------
------
An intent defines how the bot should react to what the user says.
An intent in your agent represents a mapping between what a user says and what action should be taken by your product. Every intent you create should correspond to one question. In the intents you will write all the different ways of how those questions may be phrased by your customers. Don’t worry, you won’t have to write all of them. API.AI is using machine learning to train your agent to understand a lot more variations based on the examples you provide in intents.
User Says
---------
We can have several 'User Says' for a single intent.So we have input many different variations in which the user can as for the same intent.
The API.AI platform uses machine learning to train agents to understand more variations of these examples. Even with a small number of examples, the agent can understand a lot of variations. You can try it with this agent. The more examples you add, the better the agent learns.
Note that while you’re writing examples in the 'User Says' section, the system will try to annotate them automatically to extract the relevant information from your customer requests. If you don’t like the way your examples are annotated, you can change it any time you want. You can change the entities used, parameter names, and the part of the annotated phrase. Or perhaps you want to remove the annotation altogether.
ACTION
------
The 'Action' section of the intent view is used to determine the actionable data that can be passed to your business logic to handle complex scenarios.
If there is no special logic that needs to be applied to provide a response, you can write it right here in the intent. That’s what we did.
RESPONSE
--------
Once we’ve added several examples of how people may talk to our bot, we need to teach our bot to respond. We’ll use the 'Response' section of the intent view to define the answers.The bot is expected to respond with text. You can click the 'ADD MESSAGE CONTENT' button to add several ‘Text response’ elements. In the supported messaging platforms, they will appear as sequential messages sent from the bot.
To avoid repetition and make your bot sound more natural, you can add variations within a ‘Text response’ element. A different response will be picked when the the intent is matched. Text responses can also include emojis.
There are a few ways of how you can deliver responses to your customers:
1. Write responses directly in the intents, just like we did in our demo agent. This is the simplest way, which is convenient if no conditional logic is required to form the responses. Basically, it’s good for Q&A types of agents.
2. Use a webhook to connect to your business logic.
3. Use one of the SDK’s to send requests and get responses from our API.
IMAGES
------
choosing the Image option from the 'ADD MESSAGE CONTENT' menu and providing a public image URL. The supported image format for all currently supported integrations is PNG. If the provided URL is a valid image link, the picture will appear in the ‘Image’ element box.
CARDS
-----
If you use Facebook integration you can display the pictures as a horizontal scrollable carousel, by adding them as Cards. Just choose the Card option from the 'ADD MESSAGE CONTENT' menu for each of your images, and enter the URL and the title of your pictures. You can change the order of your cards by simply dragging and placing any of the cards to the order you like.
QUICK REPLIES
-------------
we choose the Quick replies option and type in the question ‘Would you like to take a look at my portfolio?’ in the 'Title' field with two answer options below (‘Yes’ and ‘No’, each in the separate field below). These answer options will appear in the app as clickable buttons. When clicked, the button query will be sent to the bot as user input.
CONTEXTS
--------
Context is a very powerful feature which you can use to build a conversation scenario with multiple follow-up questions, pass parameter values from one request to another, or use information from your app, device, or your user profile to help your business logic form the best response.
For the agent to understand that these inputs are actually the answer to the question. we create a context in the Contexts section at the top of the intent page.
Contexts will appear in your agent just under the intent title. You should see two fields here: input and output contexts. Corresponding input and output contexts in intents will determine whether they follow or precede one another.
To add a context, just type its name into the field and press enter. The context will now appear as a box with a colored border.
All contexts have a very important property – lifespan.By default the lifespan value is set to five. It means that the context will last for the next five matched intents. So if you have different input/output contexts in each of the following intents, all of them will be collected in the next five stages of the dialog, like a chain of contexts.While this feature can be very useful, at times you may want to get rid of a context after the following intent is reached. In these situations you can simply change the lifespan to one.
The other important function of the context is its ability to collect the parameters’ values.
Enabling built-in Domains
-------------------------
-------------------------
To make our bot able to handle the general small talk inputs, we enabled the Small Talk domain in the Domains section from the left side menu. The Domains are pre-defined knowledge bases in our platform.In the Small Talk domain, you can customize responses to the most popular requests. So we’ve modified some of the small talk responses to better represent Bots's personality.
One-click integrations
----------------------
----------------------
With one-click integrations, you can easily start using your bot without extra coding. Just go to the Integrations section, choose the platform that you need and follow the instructions. For this particular bot we enabled Facebook, Slack, Telegram, and Kik.
Testing
-------
-------
Now our agent is ready for testing. You can test it out in the Test Console (‘Try it now...’ section) on the right side of the page.
Entities
--------
--------
System entities are entities that the API.AI team created for you, so you don’t have to. If you don’t find an entity you need, you can create yours.
Composite entities can contain other entities. When you create a composite entity untick the ‘Define synonyms’ option and list entities (or combinations of entities) with the name of their alias after : (e.g., @sys.geo-city:city).
Comments
Post a Comment