Documentation

Documentation

  • Conversation
  • Reader
  • Speech
  • Console
  • AI Agents
  • Languages iconEnglish
    • Tiếng Việt
    • Janpanese

›II. Building Chatbot on FPT.AI Platform

Documentation

  • Overview
  • I. Chatbot Introduction

    • What is Chatbot
    • Chatbot's purposes
    • Popular types of Chatbot
    • Benefits of using FPT.AI Chatbot
    • Starting with FPT.AI

    II. Building Chatbot on FPT.AI Platform

    • Working Mechanism
    • Bot building process
    • Creating your Chatbot
    • Natural Language Processing - NLP
    • Answer scenarios
    • New Bot scenarios - Bot Builder
    • Answer cards
    • Step connecting buttons
    • Getting customer's information using Form cards
    • Variable settings and management
    • Variable condition review
    • Memories
    • Send/get information via JSON API card
    • Reminder
    • Advanced functions
    • Persistent menu

    III. History

    • History - Updating Bot knowledge

    IV. Multi-channel Integration

    • Integrate with Facebook
    • Integrate with Facebook at Work
    • Integrate with Viber
    • Integrate with Zalo
    • Integrate with website
    • Webhook

    V. Broadcast

    • Broadcast

    VI. Auto Comment

    • Auto comment on Facebook

    VII. Automation Test

    • Check base on testcases
    • Auto create testcases

    VIII. Analytics

    • Introduction
    • Number of user's requests
    • Top matched intents
    • Chat with Bot
    • Number of new users
    • Top scenarios
    • Number of messages bot answered
    • Number of user's requests per hour
    • Number of active users per hour
    • Real-time analytics
    • Broadcast report

    X. Rating and Survey

    • Rating
    • Survey

    XI. Bot Setting - Management

    • Introduction
    • Bot information
    • Messages management
    • Data management
    • Bot intent confidence
    • Delete Bot data
    • Delete bot
    • Transfer bot ownership
    • Version

    XII. Bot Roles

    • Bot roles

    XIII. Chatbot SDK

    • Chat Bot SDK
  • Appendices

Live Support

  • Introduction
  • Customer list interface
  • Customer support flow
  • Note feature
  • Suppoter chat
  • KPI report feature
  • Ticket config
  • Ticket report
  • Archive conversation
  • Ticket management
  • Auto assign to supporters

Tutorials (Videos)

  • 1. Brief overview of FPT.AI
  • 2. Using QnA feature to create a Chatbot
  • 3. Creating Chatbot with complicated scenarios
  • 4. Precondition fucntion in Scenarios
  • 5. Random answer function in Scenarios
  • 6. NLP feature
  • 7. Exact match and Predictive Match in NLP
  • 8. History of Recognition
  • 9. Broadcast feature
  • 10. Live Support feature
  • 11. Persistent Menu
  • 12. Auto-comment feature on Facebook
  • 13. Bot roles
  • 14. Bot configuration in Settings section
  • 15. Integration Chatbot with Facebook
  • 16. Integration Chatbot with Facebook at Work

API Reference

  • Introduction
  • General
  • Natural Language Processing

    • Intent
    • Entity
    • Sample
    • Train
    • Predict
    • Keyword
    • Dictionary

    Dialogue Management

    • Get Answer
    • JSON Card
    • Types of the message

Building Chatbot on FPT.AI platform

Natural Language Processing - NLP

Train your Bot to understand your customers’ questions.

Natural Language Processing - NLP is a core AI feature of FPT.AI Conversation. For your Bot to be able to understand user sentences, bot builders will need to teach in specific knowledge, including:

  • Sample: Users’ utterances to inquire about topics of interest.

  • Intent: Purposes of users’ utterances.

  • Keyword: Important and necessary information in utterances, which help the bot to understand topics to give suitable responses.

  • Entity type: Representing the meanings of Keywords.

  • Dictionary: Add alternative words and synonyms for the Bot to better identify intents

Example:

Intent: I need to have 2 phones delivered to No. 17 Duy Tan Street
IntentKeywordEntity type
Buy2Quantity
phonesProduct
No. 17 Duy Tan StreetAddress

