Entity
    • PDF

    Entity

    • PDF

    Article Summary

    Available in Classic and VPC

    An entity refers to a dictionary where words such as an individual's name, name of an organization, location, date, and product name are registered. A chatbot analyzes entities from the user's utterance to identify intent and extract slots. Having words that have the same meanings defined as entities helps to understand the user's utterances. Changes are reflected to the chatbot service only when the build or changed settings are applied after creating, modifying, or deleting an entity.

    Entity types

    • Domain entity: Entity only used frequently in a specific domain. Classified into a dictionary-based dictionary entity and pattern entity which is based on regular expression patterns
    • System entity: Entity that can be shared and used by all domains. Provided as built-in
    • API entity: Entity that utilizes entity data saved in external database, rather than directly defining an entity within the chatbot builder

    Create domain entity

    Domain entity is a collection of important words that are expected to be used in the domain. Let's say that we're creating a chatbot for ordering coffee. You can register the types of coffee, cup size, etc., required for ordering coffee to a domain entity to use.
    The following describes how to register a domain entity.

    1. From the NAVER Cloud Platform console, click the Services > CLOVA Chatbot > Domain menus, in that order.
    2. Click the [Run builder] button of the domain you want to run the chatbot builder.
    3. From the chatbot builder, click Entity > [Domain entity] tab.
    4. Click the [Create entity] button.
    ItemDescription
    Entity nameEnter the entity name
    Entity typeSelect the entity type
    - Dictionary: Dictionary-based entity type. The dictionary entity data is used in model learning. Words duplicated in a domain entity can't be registered as a representative term or synonym
    - Pattern: Regular-expression-based entity type. Pattern entities are not used for model learning.
    Sensitive information security settingsSet the sensitive information status of the information to be contained in the entity. Set it to general information by default if it doesn't pertain to a special case where sensitive information is included
    - General information: The information to be contained in the entity is general information rather than sensitive information
    - General sensitive information: Information such as the user's name, phone number, and address. When the user input includes general sensitive information, the response is masked from pages such as chat history within the chatbot builder, and not revealed to the chatbot producer. It is advised that you activate the logging exception option and mask chatbot responses as the chatbot may reiterate your sensitive information when general sensitive information is included and used in the chatbot's response.
    - Special sensitive information: Special sensitive information such as the user's unique identification information (resident registration number, driver's license number) and password. When the user input includes special sensitive information, the response is masked from pages such as chat history within the chatbot builder, and not revealed to the chatbot producer. In addition, it is advised that you set the information as special sensitive information when special security processing is required as the information is masked in logs within the chatbot engine as well. Note that debug support is unavailable when a failure occurs as no information exists in engine logs so the inclusion and use of special sensitive information in the chatbot's response is limited.
    Register entityif dictionary entity was selected as the entity type
    - Representative term: Enter the representative term to be registered in the entity.
    - Synonyms: Enter the synonyms with various expressions. Separate multiple synonyms with commas (,)

    If pattern entity was selected as the entity type
    - Use regular expressions and analyze the entity as a pattern.
    - However, only the dictionary entity, system entity, system variables, and domain variables can be entered in a pattern entity.
    - Refer to Regular expression input guide for defining patterns.
    1. Click the [Save] button when you've entered all entity information.

    Pattern entity
    chatbot-chatbot-3-2_ex01_en

    Dictionary entity
    chatbot-chatbot-3-2_ex02_en

    Create system entity

    System entity is an entity that can be shared and used by all domains. It's managed by NAVER Cloud Platform, and a chatbot producer gets to enable the system entities they're going to use among the system entities registered.

    Note

    The system entities being referenced in a task or regular expression question can't be deactivated.

    `@SYSTEM_ANY

    `@SYSTEM_ANY is used when you want to save partial patterns from the user's free utterances. For instance, it can be used when you want to analyze individual names and search keywords, which are hard to define with dictionary or pattern entity, as entities.

    • `@SYSTEM_ANY can only be entered in a regular expression question.
    • `@SYSTEM_ANY can be matched to any utterance. It works the same way as a wildcard in the regular expression syntax.
    • It's advised to use `@SYSTEM_ANY with other patterns that may appear rather than registering it by itself.
    정규식 질문: `@SYSTEM_ANY [은|는|이|가] [뭐야|뭐니|뭘까요]
    
    • However, please note the words matched to `@SYSTEM_ANY can't be guaranteed if you're using regular expressions that appear selectively.
    정규식 질문 : `@SYSTEM_ANY (을|를) [설명해](줘|주세요)
    -> If the user entered "Explain CLOVA Chatbot to me," "CLOVA Chatbot" can be matched from `@SYSTEM_ANY.
    
    • If you have to register `@SYSTEM_ANY by itself, then it's advised to apply limitations so that the conversation can be matched in a limited scope at a specific point by setting a context, conditions, etc.
    Regular expression question: `@SYSTEM_ANY
    -> If you register a regular expression question with only `@SYSTEM_ANY entered, then all user utterances may get matched to the conversation.
    

    Create API linkage entity

    API linkage entity is used when there are entities that can't be managed by the chatbot builder, or entities with information which changes in real time. For example, API linkage entity is used for names of employees or customers, where the data's security is important and it's hard to manage them by registering them as entities in the chatbot builder. When the API URL of the server that can analyze the entity on behalf of the chatbot builder is entered, the utterance entered by the user can be passed to the API server that can analyze the entity and the result can be passed back for the scenario to be continued.

    API linkage entities are used in the following cases.

    • When it's used as slots in a task
    • When an entity condition is to be checked in the answer condition
    • When calling action method v1

    The following describes how to use API linkage entity.

    1. From the NAVER Cloud Platform console, click the Services > CLOVA Chatbot > Domain menus, in that order.
    2. Click the [Run builder] button of the domain you want to run the chatbot builder.
    3. From the chatbot builder, click Entity > [API entity] tab.
    4. Click the [Edit] button in the URL area.
    5. Enter the address of the API that can analyze entities in the URL field, and click the [Save] button.
      • The chatbot's call includes the morphological analysis result through the entered URL
    6. Click the [Create entity] button.
    7. When the Create entity window appears, enter the entity name, click the [Check for duplicates] button, and then click the [Save] button.
    8. Check the entity created.

    Request format

    {
      "query": "한국살아",
      "nlpResult": {
        "data": [
          {
            "words": [
              {
                "in": [
                  {
                    "morph": "한국",
                    "tag": "NOUN",
                    "ner": "Ner=B-Korea entity name",
                    "lemma": null,
                    "start": 0,
                    "end": 5,
                    "feature": 0,
                    "additionals": ""
                  },
                  {
                    "morph": "살아",
                    "tag": "NORMALVERB",
                    "ner": "Ner=O",
                    "lemma": "살다",
                    "start": 6,
                    "end": 11,
                    "feature": 0,
                    "additionals": "아"
                  }
                ],
                "word": "한국살아"
              }
            ]
          }
        ],
        "success": true
      }
    }
    

    Response format

    {
      "code": "OK",
      "message": "Option[String]",
      "entity": [
        {
          "name": "Country",
          "userInput": "Korea",
          "represent": "Korea"
        }
      ]
    }
    

    Manual entity tagging

    Dictionary entities can be tagged to regular questions in a conversation. Once the entities are registered and the model is built, the words that correspond to entities are automatically tagged when registering a general question, and the tagged entities will be marked as blue characters in the conversation's question list. The questions with entities tagged are reflected in model learning and help recognize the user's utterance.
    If the conversation model's yet to be built or the automatic entity tagging didn't work, then the chatbot producer may tag entities manually.
    The following describes how to manually tag entities.

    1. Complete the preliminary preparation.
      • Add the "pizza type" entity, representative term: potato pizza
        chatbot-chatbot-3-2_tag01_en
    2. Register the questions, and drag a word to be tagged as entity.
      • In this scenario, drag "potato pizza."
        chatbot-chatbot-3-2_tag02_en
    3. When the window for entity selection appears, select the entity to be tagged, and click the [Apply] button.
      • Add as a new representative term, or as the synonym of a registered representative term.
      • If no entity exists, then click the [Create entity] button to create a new entity.
        chatbot-chatbot-3-2_tag03_en
    4. Check if the entity has been tagged.
      chatbot-chatbot-3-2_tag04_en

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.