Documentation

Documentation

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

›Natural Language Processing

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

API Reference

Sample

List

Gets the list of all available samples.

Example request

curl -X GET \
  https://v3-api.fpt.ai/api/v3/sample \

Example response:

[
    {
        "code": "0lvh6j25vvzw5bfq9ew45g0u3x8ndumc",
        "app_code": "dfd6908df08cf9d825f9ca9d38bf4677",
        "content": "Cho hỏi đổi cũ lấy samsung-galaxy-s9-22246 như thế nào?",
        "created_time": "2018-10-03T04:16:11Z",
        "intent_label": "ask_general_information",
        "intent_type": 0,
        "entities": [
            "thu_cu_doi_moi"
        ]
    },
    {
        "code": "2890odc6jatr4wxlvqv8txzk3rtkv5ip",
        "app_code": "dfd6908df08cf9d825f9ca9d38bf4677",
        "content": "Có phụ kiện máy samsung-galaxy-s9-22246 không?",
        "created_time": "2018-10-03T04:16:11Z",
        "intent_label": "ask_product",
        "intent_type": 0,
        "entities": [
            "phu_kien"
        ]
    },
    {
        "code": "3ov9x6gowo1uvwewou9xg7qhljz3ht5e",
        "app_code": "dfd6908df08cf9d825f9ca9d38bf4677",
        "content": "cho hỏi về dòng máy có intel-hd-graphics",
        "created_time": "2018-10-03T04:16:11Z",
        "intent_label": "",
        "intent_type": 0,
        "entities": []
    }
]

Request

GET https://v3-api.fpt.ai/api/v3/sample

Parameters

ParameterRequiredDescription
n/an/an/a

Response

Returns a list of available samples.

Create

Creates new sample.

Example request

curl -X POST \
  https://v3-api.fpt.ai/api/v3/sample \
  -d '{
        "content": "Do you have fresh checken eggs?"
      }'

Example response

{
    "code": "inde8872kkv40g6jga8eyszfm0dz47vz",
    "app_code": "ryca8xy0bza17j0f2xiv00ljg8j8gscs",
    "content": "Do you have fresh checken eggs?",
    "created_time": "2018-01-11T16:00:44.025515Z"
}

HTTP Request

POST https://v3-api.fpt.ai/api/v3/sample

Parameters

ParameterRequiredDescription
contentyescontent of the sample

Response

Returns a JSON object represents the created sample.

Get

Gets an sample with the given sample code.

Example request

curl -X GET \
  https://v3-api.fpt.ai/api/v3/sample/2fcli497oqfbrvte2nevm5ft962y5svp \
  -H 'Authorization: Bearer your_application_token'

Example response

{
    "code": "2fcli497oqfbrvte2nevm5ft962y5svp",
    "app_code": "0xtqlndqkmuht0z1xcgzg0eyplz1jztk",
    "content": "Sample text 1",
    "created_time": "2017-10-24T13:47:17Z",
    "intent": {
        "intent_sample_code": "il6pc9dvz1t8px2weebep60ygczav4b2",
        "intent_code": "7sdsWZJDQp",
        "sample_code": "2fcli497oqfbrvte2nevm5ft962y5svp",
        "intent_label": "intent_label"
    },
    "entities": [
        {
            "entity_sample_code": "7apu89e0co3hmcjai036yh695xqhsktv",
            "entity_code": "vfxpyqk5v9rn49zfcxf74hdra9h6zqx8",
            "sample_code": "2fcli497oqfbrvte2nevm5ft962y5svp",
            "parent_code": "",
            "value": "SomeValue",
            "start": 2,
            "end": 5,
            "created_time": "",
            "label": "sample_label_1",
            "Type": 1
        },
        {
            "entity_sample_code": "gudgybpeqxjokerfmrd96jxbjx5ngeae",
            "entity_code": "vfxpyqk5v9rn49zfcxf74hdra9h6zqx8",
            "sample_code": "2fcli497oqfbrvte2nevm5ft962y5svp",
            "parent_code": "",
            "value": "SomeValue",
            "start": 2,
            "end": 5,
            "created_time": "",
            "label": "sample_label_1",
            "Type": 1
        }
    ]
}

Request

GET https://v3-api.fpt.ai/api/v3/sample/:sample_code

Parameters

ParameterRequiredDescription
sample_codeyescode of the sample

Response

Returns a JSON object that represents the sample.

Delete

Deletes an sample specified by its code.

Example request

curl -X DELETE \
  https://v3-api.fpt.ai/api/v3/sample/2fcli497oqfbrvte2nevm5ft962y5svp \
  -H 'Authorization: Bearer your_application_token'

Example response

{
  "message": "Deleted"
}

Request

DEL https://v3-api.fpt.ai/api/v3/sample/:sample_code

Parameters

ParameterRequiredDescription
sample_codeyescode of the sample

Response

Returns HTTP Status 200 if the request succeed.

Update

Updates an sample with the given parameters.

Example request

curl -X PUT \
  https://v3-api.fpt.ai/api/v3/sample/2fcli497oqfbrvte2nevm5ft962y5svp \
  -H 'Authorization: Bearer your_application_token' \
  -d '{
    "content": "Sample text content updated"
}'

Example response

{
    "code": "2fcli497oqfbrvte2nevm5ft962y5svp",
    "app_code": "0xtqlndqkmuht0z1xcgzg0eyplz1jztk",
    "content": "Sample text content updated",
    "created_time": "2017-10-24T13:38:59Z"
}

Request