Notice:

  • Samples are extremely important to chatbots. Therefore, you should add as many samples as possible. Diversity in samples will help your chatbot better understand different utterances from users.

  • You should identify the top Intents based on customers’ conversation history. Then, add to the sample amount and diversity of those intents.

Sample

A Sample can be any utterance from users, and each sample will contain a specific intent. To train the bot to understand different utterances from users, you will need to make various samples with the same intent.

There are 2 methods to add samples and intents to the system:

Method 1: Add samples manually

  • Step 1: In NLP, select Sample (1) -> Create sample (2)

  • Step 2: Enter the sample content (3)

  • Step 3: Enter the matching intent

  • Step 4: Click Save to finish creating the sample.

1

Method 2: Insert samples from Excel

  • Step 1: In NLP, select Sample (1) -> select Insert samples from Excel

2

  • Step 2: Select Browse to upload your excel file

3

  • Step 3: Select Confirm to finish

Notice:

  • The excel file with Samples and Intents has to be formatted as follows:

4

  • After finishing creating Samples and Intents for your bot, you will need to click Train button to train your bot with the new knowledge.

  • You can also review your bot understanding by clicking Test NLP on the interface, Enter the Sample, and check the returned result.

5

Keyword and Entity type

Keywords are important information in samples, which influence the bot’s answering logic. Each keyword represents an actual meaning, called an Entity type.

Example 1: Object Entity

Sample: “What is the price of iphone X”, “How much does a Samsung s9 cost”

  • Both of the above samples mean to ask for the price. Therefore, they share the Intent of “what price”.

  • However, these 2 products have different prices. Therefore, the bot will need to respond with 2 different answers.

  • Conclusion: iphone X and Samsung s9 are Keywords. These are 2 types of products. Therefore, the entity type here is “product”.

Example 2: Information Entity

Sample: Please deliver my goods to 17 Duy Tan Street, phone number 0123456789

  • The Intent of the above sample is “delivery”.

  • The above sample includes 2 important information that will decide the accuracy of the delivery. Therefore, 17 Duy Tan Street is the keyword that represents entity “address”; while 0123456789 is the keyword that represents entity “phone number”.

Identification of the entities like above examples is the basis for Bot response setup.

In example 1 – Object Entity, Bot will need to provide 2 different answers. (See how to setup responses for Object Entity at Variable Condition Review).

In example 2 – Information Entity, alongside responding to the customers, the Bot will also record customer information onto the Bot management system. In order to this, bot builders will need to use a JSON API card as the transfer medium.

Depends on each problem, FPT.AI Conversation will allow the Bot builder to train their Bot to understand correctly Keywords that correspond to trained entity types; or be able to recognize similar keywords (with machine learning). There are the 2 information matching methods: Exact match and Predictive match

A. Exact match

With exact match, the Bot will seek keywords and entity types in the Keyword list.

This method is often used in scenarios with set keywords – which are identifiable beforehand.

Example 1: “What is the price of iphone X”, “How much does a Samsung s9 cost”

The “product" entity Enter the 2 above sentences are “iphone X” and “Samsung s9”, and the chatbot had used exact match.

Example 2: In an insurance company that provides difference kinds of insurance:

  • “Health insurance”, “Accident insurance”, “Vehicle insurance”… are Keywords

  • “insurance product” is Entity type.

You will need to tag the Keywords with the above Entity Enter accordance with the exact match method, so that your bot can match from samples.

Step 1: In NLP, select Sample -> Tag Keyword with corresponding Entity type.

6

Step 2: Go to NLP -> Select Entity type-> Change the entity type matching method into Exact match

7

Step 3: In Keyword, the system had recorded tagged keywords (highlighted) at the Sample menu. Here, you can add synonyms (words with similar meanings or abbreviations…) for these keywords, so that your Bot can recognize the user Intents correctly.

8

Step 4: Click Train button to train the Bot with new data.

Step 5: After successful training, you can review the Bot’s ability to recognize entities by clicking on Test NLP.

9

After training, the Bot will be able to recognize “ip X” as “iphone X”, as it has obtained data about the product. Should you check product words outside the trained synonym list, however, the Bot will not be able to recognize.

