Entity management

Updated at:

This topic describes how to create standard and regular entities, and how to manage existing entities.

Overview

An entity groups industry-specific terms to help the bot recognize and use them to provide accurate answers. For example, instead of creating separate intents like "check weather in Hangzhou" and "check weather in Beijing", you can create a single intent "check weather in [city]". In this case, "city" is an entity. Configuring this entity lets you use its value to provide a specific weather forecast for the requested location.

Create an entity

Create a standard entity

In daily life and business, different words can have the same meaning. For example, "Beijing", "the Imperial Capital", and "China's capital" all refer to Beijing. A standard entity groups these words.

image

  1. Log on to the Intelligent Conversation Bot Console. Within a chatbot space, navigate to knowledge base > global configuration > entity management to open the entity management page.

  2. Click Add standard entity and fill in the entity details. For example, you can set the entity name to Product and the entity code to product_name.

    • Entity name: The name of the entity. Specify a name based on your business requirements.

    • Entity code: The unique identifier for the entity. It cannot be changed after creation.

  3. Click Create. The entity is created and its configuration page opens.

  4. Click Add entity member to add members. Enter a description and synonyms, then click Save next to the entity member.

    For example, if you have an entity named Product with the entity code product_name, you can add an entity member and provide a description like "Product names included in Lingque". Then, you can add synonyms like Intelligent Conversation Bot, Cloud Call Center, Smart Outbound Bot, and Intelligent Dialogue Analysis.

    image

    • Description: A detailed description for the entity member. This helps the model better understand the entity's business context, which improves search and response generation.

      • Example: Add an entity for "quick ratio".

        • Before adding a description, the model fails to retrieve relevant information and provides an incorrect answer.

          image

          image

        • Select the relevant content and click Annotate. After annotation, the model can retrieve the correct metric and answer based on the description.

          image

          image

  1. Click Save to complete the entity configuration.

Create a regular entity

A regular expression is a sequence of characters that specifies a search pattern. It consists of ordinary characters (like a-z) and special characters (metacharacters). A regular expression is a template for matching character patterns in strings. You can add up to five expressions for each regular entity.

image

  1. Log on to the Intelligent Conversation Bot Console. Within a chatbot space, navigate to knowledge base > global configuration > entity management to open the entity management page.

  2. Click Add regular entity and fill in the entity details.

    • Entity name: The name of the entity. Specify a name based on your business requirements.

    • Entity code: The unique identifier for the entity. It cannot be changed after creation.

  3. Click Create. The entity is created and its configuration page opens.

  4. Click Add regular expression, enter the expression, and click OK to save it. After writing the expression, you can use the Test expression window to verify it.

    For example, to create a regular entity for phone numbers, set the entity name to Phone Number and the entity code to phone_number. Enter the regular expression ^1[3456789]\d{9}$. You can then enter a phone number in the Test expression window to validate it.

    image

  5. Click Save to complete the entity configuration.

Manage entities

In addition to creating new entities, you can also import, export, edit, enhance, and delete existing ones. The entity management page provides the following operations:

image

image

  • Import: You can import entities to add new entity members, synonyms, or regular expressions.

  • Export: You can export a single entity, multiple entities in a batch, or all entities. The exported file contains basic entity information (name and type) and the entity configuration. Do not edit the basic information in the exported file, but you can add to the entity configuration. Re-importing the file merges the configurations.

    • Export entities: Export selected entities from the current chatbot.

    • Export all entities: Export all entities in the current chatbot.

    • Export: Export the currently selected entity.

  • Edit: Modify the entity name, entity members, or expression configurations.

  • Entity enhancement: Enhances the bot's ability to recognize this entity.