PUT https://v3-api.fpt.ai/api/v3/sample/:sample_code

Query Parameters

ParameterRequiredDescription
sample_codeyescode of the sample
contentyescontent of the sample

Response

Returns a JSON object that represents the updated sample.

Intent-Sample mapping - Create

Maps an intent with a sample.

Example request

curl -X POST \
  https://v3-api.fpt.ai/api/v3/intent-sample \
  -d '{
  "intent_code": "slyv8l0it363mh9kl922j2z8uvy9o4i1",
  "sample_code": "8hal2kmfr9nj0ys323pxzjbcdxmaalra"
}'

Example response

{
    "intent_sample_code": "5g69998jk1ye6o8n6k0bbhc6s9is6g5m",
    "intent_code": "slyv8l0it363mh9kl922j2z8uvy9o4i1",
    "sample_code": "8hal2kmfr9nj0ys323pxzjbcdxmaalra",
    "intent_label": "",
    "intent_type": 0,
    "intent_description": ""
}

HTTP Request

POST https://v3-api.fpt.ai/api/v3/intent-sample

Parameters

ParameterRequiredDescription
intent_codeyescode of the intent
sample_codeyescode of the sample

Response

Returns a JSON object represents the created intent-sample mapping.

Intent-Sample mapping - Delete

Unmap an intent from a sample by intent_sample_code.

Example request

curl -X DELETE \
  https://v3-api.fpt.ai/api/v3/intent-sample/0X8pYfI0vWUR0uuVspjiaJRIQcf30e96 \
  -H 'Authorization: Bearer your_application_token'

Example response

{
    "message": "Deleted"
}

Request

DEL https://v3-api.fpt.ai/api/v3/intent-sample/:intent_sample_code

Parameters

ParameterRequiredDescription
intent_sample_codeyescode of the map between intent and sample

Response

Returns a JSON object represents the result of deleting intent-sample mapping.

Intent-Sample mapping - Import

Create multiple intent-sample mappings.

Example request

curl -X POST \
  https://v3-api.fpt.ai/api/v3/intent-sample/import_intent_samples \
  -d '[ 
          {
              "intent": "intent_1",
              "sample": "sample text 1"
          },
          {
              "intent": "intent_2",
              "sample": "sample text 2"
          }
      ]'

Example response

{
    "number_of_duplicate_sample": 0,
    "number_of_empty_intent": 0,
    "number_of_imported_intent": 2,
    "number_of_imported_sample": 2,
    "number_of_invalid_intent": 0
}

HTTP Request

POST https://v3-api.fpt.ai/api/v3/intent-sample/import_intent_samples

Parameters

ParameterRequiredDescription
contentyeslist of intent-sample mappings (JSON format)

Response

Returns a JSON object represents the created intent-sample mapping.

Entity-Sample mapping - Create

Maps an entity with a sample via tagging words and start/end position of that tagging words in the sample.

Example request

curl -X POST \
  https://v3-api.fpt.ai/api/v3/entity-sample \
  -d '{
  "entity_code":"we2y0ceca052thxtf7jq29kk2610vjgl",
  "sample_code":"8hal2kmfr9nj0ys323pxzjbcdxmaalra",
  "value":"SomeValue",
  "start":2,
  "end":5
}'

Example response

{
    "entity_sample_code": "rlrpyxl68d2gufk441na152zyby6l4ww",
    "entity_code": "we2y0ceca052thxtf7jq29kk2610vjgl",
    "sample_code": "8hal2kmfr9nj0ys323pxzjbcdxmaalra",
    "parent_code": "",
    "value": "SomeValue",
    "start": 2,
    "end": 5,
    "created_time": "2018-10-08T03:29:02Z",
    "label": "",
    "Type": 0
}

HTTP Request

POST https://v3-api.fpt.ai/api/v3/entity-sample

Parameters

ParameterRequiredDescription
entity_codeyescode of the entity
sample_codeyescode of the sample
valueyestagging words
startyesstar position of tagging words in the sample
endyesend position of tagging words in the sample

Response

Returns a JSON object represents the created entity-sample mapping.

Entity-Sample mapping - Delete

Unmap an entity from a sample by entity_sample_code.

Example request

curl -X DELETE \
  https://v3-api.fpt.ai/api/v3/entity-sample/7apu89e0co3hmcjai036yh695xqhsktv \
  -H 'Authorization: Bearer your_application_token'

Example response

{
    "message": "Deleted"
}

Request

DEL https://v3-api.fpt.ai/api/v3/entity-sample/:entity_sample_code

Parameters

ParameterRequiredDescription
entity_sample_codeyescode of the map between entity and sample

Response

Returns a JSON object represents the result of deleting entity-sample mapping.

← EntityTrain →
  • List
    • Request
    • Response
  • Create
    • HTTP Request
    • Response
  • Get
    • Request
    • Response
  • Delete
    • Request
    • Response
  • Update
    • Request
    • Query Parameters
    • Response
  • Intent-Sample mapping - Create
    • HTTP Request
    • Response
  • Intent-Sample mapping - Delete
    • Request
    • Response
  • Intent-Sample mapping - Import
    • HTTP Request
    • Response
  • Entity-Sample mapping - Create
    • HTTP Request
    • Response
  • Entity-Sample mapping - Delete
    • Request
    • Response
Conversation
DocumentationAPI ReferenceTutorials (Video)
Reader
DocumentationAPI ReferenceTutorials
Speech
DocumentationAPI ReferenceTutorials
Copyright © 2025 FPT Corporation