Real value is a permanent value in the keyword list. This will be used to design bot responses to each Keyword. (More details can be viewed at Variable Condition Review).

B. Predictive match

For Bots can find entity information using machine learning, you need to tag as many Keywords with their corresponding Entity types as possible. Here, Bot will use Samples tagged with Keywords to predict extra information (but do not seek the permanent keyword list like in Exact match).

This method is often utilized with information unidentifiable beforehand, like names, phone numbers, addresses…

Example: Please deliver my goods 17 Duy Tan Street, phone number 0123456789.*

The information entity “17 Duy Tan Street" and “0123456789” are examples of predictive match.

Step 1: Enter Sample (1) which includes important information entities. Choose Intent (2) and highlight Keywords (3) then select corresponding Entity type (4).

Currently, the platform provides 4 set types of Systematic entity, including $address (address), $datetime (date and time), $email (email) and $number (number), which will simplify your bot building process.

For other information, Enter new Entity type then click Save (6).

10

For example, there is no phone number in Systematic entity. So if you want to save the phone number Entity 0123456789 of the above example, type “phone_number" in the blank below Entity type.

Step 2:** Go to NLP -> Entity type -> Edit Entity type so change the “phone_number” entity into “Predictive match” or keep the default setting of “Both”.

11

Step 3: Different to the exact match method – adding synonyms of the keywords, predictive match utilizes machine learning for entity recognition. Therefore, you will need to tag many other similar keywords for the bot to understand and recognize the entity type.

12

Step 4: Click Training to teach the Bot newly updated entity information.

Step 5: Review the results by clicking on NLP Review on the interface. Then, Enter any random phone numbers different from the one taught to the Bot. The Bot will still be able to recognition that as a “phone_number” entity.

13

C. Systematic entity

These are entities pre-built by the FPT.AI Conversation platform, which allows users to get information on addresses, emails, dates and times, or any random numbers.

For this to work, you will only need to tag one information in the Sample with any of the above entity, then the Bot will understand and relevant information provided by the customer on default, without any extra entity training.

  • $address: Address entity

Bot can recognize Vietnamese addressed from the most detailed to the most vague (home number, lane number…).

Example: “No. 17 Duy tan, Cau giay District, Ha noi". The real value result will be standardized via API (using the JSON API card)

14

  • $datetime: Date and time entity

Bot can recognize time to hour and minute, and date to day month year.

Example:

15

  • $email: Email entity

Bot can recognize any email entity.

Example:

16

  • $number: Entities that are numbers

Bot can recognize any numbers like quantity, price…

17

Intent

Intents are purposes of users’ utterances, and you can create them beforehand using the conversational flow tree map in the Intent menu by:

  • Step 1: In NLP, select Intent -> Enter Intent name

  • Step 2: Enter the Content of the Intent. This will be displayed in bot suggestions when it is not confident of the answer

  • Step 3: Select Add Intent to finish

18

Notice: When creating new Intents in NLP with samples from excel files, you will need to change the intent description into meaningful sentences.

19

Dictionary

Aside from adding to the sample diversity manually, you can add alternative words, synonyms, or existing phrases in Samples to the Dictionary. This will help improve the bot’s ability to recognize Intents.

Example:

We have a list of samples in the “promotion” intent:

20

When processing a new user utterance with the same Intent, the Bot will correctly recognize the intent, but with low confidence level. To improve Bot understanding, you will need to add more Samples of the same “promotion” intent like: “do you offer promo”, “promo?”… or add “promo” as an alternative word for “promotion”. Then, when customer utterances include the abbreviation “promp”, the Bot will be able to recognize that they are asking about promotions.

21

After entering the synonyms and alternative words in the Dictionary, click Train to teach the bot.

Perform a NLP review to re-evaluate the bot’s learning results: Bot can correct recognize with higher confidence level.

22

← Creating your ChatbotAnswer scenarios →
  • Sample
  • Keyword and Entity type
    • A. Exact match
    • B. Predictive match
    • C. Systematic entity
  • Intent
  • Dictionary
Conversation
DocumentationAPI ReferenceTutorials (Video)
Reader
DocumentationAPI ReferenceTutorials
Speech
DocumentationAPI ReferenceTutorials
Copyright © 2025 FPT Corporation